Skip to main content Skip to complementary content

Getting tasks for which you need update the artifact version

Use the orchestration/executables/tasks endpoint with the workspaceId and the artifactId query parameters to obtain a list of the tasks that are using the artifact to be updated.

Before you begin

  • Generate access tokens:

    Once generated, a service account token expires after 30 minutes. If it expires, generate a new token using the POST method at the endpoint https://api.<env>.cloud.talend.com/security/oauth/token. For more information about generating a token, see Generating a service account token.

  • Ensure that the account to be used to issue API calls has the Operations - Manage (ID: TMC_OPERATOR) permission.

Procedure

  1. Issue the following request to get the scheduled task runs of a given environment.

    Example

    method: GET
    endpoint: https://api.<env>.cloud.talend.com/orchestration/executables/tasks
    headers: {
              "Content-Type": "application/json",
              "Authorization": "Bearer <your_personal_access_token_or_service_account_token>"
              }
    query parameters: {
             "workspaceId": "id_of_the_workspace"
             "artifactId": "id_of_the_artifact_that_the_task_will_be_updated_to_use"
                      }
    The artifactId parameter identifies the artifact that the task will be updated to use. The workspaceId parameter indicates the workspace from which you get the tasks. You can obtain them through API requests or find them in Talend Management Console.
  2. Optional: You can use Talend API Tester to visually build your API requests.

    Example

    Settings to build an API in Talend API Tester.
  3. Click Send to issue your call to obtain all the tasks using this artifact.

Results

The status code 200 is returned with a list of tasks in the body of the response. The following example shows how a task could look like in the response. All of these tasks are using the artifact to be updated to a new version.
{
  "id": "your_task_id",
  "name": "Hello world task",
  "description": "task detail description",
  "workspace": {
    "id": "your_workspace_id",
    "name": "Personal",
    "description": "workspace detail description",
    "owner": "admin",
    "type": "custom",
    "environment": {
      "id": "your_environment_id",
      "name": "Development",
      "description": "environment detail description",
      "default": true
    }
  },
  "version": "0.1",
  "artifact": {
    "createDate": "2021-11-22T13:13:27.602Z",
    "updateDate": "2021-11-22T13:13:27.602Z",
    "id": "id_of_the_artifact_to_be_updated",
    "name": "Hello world artifact",
    "version": "0.1.0" (The artifact version to be updated)
  },
  "tags": [
    "tag1",
    "tag2"
  ],
  "connections": {
    "aws": "5d405e381f40e07fbab6757c",
    "googledrive": "5d405e831f40e07fbab6757d"
  },
  "parameters": {
    "parameter_p1": "1111",
    "custom_parameter": "custom"
  },
  "resources": {
    "resource_file_f1": "5d567ad48f68ae1a1e16e4a4"
  },
  "autoUpgradeInfo": {
    "autoUpgradable": false,
    "overrideWithDefaultParameters": false
  }
}

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!