POST https://api.getpostman.com/monitors/{{monitor_uid}}/run
This endpoint will run the monitor instantly and wait for the monitor to run completely. It responds with the run results. Requires API Key as
X-Api-Key
request header or apikey
URL query parameter.
Body
PARAM
Key | Datatype | Required | Description |
HEADERS
Key | Datatype | Required | Description |
RESPONSES
status OK
{
"run": {
"info": {
"jobId": "1e6ba2e3-1aaf-4c10-bd5f-905943284b2a",
"monitorId": "1e6b8970-fd13-4480-b011-b3b3e3cd271d",
"name": "Sample Collection monitor 1 #56",
"collectionUid": "5852-1d3daef4-2037-4584-ab86-bafd8c8f8a55",
"status": "failed",
"startedAt": "2016-12-04T14:30:25.000Z",
"finishedAt": "2016-12-04T14:30:26.000Z"
},
"stats": {
"assertions": {
"total": 1,
"failed": 1
},
"requests": {
"total": 3,
"failed": 1
}
},
"executions": [
{
"id": 1,
"item": {
"id": "b5e8d7dd-909c-4ba7-aef4-8609bc50b586",
"name": "Sample POST Request"
},
"request": {
"method": "POST",
"url": "echo.getpostman.com/post",
"headers": {
"content-type": "application/json",
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"content-length": 18
},
"body": {
"contentLength": 18,
"mode": "raw"
},
"timestamp": "2016-12-04T14:30:26.025Z"
},
"response": {
"code": 200,
"body": {
"contentLength": 298
},
"responseTime": 26,
"responseSize": 298,
"headers": {
"date": "Sun, 04 Dec 2016 14:30:26 GMT",
"content-type": "application/json",
"transfer-encoding": "chunked",
"connection": "keep-alive",
"content-encoding": "gzip"
}
}
},
{
"id": 2,
"item": {
"id": "f790d046-755d-44f5-a416-b825e18dfd9d",
"name": "Sample GET Request"
},
"request": {
"method": "GET",
"url": "echo.getpostman.com/get",
"headers": {
"accept": "*/*",
"accept-encoding": "gzip, deflate"
},
"body": {
"contentLength": 0,
"mode": "formdata"
},
"timestamp": "2016-12-04T14:30:26.093Z"
},
"response": {
"code": 200,
"body": {
"contentLength": 280
},
"responseTime": 46,
"responseSize": 280,
"headers": {
"date": "Sun, 04 Dec 2016 14:30:26 GMT",
"content-type": "application/json",
"transfer-encoding": "chunked",
"connection": "keep-alive",
"content-encoding": "gzip"
}
},
"assertions": {
"Status code is 400": false
}
},
{
"id": 3,
"item": {
"id": "336e6e17-6d3e-4b8f-a48f-b7e75cf13afb",
"name": "This is the second request"
},
"request": {
"method": "POST",
"url": "echo.getpostman.com/post",
"headers": {
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"content-length": 18
},
"body": {
"contentLength": 0,
"mode": "formdata"
},
"timestamp": "2016-12-04T14:30:26.477Z"
},
"response": {
"code": 200,
"body": {
"contentLength": 345
},
"responseTime": 9,
"responseSize": 345,
"headers": {
"date": "Sun, 04 Dec 2016 14:30:26 GMT",
"content-type": "application/json",
"transfer-encoding": "chunked",
"connection": "keep-alive",
"content-encoding": "gzip"
}
}
}
],
"failures": [
{
"executionId": 2,
"name": "AssertionError",
"message": "Expected 'Status code is 400' to be truthy",
"assertion": {
"Status code is 400": false
}
}
]
}
} |
ENDPOINTS