Skip to content
Get started

Retrieve

projects.task_source.retrieve(strproject_id) -> TaskSourceRetrieveResponse
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.

ParametersExpand Collapse
project_id: str
ReturnsExpand Collapse
class TaskSourceRetrieveResponse: …
task_source: TaskSource

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

has_authorization: bool

Whether an Authorization header value is stored

mapping: TaskSourceMapping

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

id: str

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
tasks_path: str

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[str]

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

maxLength256
minLength1
status: Optional[str]

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

maxLength256
minLength1
method: Literal["GET", "POST"]

HTTP method used to call the task source

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

https URL of the task source

body: Optional[str]

JSON body sent with POST

parameters: Optional[Dict[str, str]]

Query string parameters sent to the task source

Retrieve

import os
from scenario_sdk import Scenario

client = Scenario(
    api_key=os.environ.get("SCENARIO_SDK_API_KEY"),  # This is the default and can be omitted
    api_secret=os.environ.get("SCENARIO_SDK_API_SECRET"),  # This is the default and can be omitted
)
task_source = client.projects.task_source.retrieve(
    "projectId",
)
print(task_source.task_source)
{
  "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"
    }
  }
}