Code Stream provides a REST plug-in, which allows you to integrate Code Stream 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 Code Stream and another application.
With the REST plug-in, you can:
- Integrate external REST API-based systems into a Code Stream pipeline.
- Integrate a Code Stream 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 Code Stream 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 create a tag on a Git commit for a build, and have the task post a request to get the check-in ID from the repository. The task can send a payload to your repository and create a tag for the build, and the repository can return the response with the tag. |
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.
You can also use REST APIs to import and export a pipeline, and use the example scripts to run a pipeline.
This procedure gets a simple URL.
Procedure
Results
Congratulations! You configured a REST task that invoked a REST API and sent information between Code Stream 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 Code Stream 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.