Task_callbacks

Lists all task callbacks.

get

API Key Scope: task_callbacks / index

Authorizations
Path parameters
task_idstringRequired

Numeric ID or name of task. Task names are not unique, it's recommanded to use numeric ID.

Query parameters
limitintegerOptional

The number of items to display for pagination.

offsetintegerOptional

The number of items to skip for pagination.

sort_bystring[]Optional

Sort results by attribute.

Can sort on multiple attributes, separated by |. Order direction can be suffixing the attribute by either :asc (default) or :desc.

idstringOptional

Filter on id

typestringOptional

Filter on type

scriptstringOptional

Filter on task callback script

Responses
200

List of task callbacks.

application/json
get
/tasks/{task_id}/task_callbacks
GET /api/v2/tasks/{task_id}/task_callbacks HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
200

List of task callbacks.

{
  "count": 1,
  "task_callbacks": [
    {
      "id": 1,
      "type": "filter",
      "script": "text"
    }
  ]
}

Creates a new task callback.

post

API Key Scope: task_callbacks / create

Authorizations
Path parameters
task_idstringRequired

Numeric ID or name of task. Task names are not unique, it's recommanded to use numeric ID.

Body
idinteger · int64Read-onlyOptional
typestring · enumOptionalPossible values:
scriptstringOptional
Responses
201

A specific task callback.

application/json
post
/tasks/{task_id}/task_callbacks
POST /api/v2/tasks/{task_id}/task_callbacks HTTP/1.1
Host: localhost
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "type": "filter",
  "script": "text"
}
{
  "id": 1,
  "type": "filter",
  "script": "text"
}

Displays a specific task callback.

get

API Key Scope: task_callbacks / show

Authorizations
Path parameters
task_idstringRequired

Numeric ID or name of task. Task names are not unique, it's recommanded to use numeric ID.

task_callback_idintegerRequired

Numeric ID of task callback.

Responses
200

A specific task callback.

application/json
get
/tasks/{task_id}/task_callbacks/{task_callback_id}
GET /api/v2/tasks/{task_id}/task_callbacks/{task_callback_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
200

A specific task callback.

{
  "id": 1,
  "type": "filter",
  "script": "text"
}

Updates a specific task callback.

put

API Key Scope: task_callbacks / update

Authorizations
Path parameters
task_idstringRequired

Numeric ID or name of task. Task names are not unique, it's recommanded to use numeric ID.

task_callback_idintegerRequired

Numeric ID of task callback.

Body
idinteger · int64Read-onlyOptional
typestring · enumOptionalPossible values:
scriptstringOptional
Responses
200

A specific task callback.

application/json
put
/tasks/{task_id}/task_callbacks/{task_callback_id}
PUT /api/v2/tasks/{task_id}/task_callbacks/{task_callback_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "type": "filter",
  "script": "text"
}
{
  "id": 1,
  "type": "filter",
  "script": "text"
}

Destroys a specific task callback.

delete

API Key Scope: task_callbacks / destroy

Authorizations
Path parameters
task_idstringRequired

Numeric ID or name of task. Task names are not unique, it's recommanded to use numeric ID.

task_callback_idintegerRequired

Numeric ID of task callback.

Responses
204

Task callback destroyed.

No content

delete
/tasks/{task_id}/task_callbacks/{task_callback_id}
DELETE /api/v2/tasks/{task_id}/task_callbacks/{task_callback_id} HTTP/1.1
Host: localhost
Authorization: Basic username:password
Accept: */*
204

Task callback destroyed.

No content

Last updated

Was this helpful?