Search previous chain runs#
Description#
Returns a list of all previous chain runs that match the provided criteria. The environment IDs specify which environments should be searched for the chain run. The chain IDs specify which specific chains should be returned. The state specified returns only those chains that are in that state (e.g. “completed”). If a cursor is provided, the corresponding page will be returned.
GET /v1/execute/chain_run/search
Parameters#
Parameter |
In |
Type |
Required |
Description |
|---|---|---|---|---|
environment_id |
query |
array[string] |
false |
The ID(s) of the Environments to search. Not required for superusers or company admins. |
chain_id |
query |
array[string] |
false |
The ID(s) of the Chains to return. |
start_date |
query |
string |
false |
Start Date (Unix timestamp). |
end_date |
query |
string |
false |
End Date (Unix timestamp). |
state |
query |
string |
false |
The state of the Chain Run. |
sort |
query |
string |
false |
Sort direction (by date). |
cursor |
query |
string |
false |
Cursor value returned from the API, indicating page information. |
Enumerated Values#
Parameter |
Value |
|---|---|
state |
|
state |
|
state |
|
state |
|
state |
|
state |
|
sort |
|
sort |
|
Code Samples#
curl -X GET https://h.app.wdesk.com/s/wdata/oc/api/v1/execute/chain_run/search \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http GET https://h.app.wdesk.com/s/wdata/oc/api/v1/execute/chain_run/search \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=GET "https://h.app.wdesk.com/s/wdata/oc/api/v1/execute/chain_run/search" \
--output-document - \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('https://h.app.wdesk.com/s/wdata/oc/api/v1/execute/chain_run/search', headers = headers)
print(r.json())
Returns#
200 - OK#
Returns a ChainRunPageResponse containing the ChainRunPage object based on search filters.
Example Responses#
{
"data": {
"cursor": "string",
"chainExecutors": [
{
"id": "1",
"chainId": "37",
"envId": "1154",
"userId": "5",
"userName": "dev23",
"startAt": "2019-02-08 06:25:00",
"endAt": "2019-02-12 06:25:00",
"pausedAt": "2019-02-12 06:25:00",
"resumedAt": "2019-02-12 06:25:00",
"state": "sleeping",
"launchType": "manual",
"resultText": "success"
}
]
}
}