Terrakube
2.18.0
2.18.0
  • Introduction
  • Updates
  • Getting started
    • ๐Ÿ“Architecture
    • ๐Ÿ”Security
    • ๐Ÿš€Getting Started
    • ๐Ÿ’ฟDocker Images
    • ๐ŸŒDocker Compose
    • ๐Ÿ“ฅDeployment
      • ๐Ÿ”จHelm Chart
      • ๐Ÿš€Minikube
      • ๐Ÿ”‘Minikube + HTTPS
      • โœˆ๏ธIngress Configuration
      • ๐Ÿ”User Authentication (DEX)
      • ๐Ÿ’พStorage backend
        • Azure Storage Account
        • Amazon Cloud Storage
        • Google Cloud Storage
        • Minio (S3 compatible)
      • ๐Ÿ›ฐ๏ธDatabase Backend
        • SQL Azure
        • PostgreSQL
        • MySQL
        • H2
      • ๐Ÿ”Custom CA Certs
      • โš™๏ธCustom Terraform CLI Builds
      • ๐Ÿ›ก๏ธToken Security
      • ๐ŸšฆOpen Telemetry
    • ๐ŸคตUser Management
      • Azure Active Directory
      • Google Cloud Identity
      • Amazon Cognito
      • Github
  • ๐Ÿ““User Guide
    • Organizations
      • Creating an Organization
      • Global Variables
      • Team Management
      • API Tokens
      • Templates
        • Default Templates
        • Persistent Context
        • Import Templates
        • UI Templates
        • Filter gloval variables in jobs
        • Template Scheduling in Jobs
      • Tags
    • VCS Providers
      • Github
      • Github Enterprise
      • GitLab
      • Gitlab EE and CE
      • Bitbucket
      • Azure DevOps
      • SSH
    • Workspaces
      • Overview
      • Creating Workspaces
      • Terraform State
      • Share Workspace State
      • Variables
      • Workspace scheduler
      • API-driven Workflow
      • CLI-driven Workflow
      • Ephemeral Workspaces
    • Private Registry
      • Publishing Private Modules
      • Using Private Modules
    • Policy Enforcement (OPA)
    • Cost Estimation
    • Drift Detection
    • CI/CD Integration
      • Github Actions
      • Bitbucket
    • Terrakube CLI
      • Getting started
      • Installation
      • Commands
        • terrakube login
        • terrakube logout
        • terrakube organization
          • organization list
          • organization create
          • organization update
          • organization delete
        • terrakube team
          • team list
          • team create
          • team update
          • team delete
        • terrakube workspace
          • workspace list
          • workspace create
          • workspace update
          • workspace delete
          • workspace variable
            • variable list
        • terrakube variable
          • variable update
          • variable delete
          • variable create
        • terrakube job
          • job list
          • job create
        • terrakube module
          • module list
          • module create
          • module update
          • module delete
    • Reference
      • Executor
        • Terraform Execution Flow
        • Terraform Versions
    • Migrating to Terrakube
  • ๐ŸŽ“Learn
    • What is Terrakube
      • Section Overview
      • Terraform in a Nutshell
      • Terraform Challenges at Enterprise Level
      • Introducing Terrakube
      • Summary and Up Next
    • Deploying using Terrakube
  • ๐Ÿ“–API
    • ๐ŸŒŸGetting started
    • โš™๏ธMethods
      • Globalvar
      • Organization
      • Teams
      • Workspace
      • Variables
      • History
      • Jobs
      • Template
      • Schedule
      • Step
      • Module
      • Vcs
      • Provider
      • Personal Access Token
      • Team API Tokens
      • SSH Key
Powered by GitBook
On this page
  1. API
  2. Methods

Schedule

PreviousTemplateNextStep

Last updated 1 year ago

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

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

Example:

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

Supported Operations

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

For a complete list of organization operation please visit the

๐Ÿ“–
โš™๏ธ
GitHub repository.
OpenAPI specification
Quartz documentation
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-05-09T05:35:55.400Z",
      "cron": "text",
      "description": "text",
      "enabled": true,
      "tcl": "text",
      "updatedBy": "text",
      "updatedDate": "2025-05-09T05:35:55.400Z"
    },
    "relationships": {
      "workspace": {
        "id": "text",
        "type": "workspace"
      }
    }
  },
  "included": [
    {
      "attributes": {},
      "id": "text",
      "relationships": {},
      "type": "text"
    }
  ]
}
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

  • Entity fields:
  • Example:
  • Supported Operations
  • GET/workspace/{workspaceId}/schedule/{scheduleId}
  • POST/workspace/{workspaceId}/schedule
  • DELETE/workspace/{workspaceId}/schedule/{scheduleId}
  • PATCH/workspace/{workspaceId}/schedule/{scheduleId}
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-05-09T05:35:55.400Z",
      "cron": "text",
      "description": "text",
      "enabled": true,
      "tcl": "text",
      "updatedBy": "text",
      "updatedDate": "2025-05-09T05:35:55.400Z"
    },
    "relationships": {
      "workspace": {
        "id": "text",
        "type": "workspace"
      }
    }
  }
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": "text",
      "createdDate": "2025-05-09T05:35:55.400Z",
      "cron": "text",
      "description": "text",
      "enabled": true,
      "tcl": "text",
      "updatedBy": "text",
      "updatedDate": "2025-05-09T05:35:55.400Z"
    },
    "relationships": {
      "workspace": {
        "id": "text",
        "type": "workspace"
      }
    }
  }
}
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-05-09T05:35:55.400Z",
      "cron": "text",
      "description": "text",
      "enabled": true,
      "tcl": "text",
      "updatedBy": "text",
      "updatedDate": "2025-05-09T05:35:55.400Z"
    },
    "relationships": {
      "workspace": {
        "id": "text",
        "type": "workspace"
      }
    }
  }
}
204

Successful response

No content