Update
projects.task_source.update(strproject_id, TaskSourceUpdateParams**kwargs) -> TaskSourceUpdateResponse
PUT/projects/{projectId}/task-source
Create or replace the project’s task source. Scenario calls the endpoint first and saves it only if the response holds tasks it can read with the mapping. The Authorization value is stored encrypted; null removes it. Enterprise only, team admins only.
Parameters
url: str
https URL of the task source. It may contain the placeholders
{user.email}, {user.id} and {project.id}, replaced on each call.
Never put a credential in it: only authorization is stored as a secret.
maxLength4096
Update
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.update(
project_id="projectId",
mapping={
"id": "x",
"tasks_path": "tasksPath",
},
method="GET",
url="url",
)
print(task_source.exchange){
"exchange": {
"request": {
"headers": {
"foo": "string"
},
"method": "GET",
"url": "url",
"body": "body"
},
"durationMs": 0,
"response": {
"body": "body",
"headers": {
"foo": "string"
},
"status": 0,
"isBodyTruncated": true
}
},
"tasks": [
{
"id": "id",
"name": "name",
"status": "status"
}
],
"taskSource": {
"hasAuthorization": true,
"mapping": {
"id": "x",
"tasksPath": "tasksPath",
"name": "x",
"status": "x"
},
"method": "GET",
"url": "url",
"body": "body",
"parameters": {
"foo": "string"
}
}
}Returns Examples
{
"exchange": {
"request": {
"headers": {
"foo": "string"
},
"method": "GET",
"url": "url",
"body": "body"
},
"durationMs": 0,
"response": {
"body": "body",
"headers": {
"foo": "string"
},
"status": 0,
"isBodyTruncated": true
}
},
"tasks": [
{
"id": "id",
"name": "name",
"status": "status"
}
],
"taskSource": {
"hasAuthorization": true,
"mapping": {
"id": "x",
"tasksPath": "tasksPath",
"name": "x",
"status": "x"
},
"method": "GET",
"url": "url",
"body": "body",
"parameters": {
"foo": "string"
}
}
}