Authenticating to Talend Cloud Data Stewardship REST API - Cloud

Talend Cloud Data Stewardship User Guide

Version
Cloud
Language
English
Product
Talend Cloud
Module
Talend Data Stewardship
Content
Administration and Monitoring > Managing users
Data Governance > Assigning tasks
Data Governance > Managing campaigns
Data Governance > Managing data models
Data Quality and Preparation > Handling tasks
Last publication date
2024-01-30

Sometimes you may want to access Talend Cloud Data Stewardship REST API and perform a set of actions such as tracking the audit events or listing specific campaigns. To do so you need to implement an API authentication and authorization method.

API requests require access tokens. For further information, see Generating a Personal Access Token.

Procedure

  1. Retrieve an authentication token by doing one of the following:
    • If SSO is enabled, generate a personal access token from the cloud portal.
    • If SSO is not enabled, open a terminal and execute a POST request to call a login API.

      The API provides an authentication token in the authorization response header.

    Below is a sample login POST request and response which uses username and password.

    Example

    curl -v -X POST '<TDS_URL>/data-stewardship/login?client-app=STUDIO' -F username=<USERNAME> -F password=<PASSWORD>
    > POST /data-stewardship/login?client-app=STUDIO HTTP/1.1
    > Host: <TDS-HOST>
    > User-Agent: curl/7.47.0
    > Accept: */*
    ...
    < access-control-expose-headers: authorization
    < authorization: Bearer eyJraWQiOiJpYW0tb2lkYy1jbG91ZCIsImQu2WembcCA
    ...
  2. In Talend Cloud Data Stewardship API calls, enter the token generated from Talend Cloud or retrieved by the POST request.
    Below is a sample request and response to list campaigns owned by a specific campaign owner.

    Example

    curl -X GET 'https://<TDS-HOST>/data-stewardship/api/v1/campaigns/owned'
     -H 'Authorization: Bearer eyJraWQiOiJpYW0tb2lkYy1jbG91ZCIsImQu2WembcCA'
    Response:
    []