Schedule

This endpoint is used to create, update, search or delete schedules for a particular workspace inside an organization, this is useful when you need to create schedule task or running jobs in a particular time.

Entity fields:

Path
Type
Description

data.type

string

Should be "template"

data.attributes.cron

string

Cron expression to schedule a job inside a workspace. For more information please visit Quartz documentation.

data.attributes.tcl

string

Terrakube configuration language in base64

data.attributes.templateReference

string

Terrakube template id

To better understand Terrakube Configuration Language job templates please refer to the following GitHub repository.

Example:

{
  "data": {
    "type": "schedule",
    "attributes": {
      "cron": "0 0/1 * * * ?",
      "tcl": "{{templateSample}}"
    }
  }
}

Supported Operations

get

Returns an instance of type schedule

Path parameters
workspaceIdanyRequired

workspace Identifier

scheduleIdanyRequired

schedule Identifier

Query parameters
Responses
200
Successful response
application/vnd.api+json
get
GET /api/v1/workspace/{workspaceId}/schedule/{scheduleId} HTTP/1.1
Host: 
Accept: */*
200

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": "text",
      "createdDate": "2025-06-27T09:02:03.693Z",
      "cron": "text",
      "description": "text",
      "enabled": true,
      "tcl": "text",
      "updatedBy": "text",
      "updatedDate": "2025-06-27T09:02:03.693Z"
    },
    "relationships": {
      "workspace": {
        "id": "text",
        "type": "workspace"
      }
    }
  },
  "included": [
    {
      "attributes": {},
      "id": "text",
      "relationships": {},
      "type": "text"
    }
  ]
}
post

Creates an item of type schedule and adds it to schedule

Path parameters
workspaceIdanyRequired

workspace Identifier

Body
Responses
201
Successful response
application/vnd.api+json
post
POST /api/v1/workspace/{workspaceId}/schedule HTTP/1.1
Host: 
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 297

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": "text",
      "createdDate": "2025-06-27T09:02:03.693Z",
      "cron": "text",
      "description": "text",
      "enabled": true,
      "tcl": "text",
      "updatedBy": "text",
      "updatedDate": "2025-06-27T09:02:03.693Z"
    },
    "relationships": {
      "workspace": {
        "id": "text",
        "type": "workspace"
      }
    }
  }
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": "text",
      "createdDate": "2025-06-27T09:02:03.693Z",
      "cron": "text",
      "description": "text",
      "enabled": true,
      "tcl": "text",
      "updatedBy": "text",
      "updatedDate": "2025-06-27T09:02:03.693Z"
    },
    "relationships": {
      "workspace": {
        "id": "text",
        "type": "workspace"
      }
    }
  }
}
delete

Deletes an instance of type schedule

Path parameters
workspaceIdanyRequired

workspace Identifier

scheduleIdanyRequired

schedule Identifier

Responses
204
Successful response
delete
DELETE /api/v1/workspace/{workspaceId}/schedule/{scheduleId} HTTP/1.1
Host: 
Accept: */*
204

Successful response

No content

patch

Modifies an instance of type schedule

Path parameters
workspaceIdanyRequired

workspace Identifier

scheduleIdanyRequired

schedule Identifier

Body
Responses
204
Successful response
patch
PATCH /api/v1/workspace/{workspaceId}/schedule/{scheduleId} HTTP/1.1
Host: 
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 297

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": "text",
      "createdDate": "2025-06-27T09:02:03.693Z",
      "cron": "text",
      "description": "text",
      "enabled": true,
      "tcl": "text",
      "updatedBy": "text",
      "updatedDate": "2025-06-27T09:02:03.693Z"
    },
    "relationships": {
      "workspace": {
        "id": "text",
        "type": "workspace"
      }
    }
  }
}
204

Successful response

No content

For a complete list of organization operation please visit the OpenAPI specification

Last updated

Was this helpful?