Create Trigger Key

Create a new trigger key.

Requires the pipelines-manage permission.

query
  • include

    Accepted Values: creatorsname

  • sort

    Sorts can be performed on any field - see sorting

  • filter

    Collections of resources can be filtered based on certain criteria - see filtering 

values
  • name
    string

    A name for the trigger key resource.

  • ips
    string | null

    An array of ips from which this trigger key can be used.

Returns

Returns an source resource, otherwise returns an Error.

POST /v1/pipelines/5b9c2a77b6393d0001eb45fd/keys

Example Request
$ curl https://api.cycle.io/v1/pipelines/5b9c2a77b6393d0001eb45fd/keys \
-H
"Authorization: Bearer API_KEY"
\
-H
"X-Hub-Id: HUB_ID"
\
-H "Content-Type: application/json" \
-d '{"name":"Demo Name","ips":null}' \
-X POST
Example Response
{
"data": {
"id": "5ccc2a2226393d1231eb4abd",
"name": "Demo Name",
"secret": "secret_yaaaCgEabUXnZYcccTaQWTnWYE333DQw1111ZQ2UAUHEEEio6BNqc8888888",
"creator": {
"type": "account",
"id": "5b9c2a77b6393d0001eb45fd"
},
"hub_id": "5a232a77b6393d0001ac2df2",
"pipeline_id": "5fff2a77b6393d0001eb3333",
"state": {
"changed": "2021-01-11T18:00:44.952Z",
"current": "live"
},
"events": {
"created": "2021-01-11T18:00:44.952Z",
"updated": "0001-01-01T00:00:00Z",
"deleted": "0001-01-01T00:00:00Z"
},
"ips": [
"11.22.33.44"
]
}
}