Creating a plan in Management Console

Create a Management Console plan to schedule task executions.

Before you begin

  • Generate an access token:
    • For users, generate a personal access token. For further information, see Generating a Personal Access Token.
    • For service accounts, generate a service account token. For further information about how to generate a service account token, see Generating a service account token. 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.

About this task

In this example, Talend API Tester is used to issue API requests. For further information about Talend API Tester, see Talend Cloud API Tester User Guide.

Procedure

  1. Open Talend API Tester in your browser and select POST from the Method list.

  2. In the field next to the Method drop-down list, enter the endpoint to be used:
    https://api.<your_data_center>.cloud.talend.com/orchestration/executables/plans

  3. In the HEADERS area, click Add header and in the name field, enter Authorization. In the value field, enter Bearer <your_personal_access_token_or_service_account_token> (with a whitespace after “Bearer”).

  4. In the BODY area, enter the plan creation payload in JSON format. For example:

    {
        "workspaceId": "67b5e52a137c007b38831b60",
        "name": "GetWeatherPlanFromAPI",
        "description": "Plan basic for getweather",
        "steps": [
            {
                "name": "Step 1",
                "condition": "ALL_SUCCEEDED",
                "taskIds": ["684af61570b87a57c4522cef"],
                "handlerOnFailure": {"taskIds": ["68ad7c5d1ad91fb10707be2a"]}
            }
        ]
    }
    
    • steps: An array of step definitions. Each step requires a name, a condition (such as ALL_SUCCEEDED), a list of task IDs, and optionally a handler for failure. In this example, this handler specifies the task to be run if the step fails. For more information about how to configure a step in Talend Management Console, see Configuring the plan steps in the plan edit view.
  5. Click Send to issue your request.

    The response contains the created plan details with the status code 201.

Results

You have created a new plan with the specified tasks to be run in it in the desired workspace. You can now use this plan ID to schedule, monitor, or modify the plan as needed.