Skip to content
Get started

Retrieve

GET/projects/{projectId}/task-source

Get the project’s task source: the endpoint that lists the tasks of the team’s task tracker. The Authorization header value is never returned. Team admins only.

Path ParametersExpand Collapse
projectId: string
ReturnsExpand Collapse
taskSource: object { hasAuthorization, mapping, method, 3 more }

A project’s task source. The Authorization header value is never returned.

hasAuthorization: boolean

Whether an Authorization header value is stored

mapping: object { id, tasksPath, name, status }

Where the tasks sit in the response, and which fields to read

id: string

Field of each task that holds its id (example: “code”). The id must be 1 to 256 printable ASCII characters; a number is converted to a string.

maxLength256
minLength1
tasksPath: string

Dot-separated path to the array of tasks in the response (example: “data.items”). An empty string means the response is the array itself.

maxLength256
name: optional string

Field of each task that holds its name (example: “title”)

maxLength256
minLength1
status: optional string

Field of each task that holds its status (example: “state”)

maxLength256
minLength1
method: "GET" or "POST"

HTTP method used to call the task source

One of the following:
"GET"
"POST"
url: string

https URL of the task source

body: optional string

JSON body sent with POST

parameters: optional map[string]

Query string parameters sent to the task source

Retrieve

curl https://api.cloud.scenario.com/v1/projects/$PROJECT_ID/task-source \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET"
{
  "taskSource": {
    "hasAuthorization": true,
    "mapping": {
      "id": "x",
      "tasksPath": "tasksPath",
      "name": "x",
      "status": "x"
    },
    "method": "GET",
    "url": "url",
    "body": "body",
    "parameters": {
      "foo": "string"
    }
  }
}
Returns Examples
{
  "taskSource": {
    "hasAuthorization": true,
    "mapping": {
      "id": "x",
      "tasksPath": "tasksPath",
      "name": "x",
      "status": "x"
    },
    "method": "GET",
    "url": "url",
    "body": "body",
    "parameters": {
      "foo": "string"
    }
  }
}