Test
POST/projects/{projectId}/task-source/test
Call a task source with the same checks as saving it, without saving it, and return the request sent, the response received and the arrays of objects it holds, to build the mapping from. The mapping is optional here. An omitted authorization uses the stored one. Enterprise only, team admins only.
Body ParametersJSON
url: string
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
Test
curl https://api.cloud.scenario.com/v1/projects/$PROJECT_ID/task-source/test \
-H 'Content-Type: application/json' \
-u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \
-d '{
"method": "GET",
"url": "url"
}'{
"candidates": [
{
"count": 0,
"fields": [
{
"isIdCandidate": true,
"path": "path",
"sample": "sample"
}
],
"tasksPath": "tasksPath"
}
],
"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"
}
]
}Returns Examples
{
"candidates": [
{
"count": 0,
"fields": [
{
"isIdCandidate": true,
"path": "path",
"sample": "sample"
}
],
"tasksPath": "tasksPath"
}
],
"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"
}
]
}