Leapwork Documentation
Get Run Item By Id
Description
The 'Get Run Item By Id' endpoint returns detailed information about the run of a flow in a schedule. The run of the flow (RunItem) is identified by the Id of the run item.
The Run Item ID can be fetched from the Response Body of the Get Run Items Id by Run Id endpoint.
Request URL
http://{controllerMachine}:{controllerPort}/api/v4/runItems/{runItemId}
Input parameters
Field | Type | Description | Comment |
---|---|---|---|
runItemId | string | The runItemId is a unique Id for the individual run instance of a flow in a run | The runItemId can be fetched from the Response Body of the Get Run Items Id by Run Id endpoint |
Examples
Curl
curl -X GET --header 'Accept: application/json' --header 'AccessKey: Mo87Nc4qDAtzJNDb' 'http://{controllerMachine}:{controllerPort}/api/v4/runItems/28519a47-7c28-425f-9d6f-5eeab722166e'
PowerShell
$headers = @{}
$headers.Add("AccessKey","Mo87Nc4qDAtzJNDb")
Invoke-WebRequest -Uri "http://{controllerMachine}:{controllerPort}/api/v4/runItems/28519a47-7c28-425f-9d6f-5eeab722166e" -ContentType "application/json" -Headers $headers -Method GET
Response
{ "$id": "1", "RunItemId": "8d329bd0-698f-4900-8bad-ffa584d4461b", "RunId": "a3af0714-444c-44bd-ac0b-10a12bd0e44a", "FlowInfo": { "FlowId": "793602fa-3131-4844-930e-52af8635dcff", "FlowTitle": "Password Reset Test", "Status": "Pass" }, "AgentInfo": { "AgentId": "7dbf7cb6-d5df-4f46-8e16-9bd31238c00a", "EnvironmentTitle": "Remote Agent", "ConnectionType": "RemoteAgent" }, "Elapsed": "00:00:24.9951204", "ElapsedMilliseconds": 24995.1204, "ElapsedSeconds": 24.995120399999998 "CreatedAt": "2020-03-26T13:35:45.4314608+00:00", "RunType": "Manual" } |
Response object
Fields | Type | Description | Values |
---|---|---|---|
$id | string | ID of internal object | |
runItemId | string | ID of Run Item | |
RunId | string | ID of Run | |
FlowInfo | FlowIntegrationInfo | ||
FlowIntegrationInfo | Object | Object holds values for FlowIntegrationInfo | |
FlowId | string | Id of the flow | |
FlowTitle | string | Title of the flow | |
Status | string | Status of execution | 'NoStatus', 'Initializing', 'Connecting', 'Connected', 'Running', 'Passed', 'Failed', 'Timeout', 'Inconclusive', 'Cancelled', 'Error', 'Done' |
Agent | AgentInfo | ||
AgentInfo | Object | Object holds values for AgentInfo | |
AgentId | string | Id of the execution Agent | |
EnvironmentTitle | string | Title of the execution Agent | |
ConnectionType | string | Type of the execution Agent | 'RemoteAgent', 'Local', 'SauceLabs', 'SeleniumGrid', 'BrowserStack' |
Elapsed | string | Total time of flow execution | |
ElapsedMilliseconds | number | Total time of flow execution in milliseconds | |
ElapsedSeconds | number | Total time of flow execution in seconds | |
Timestamp | datetime | Time stamp | |
Status | string | Run output Error/Pass/Fail |
Response Code
200 (OK)
404 (Not Found)
401 (Unauthorized)
400 (Bad Request)
405 (Method Not Allowed)
500 (Internal Server Error)