curl --request POST \
--url https://app.octomind.dev/api/apiKey/v2/execute \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"testTargetId": "2e2bb27b-a19c-47ce-a9b6-cd1bd31622dc",
"url": "https://example.com",
"context": {
"source": "github",
"issueNumber": 123,
"ref": "refs/heads/main",
"sha": "abc123def456",
"repo": "my-repo",
"owner": "repo-owner",
"triggeredBy": {
"type": "USER",
"userId": "user123"
},
"nodeId": "node-123"
},
"environmentName": "default",
"variablesToOverwrite": {
"SPACE_ID": [
"64ee32b4-7365-47a6-b5b0-2903b6ad849d"
]
},
"tags": [
"tag1",
"tag2"
]
}'
{
"testReportUrl": "https://app.octomind.dev/testreports/826c15af-644b-4b28-89b4-f50ff34e46b7",
"testReport": {
"id": "826c15af-644b-4b28-89b4-f50ff34e46b7",
"testTargetId": "3435918b-3d29-4ebd-8c68-9a540532f45a",
"createdAt": "2024-09-06T13:01:51.686Z",
"updatedAt": "2024-09-06T13:01:51.686Z",
"executionUrl": "https://en.wikipedia.org/",
"status": "WAITING",
"context": {
"source": "manual",
"description": "manual trigger",
"triggeredBy": {
"type": "USER",
"userId": "2e2bb27b-a19c-47ce-a9b6-cd1bd31622dc"
}
},
"testResults": [
{
"id": "826c15af-644b-4b28-89b4-f50ff34e46b7",
"testTargetId": "3435918b-3d29-4ebd-8c68-9a540532f45a",
"testCaseId": "5b844cf1-d597-4048-9e74-7c0f9ce3e2ee",
"createdAt": "2024-09-06T13:01:51.686Z",
"updatedAt": "2024-09-06T13:01:51.686Z",
"status": "WAITING",
"errorMessage": "TimeoutError: locator.click: Timeout 30000ms exceeded.",
"traceUrl": "https://storage.googleapis.com/automagically-traces/826c15af-644b-4b28-89b4-f50ff34e46b7-trace.zip"
}
]
}
}
This endpoint triggers a test execution by sending an test target id, an URL and optionally tags, an environment and variables.
curl --request POST \
--url https://app.octomind.dev/api/apiKey/v2/execute \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"testTargetId": "2e2bb27b-a19c-47ce-a9b6-cd1bd31622dc",
"url": "https://example.com",
"context": {
"source": "github",
"issueNumber": 123,
"ref": "refs/heads/main",
"sha": "abc123def456",
"repo": "my-repo",
"owner": "repo-owner",
"triggeredBy": {
"type": "USER",
"userId": "user123"
},
"nodeId": "node-123"
},
"environmentName": "default",
"variablesToOverwrite": {
"SPACE_ID": [
"64ee32b4-7365-47a6-b5b0-2903b6ad849d"
]
},
"tags": [
"tag1",
"tag2"
]
}'
{
"testReportUrl": "https://app.octomind.dev/testreports/826c15af-644b-4b28-89b4-f50ff34e46b7",
"testReport": {
"id": "826c15af-644b-4b28-89b4-f50ff34e46b7",
"testTargetId": "3435918b-3d29-4ebd-8c68-9a540532f45a",
"createdAt": "2024-09-06T13:01:51.686Z",
"updatedAt": "2024-09-06T13:01:51.686Z",
"executionUrl": "https://en.wikipedia.org/",
"status": "WAITING",
"context": {
"source": "manual",
"description": "manual trigger",
"triggeredBy": {
"type": "USER",
"userId": "2e2bb27b-a19c-47ce-a9b6-cd1bd31622dc"
}
},
"testResults": [
{
"id": "826c15af-644b-4b28-89b4-f50ff34e46b7",
"testTargetId": "3435918b-3d29-4ebd-8c68-9a540532f45a",
"testCaseId": "5b844cf1-d597-4048-9e74-7c0f9ce3e2ee",
"createdAt": "2024-09-06T13:01:51.686Z",
"updatedAt": "2024-09-06T13:01:51.686Z",
"status": "WAITING",
"errorMessage": "TimeoutError: locator.click: Timeout 30000ms exceeded.",
"traceUrl": "https://storage.googleapis.com/automagically-traces/826c15af-644b-4b28-89b4-f50ff34e46b7-trace.zip"
}
]
}
}
Test executed successfully
The response is of type object
.