Skip to main content
Announcements
Qlik Connect 2025! Join us in Orlando join us for 3 days of immersive learning: REGISTER TODAY

Talend in the Cloud SDLC

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
TalendSolutionExpert
Contributor II

Talend in the Cloud SDLC

Last Update:

Feb 2, 2024 12:49:46 PM

Updated By:

Sonja_Bauernfeind

Created date:

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.

0EM3p000002Oof5.png

 

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.

0EM3p000002OofF.png

Once you have a token, access the website, and in the Value field, insert the constant, Bearer, followed by your access token. Click Authorize.

0EM3p000002OofK.png

Here the focus is on promotions :: executable and promotions :: executions.

0EM3p000002OofP.png

This article uses Talend Cloud API Tester to create a scenario using the methods in the following table:

verb

method

Description

GET

/executables/promotions

Get available promotions

GET

/executables/promotions/{id}

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.

0EM3p000002GaNa.png

To add a promotion, you need to have a source and target environment.

0EM3p000002Oofj.png

After adding the promotion, clicking the Promote arrow runs the promotions between environments.

0EM3p000002Oofy.png

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.

0EM3p000002PFw5.png

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:

0EM3p000002PG2f.png

Example of a get promotion response:

0EM3p000002Oogw.png

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

https://api.eu.cloud.talend.com/tmc/v2.2/executables/plans

Get available plans

Tasks

https://api.eu.cloud.talend.com/tmc/v2.2/executables/tasks

Get available tasks

Artifacts

https://api.eu.cloud.talend.com/tmc/v2.2/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.

0EM3p000002Ooh6.png

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:

0EM3p000002Oof6.png

The response to your request generates an executionId:

0EM3p000002Ooha.png

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

0EM3p000002Oohk.png

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.

0EM3p000002Oohp.png

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:

0EM3p000002Ooi9.png 

The response to your request generates an executionId:

0EM3p000002OoiE.png

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

0EM3p000002Oogi.png

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.

0EM3p000002OoiY.png

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:

0EM3p000002Oois.png

The response of your request generates an executionId:

0EM3p000002Ooix.png

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

0EM3p000002Oogk.png

Resources and references

Labels (1)