Automation Pipelines provides a REST plug-in, which allows you to integrate Automation Pipelines with other applications that use a REST API so that you can continuously develop and deliver software applications that must interact with each other. The REST plug-in invokes an API, which sends and receives information between Automation Pipelines and another application.
With the REST plug-in, you can:
- Integrate external REST API-based systems into a Automation Pipelines pipeline.
- Integrate a Automation Pipelines pipeline as part of the flow of external systems.
The REST plug-in works with any REST API, and supports GET, POST, PUT, PATCH, and DELETE methods to send or receive information between Automation Pipelines and other applications.
What you do | What happens as a result |
---|---|
Add a REST task to your pipeline. | The REST task communicates information between applications, and can provide status information for a successive task in the pipeline stage. |
In the REST task, select the REST action and include the URL. | The pipeline task calls the URL when the pipeline runs. For POST, PUT, and PATCH actions, you must include a payload. In the payload, you can bind your pipeline and task properties when the pipeline runs. |
Consider this example. | Example use of the REST plug-in: You can add a REST task to get information that is needed for a subsequent pipeline task. |
Similar to using the REST plug-in to invoke an API, you can include a Poll task in your pipeline to invoke a REST API and poll it until it completes and the pipeline task meets the exit criteria. See What types of tasks are available in Automation Pipelines.
You can also use REST APIs to import and export a pipeline, and use the example scripts to run a pipeline.
In this procedure, the REST task gets a build tag from one service and a subsequent CI task uses the build tag to get a CICD build number.
Procedure
Results
Congratulations! You configured a REST task that invoked a REST API and sent information between Automation Pipelines and another application by using the REST plug-in.
What to do next
Continue to use REST tasks in your pipelines to run commands and integrate Automation Pipelines with other applications so that you can develop and deliver your software applications. Consider using poll tasks that poll the API until it completes, and the pipeline task meets the exit criteria.