Description
Starts a chain run for a specific chain in an environment, specified by the Chain and Environment ID.
POST
/v1/execute/environment/{environment_id}/chain/{chain_id}/start
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
environment_id | path | string | true | The ID of the Environment. |
chain_id | path | string | true | The ID of the Chain. |
runtimeVariables | body | RuntimeVariables | false | |
» additionalProperties | body | any | false |
Body parameter example
{
"runtimeVariables": {
"variableName": "variableValue"
}
}
Code Samples
curl -X POST https://h.app.wdesk.com/s/wdata/oc/api/v1/execute/environment/{environment_id}/chain/{chain_id}/start \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http POST https://h.app.wdesk.com/s/wdata/oc/api/v1/execute/environment/{environment_id}/chain/{chain_id}/start \
Content-Type:application/json \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=POST "https://h.app.wdesk.com/s/wdata/oc/api/v1/execute/environment/{environment_id}/chain/{chain_id}/start" \
--output-document - \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('https://h.app.wdesk.com/s/wdata/oc/api/v1/execute/environment/{environment_id}/chain/{chain_id}/start', headers = headers)
print(r.json())
Returns
200 - OK
Returns a ChainRunResponse
containing the ChainRun
object for the newly executed chain.
Example Responses
{
"data": {
"id": "1",
"chainId": "37010",
"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"
}
}