Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Run Trigger

Links two workspaces so that an apply in the source queues a run in the destination. See Run Triggers.

Entity fields:

Path
Type
Description

data.type

string

Should be "runTrigger"

data.attributes.enabled

boolean

Disabled triggers are kept but never fire (default true)

data.relationships.sourceWorkspace.data

object

Workspace whose apply fires the trigger. Cannot be changed after creation

data.relationships.destinationWorkspace.data

object

Workspace that receives the run. Cannot be changed after creation

data.relationships.template.data

object

Template to run in the destination (OPTIONAL, defaults to the workspace's default template)

Example:

{
  "data": {
    "type": "runTrigger",
    "attributes": { "enabled": true },
    "relationships": {
      "sourceWorkspace": { "data": { "type": "workspace", "id": "{{sourceWorkspaceId}}" } },
      "destinationWorkspace": { "data": { "type": "workspace", "id": "{{destinationWorkspaceId}}" } }
    }
  }
}

A trigger that would create a loop is rejected with the offending path in the error. To list both directions for a workspace, filter with sourceWorkspace.id==X,destinationWorkspace.id==X (a comma is OR).

Supported Operations

get

Returns the collection of type runTrigger

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
filter[runTrigger]stringOptional

Filters the collection of runTrigger using a 'disjoint' RSQL expression

filterstringOptional

Filters the collection of runTrigger using a 'joined' RSQL expression

page[number]integer · int32Optional

Number of pages to return. Can be used with page[size]

page[size]integer · int32Optional

Number of elements per page. Can be used with page[number]

page[offset]integer · int32Optional

Offset from 0 to start paginating. Can be used with page[limit]

page[limit]integer · int32Optional

Maximum number of items to return. Can be used with page[offset]

page[totals]stringOptional

For requesting total pages/records be included in the response page meta data

Responses
200

Successful response

application/vnd.api+json
get/runTrigger
GET /api/v1/runTrigger HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

{
  "data": [
    {
      "type": "text",
      "id": "text",
      "attributes": {
        "createdBy": null,
        "createdDate": null,
        "enabled": null,
        "updatedBy": null,
        "updatedDate": null
      },
      "relationships": {
        "destinationWorkspace": {
          "data": [
            null
          ]
        },
        "sourceWorkspace": {
          "data": [
            null
          ]
        },
        "template": {
          "data": [
            null
          ]
        }
      }
    }
  ],
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
post

Creates an item of type runTrigger

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
Responses
201

Successful response

application/vnd.api+json
post/runTrigger
POST /api/v1/runTrigger HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 332

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "enabled": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "destinationWorkspace": {
        "data": [
          null
        ]
      },
      "sourceWorkspace": {
        "data": [
          null
        ]
      },
      "template": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
201

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "enabled": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "destinationWorkspace": {
        "data": [
          null
        ]
      },
      "sourceWorkspace": {
        "data": [
          null
        ]
      },
      "template": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
get

Returns an instance of type runTrigger

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
runTriggerIdstringRequired

runTrigger Identifier

Query parameters
Responses
200

Successful response

application/vnd.api+json
get/runTrigger/{runTriggerId}
GET /api/v1/runTrigger/{runTriggerId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful response

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "enabled": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "destinationWorkspace": {
        "data": [
          null
        ]
      },
      "sourceWorkspace": {
        "data": [
          null
        ]
      },
      "template": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
patch

Modifies an instance of type runTrigger

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
runTriggerIdstringRequired

runTrigger Identifier

Body
Responses
204

Successful response

No content

patch/runTrigger/{runTriggerId}
PATCH /api/v1/runTrigger/{runTriggerId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 332

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "createdBy": null,
      "createdDate": null,
      "enabled": null,
      "updatedBy": null,
      "updatedDate": null
    },
    "relationships": {
      "destinationWorkspace": {
        "data": [
          null
        ]
      },
      "sourceWorkspace": {
        "data": [
          null
        ]
      },
      "template": {
        "data": [
          null
        ]
      }
    }
  },
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
204

Successful response

No content

delete

Deletes an instance of type runTrigger

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
runTriggerIdstringRequired

runTrigger Identifier

Responses
204

Successful response

No content

delete/runTrigger/{runTriggerId}
DELETE /api/v1/runTrigger/{runTriggerId} HTTP/1.1
Host: terrakube-api.example.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
204

Successful response

No content

Last updated

Was this helpful?