Open API

Background

Generally, projects and processes are created through pages, but integration with third-party systems requires API calls to manage projects and workflows.

The Operation Steps of DS API Calls

Create a token

  1. Log in to the scheduling system, click “Security”, then click “Token manage” on the left, and click “Create token” to create a token.

Open API - 图1

  1. Select the “Expiration time” (Token validity), select “User” (to perform the API operation with the specified user), click “Generate token”, copy the Token string, and click “Submit”

Open API - 图2

Use token

  1. Open the API documentation page

    Address:http://{api server ip}:12345/dolphinscheduler/doc.html?language=en_US&lang=en

Open API - 图3

  1. select a test API, the API selected for this test: queryAllProjectList

    projects/query-project-list

  2. Open Postman, fill in the API address, and enter the Token in Headers, and then send the request to view the result

    1. token: The Token just generated

Open API - 图4

Create a project

Here is an example of creating a project named “wudl-flink-test”:

Open API - 图5

Open API - 图6

Open API - 图7

The returned msg information is “success”, indicating that we have successfully created the project through API.

If you are interested in the source code of the project, please continue to read the following:

Appendix:The source code of creating a project

Open API - 图8

Open API - 图9