Publish a chain#

Description#

Publishes the chain specified by the chain_id.

POST /v1/chains/{chain_id}/publish

Parameters#

Parameter

In

Type

Required

Description

chain_id

path

string

true

The ID of the Chain.

publish_comment

body

string

false

Optional publish comment

Body parameter example#

{
  "publish_comment": "string"
}

Code Samples#

curl -X POST https://h.app.wdesk.com/s/wdata/oc/api/v1/chains/{chain_id}/publish \
    -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/chains/{chain_id}/publish \
    Content-Type:application/json \
    Accept:application/json \
    Authorization:"Bearer {access-token}"
wget --method=POST "https://h.app.wdesk.com/s/wdata/oc/api/v1/chains/{chain_id}/publish" \
    --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/chains/{chain_id}/publish', headers = headers)

print(r.json())

print(r.json())

Returns#

200 - OK#

Returns a ChainResponse containing the newly published Chain.

201 - Created. The chain was successfully published, but the underlying service failed to get the chain metadata.#

Returns a ChainResponse containing a CreatedWithErrorResponse.

Example Responses#

{
  "data": {
    "id": "1",
    "internal_id": 0,
    "name": "List File Content",
    "description": "",
    "created_at": "2018-03-14 20:10:39.520585",
    "updated_at": "2018-03-14 20:10:39.520585",
    "disabled": true,
    "concurrency_enabled": false,
    "runtime_inputs": [
      {
        "vuid": "data.chain.45072337-72ee-4c52-9428-0b2ae21ac73c",
        "data_type": "string"
      }
    ],
    "schedules": [
      {
        "enabled": true,
        "start_at": "2019-02-08 06:25:00",
        "end_at": "2019-02-08 06:25:00",
        "properties": {
          "days_of_month": [
            "15",
            "30"
          ],
          "days_of_week": [],
          "recurring_interval": 1,
          "recurring_type": "monthly",
          "run_at_hours": 10,
          "run_at_minutes": 1,
          "run_at_seconds": 0,
          "stop_at_hours": null,
          "stop_at_minutes": null,
          "zone": "America/New_York"
        }
      }
    ]
  }
}
{
  "data": {
    "message": "Operation succeeded, but an additional request failed. A location header with the resource URL is provided.",
    "id": "1",
    "url": "https://{appspot}/v1/metadata/environment/{environment_id}/chain/{chain_id}"
  }
}
No example available