
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Talend in the Cloud SDLC
Feb 2, 2024 12:49:46 PM
Mar 3, 2021 10:11:22 AM
This article shows you how to create promotions in Talend Cloud Management Console that enable you to manage your Software Development Life Cycle (SDLC) within a single cloud application, which Talend Studio initially feeds.
A promotion is a configuration that allows you to move artifacts, tasks, and plans across environments. You can use executions can be used to execute a task or plan.
It also shows you how to leverage Talend Cloud Management Console REST APIs to promote Talend assets across environments.
Using Talend Cloud Management Console APIs
Talend Cloud Management Console Public API enables users to manage the console using a Webservice Call. APIs are based on the REpresentational State Transfer (REST) architectural style.
To get the documentation and a list of all operations for tasks in Talend Cloud, see the Talend Management Console :: Public API swagger website. You can also use this website to test and execute all tasks.
However, to access the public API website, you must follow the instructions to generate a personal access token.
Once you have a token, access the website, and in the Value field, insert the constant, Bearer, followed by your access token. Click Authorize.
Here the focus is on promotions :: executable and promotions :: executions.
This article uses Talend Cloud API Tester to create a scenario using the methods in the following table:
verb |
method |
Description |
GET |
Get available promotions |
|
GET |
Get promotion details or status |
|
POST |
/executions/promotions |
Execute promotions |
Table 1: List of the methods used in this article
For more information, see the Using the Talend Cloud Management Console Public API, Community Knowledge Base article.
Talend promotions
Managing promotions
To get and manage promotions, you must have the Environment Administrator role. This role allows you to manage environments, workspaces, and promotions and execute the promotions.
To add a promotion, you need to have a source and target environment.
After adding the promotion, clicking the Promote arrow runs the promotions between environments.
The Promote page opens.
Note: The API calls use the same parameters later in this article.
The available scopes are Environment, Workspace, Plan, Task, and Artifact. However, this article focuses is on plans, tasks, and artifacts. Notice that you can use different constants in the Scope field: FLOW corresponds to Task and ACTION to Artifact.
Consume Talend Management Console Public REST API
Listing promotions
To get promotion details or status, or to execute a promotion, you need to get a Promotion Id for the project.
The following shows two sample request queries to get all available promotions:
Example of a get promotion response:
The Promotion Id is necessary to perform further steps. In this example, the Id is "5e4d01a0c670e032bc9b3419".
Listing Plans, Tasks, and Artifacts
Analog to list promotions, you must consume a GET method to get the available artifacts and tasks shown in the table below:
object |
URL |
Description |
Promotions |
https://api.eu.cloud.talend.com/tmc/v2.2/executables/promotions |
Get available promotions |
Plans |
Get available plans |
|
Tasks |
Get available tasks |
|
Artifacts |
Get available artifacts |
Table 2: Methods to list promotions, tasks, and artifacts
Promoting a plan
First, you have to list all available Plans. The following is an example of a response returned by the API request using the information from Table 2.
Before promoting any plan, you must list all available plans. Then, you can use the Plan Id ("e979515f-0f54-46a8-b0a6-f502f3b1bf63") in combination with the Promotion Id from the last listing ("5e4d01a0c670e032bc9b3419").
Your Request Body should look similar to this:
The response to your request generates an executionId:
In this case, the Id gets the status of the plan creation by calling the following webservice:
https://api.eu.cloud.talend.com/tmc/v2.2/executions/promotions/5fc4e7664073473136d77615
Promoting a task or flow
Analog to plan promotion, first, you need to list all available tasks. The following is an example of a response that might be returned by the API request using the information from Table 2.
Before promoting any plan, you must list all available plans. Then, you can use the Task or Flow Id ("5f520836b52fa334533c63d4") in combination with the Promotion Id from the last listing ("5e4d01a0c670e032bc9b3419").
Notice that the artifactType of the Task is called "FLOW" and not "TASK". Your Request Body should look similar to this:
The response to your request generates an executionId:
In this example, the Id gets the status of the task or flow creation by calling the following webservice:
https://api.eu.cloud.talend.com/tmc/v2.2/executions/promotions/5fc4f97d04b04d218de01634
Promoting an artifact or action
Analog to plan and task promotion, first you have to list all available Artifacts. The following is an example of a response that might be returned by the API request using the information in Table 2.
Before promoting any plan, you need to list all available plans first. Then, you can use the Artifact or Action Id ("5f56325144b1a9343b2f6208") in combination with the Promotion Id from the last listing ("5e4d01a0c670e032bc9b3419").
Notice that the artifactType of the task is called "ACTION" and not "ARTIFACT", your Request Body should look similar to this:
The response of your request generates an executionId:
In this case, the id gets the status of the artifact or action creation by calling the following webservice:
https://api.eu.cloud.talend.com/tmc/v2.2/executions/promotions/5fc506f74073473136d7786b