Skip to content

Treasure Workflow (1.0)

Treasure Workflow

Download OpenAPI description
Languages
Servers
Mock server
https://docs.treasuredata.com/_mock/apis/workflow
aws
https://api-workflow.treasuredata.com
aws-tokyo
https://api-workflow.treasuredata.co.jp
eu01
https://api-workflow.eu01.treasuredata.com
ap02
https://api-workflow.ap02.treasuredata.com
ap03
https://api-workflow.ap03.treasuredata.com

Attempt

Operations

Log

Operations

Project

Operations

List projects with filters

Request

Security
ApiKeyAuth
Query
namestring

exact matching filter on project name

last_idinteger(int32)

List projects whose ID is greater than this ID for pagination. Projects are returned in ascending order by ID.

countinteger(int32)

number of projects to return

name_patternstring

name pattern to be partially matched

curl -i -X GET \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects?name=string&last_id=0&count=0&name_pattern=string' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
projectsArray of objects(RestProject)
Response
application/json
{ "projects": [ {} ] }

Upload a project archive as a new project or a new revision of an existing project

Request

Security
ApiKeyAuth
Query
projectstringrequired

project name

revisionstringrequired

revision

schedule_fromstring

start scheduling of new workflows from the given time instead of current time

clear_scheduleArray of strings

clear_schedule

clear_schedule_allboolean

clear_schedule_all

Default false
Headers
Content-Lengthinteger(int64)
Bodyapplication/gziprequired

project archive data

string(binary)
curl -i -X PUT \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects?project=string&revision=string&schedule_from=string&clear_schedule=string&clear_schedule_all=false' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Length: 0' \
  -H 'Content-Type: application/gzip' \
  -d string

Responses

default response

Bodyapplication/json
archiveMd5string(byte)

MD5 of archive

Example: "ZGRJdysyQ3VjZXI2UUN1c1ZhRXdDUT09"
archiveTypestringrequired

archive type

Example: "s3"
createdAtstring(date-time)required

created time

Example: "2023-08-18T06:52:33Z"
deletedAtstring(date-time)

deleted time

Example: "2023-08-18T06:52:33Z"
idstringrequired

project ID

Example: "123456"
metadataArray of objects(RestProjectMetadata)

project metadata

namestringrequired

project name

Example: "project-a"
revisionstringrequired

revision

Example: "rev-20230101-1"
updatedAtstring(date-time)required

updated time

Example: "2023-08-18T06:52:33Z"
Response
application/json
{ "archiveMd5": "ZGRJdysyQ3VjZXI2UUN1c1ZhRXdDUT09", "archiveType": "s3", "createdAt": "2023-08-18T06:52:33Z", "deletedAt": "2023-08-18T06:52:33Z", "id": "123456", "metadata": [ {} ], "name": "project-a", "revision": "rev-20230101-1", "updatedAt": "2023-08-18T06:52:33Z" }

Delete a project

Request

Security
ApiKeyAuth
Path
idinteger(int32)required
curl -i -X DELETE \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects/{id}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
archiveMd5string(byte)

MD5 of archive

Example: "ZGRJdysyQ3VjZXI2UUN1c1ZhRXdDUT09"
archiveTypestringrequired

archive type

Example: "s3"
createdAtstring(date-time)required

created time

Example: "2023-08-18T06:52:33Z"
deletedAtstring(date-time)

deleted time

Example: "2023-08-18T06:52:33Z"
idstringrequired

project ID

Example: "123456"
metadataArray of objects(RestProjectMetadata)

project metadata

namestringrequired

project name

Example: "project-a"
revisionstringrequired

revision

Example: "rev-20230101-1"
updatedAtstring(date-time)required

updated time

Example: "2023-08-18T06:52:33Z"
Response
application/json
{ "archiveMd5": "ZGRJdysyQ3VjZXI2UUN1c1ZhRXdDUT09", "archiveType": "s3", "createdAt": "2023-08-18T06:52:33Z", "deletedAt": "2023-08-18T06:52:33Z", "id": "123456", "metadata": [ {} ], "name": "project-a", "revision": "rev-20230101-1", "updatedAt": "2023-08-18T06:52:33Z" }

Get a project

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

project id

curl -i -X GET \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects/{id}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
archiveMd5string(byte)

MD5 of archive

Example: "ZGRJdysyQ3VjZXI2UUN1c1ZhRXdDUT09"
archiveTypestringrequired

archive type

Example: "s3"
createdAtstring(date-time)required

created time

Example: "2023-08-18T06:52:33Z"
deletedAtstring(date-time)

deleted time

Example: "2023-08-18T06:52:33Z"
idstringrequired

project ID

Example: "123456"
metadataArray of objects(RestProjectMetadata)

project metadata

namestringrequired

project name

Example: "project-a"
revisionstringrequired

revision

Example: "rev-20230101-1"
updatedAtstring(date-time)required

updated time

Example: "2023-08-18T06:52:33Z"
Response
application/json
{ "archiveMd5": "ZGRJdysyQ3VjZXI2UUN1c1ZhRXdDUT09", "archiveType": "s3", "createdAt": "2023-08-18T06:52:33Z", "deletedAt": "2023-08-18T06:52:33Z", "id": "123456", "metadata": [ {} ], "name": "project-a", "revision": "rev-20230101-1", "updatedAt": "2023-08-18T06:52:33Z" }

Download a project archive file

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

project id

Query
revisionstringrequired

use a given revision of a project instead of the latest revision

direct_downloadboolean

enable returning direct download handle

curl -i -X GET \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects/{id}/archive?revision=string&direct_download=true' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

archive of files of a project.

List revisions of a project

Request

Security
ApiKeyAuth
Path
idinteger(int32)required
Query
last_idinteger(int32)

deprecated - do not use

namestring

revision name

curl -i -X GET \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects/{id}/revisions?last_id=0&name=string' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
revisionsArray of objects(RestRevision)
Response
application/json
{ "revisions": [ {} ] }

List schedules of a project with filters

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

project id

Query
workflowstring

exact matching filter on workflow name

last_idinteger(int32)

List schedules whose ID is greater than this ID for pagination. Schedules are returned in ascending order by ID.

curl -i -X GET \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects/{id}/schedules?workflow=string&last_id=0' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
schedulesArray of objects(RestSchedule)
Response
application/json
{ "schedules": [ {} ] }

List secret keys of a project

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

project id

curl -i -X GET \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects/{id}/secrets' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
secretsArray of objects(RestSecretMetadata)required

array of RestSecretMetadata "{ key: key1 }"

Example: "[{key: key1}, {key: key2}]"
secrets[].​keystringrequired

key name

Example: "td.apikey"
Response
application/json
{ "secrets": "[{key: key1}, {key: key2}]" }

Delete a secret from a project

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

project id

keystringrequired

secret key

curl -i -X DELETE \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects/{id}/secrets/{key}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

Treasure Workflow never returns content

Set a secret to a project

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

project id

keystringrequired

secret key

Bodyapplication/json
valuestringrequired

value of the secret

Example: "TD1 12345..."
curl -i -X PUT \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects/{id}/secrets/{key}' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "value": "TD1 12345..."
  }'

Responses

Treasure Workflow never returns content

List sessions of a project with filters

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

project id

Query
workflowstring

exact matching filter on workflow name

last_idinteger(int64)

List sessions whose ID is smaller than this ID for pagination. Sessions are returned in descending order by ID.

page_sizeinteger(int32)

number of sessions to return

curl -i -X GET \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects/{id}/sessions?workflow=string&last_id=0&page_size=0' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
sessionsArray of objects(RestSession)
Response
application/json
{ "sessions": [ {} ] }

List workflows of a project with filters

Request

Security
ApiKeyAuth
Path
idinteger(int32)required

project id

Query
revisionstringrequired

use a given revision of the project instead of the latest revision

namestring

exact matching filter on workflow name

curl -i -X GET \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects/{id}/workflows?revision=string&name=string' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
workflowsArray of objects(RestWorkflowDefinition)
Response
application/json
{ "workflows": [ {} ] }

getWorkflowByName

Request

Security
ApiKeyAuth
Path
idinteger(int32)required
namestringrequired
Query
revisionstring
curl -i -X GET \
  'https://docs.treasuredata.com/_mock/apis/workflow/api/projects/{id}/workflows/{name}?revision=string' \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>'

Responses

default response

Bodyapplication/json
configobject
idstringrequired

workflow definition ID

Example: "123456"
namestringrequired

workflow name

Example: "wf-123"
projectobject(IdAndName)required

Name and ID

project.​idstringrequired

ID

Example: "123456"
project.​namestringrequired

name

Example: "abcdefg"
revisionstringrequired

revision

timezonestringrequired

timezone

Example: "UTC"
Response
application/json
{ "config": {}, "id": "123456", "name": "wf-123", "project": { "id": "123456", "name": "abcdefg" }, "revision": "string", "timezone": "UTC" }

Schedule

Operations

Session

Operations

Workflow

Operations