Add a Pipeline to a resource
resource_id*integerThe resource ID.
1 <= valueresource_type*stringThe resource type to add a pipeline to.
Accept*stringapplication/json
Content-Type*stringapplication/json
A JSON object containing the resource data
application/json- body
name*stringThe pipeline's name. Must be at least 3 characters. Must not be greater than 80 characters.
operation*stringThe resource operation associated to the pipeline. Must not be greater than 20 characters.
max_parallel_actions?integerMaximum number of actions that can run in parallel for this pipeline. 0 means no limit of simultaneous actions. 1 means just a single action will be started at a time to run this pipeline. Must be between 0 and 10.
trigger_when?|nullCreated
application/json- response
id*integerThe unique ID of the given pipeline
name*stringThe pipeline's name
environment_id*integerID of the environment this pipeline belongs to
project_id*integerID of the project this pipeline belongs to
organization_id*integerID of the organization this pipeline belongs to
resource_type*ResourceTypeType of an infrastructure resource managed through a Devopness environment.
"application""credential""cronjob""daemon""deployment""network""network-rule""server""service""ssh-key""ssl-certificate""subnet""virtual-host"resource_type_human_readable*stringHuman readable version of the resource type
resource_id*integerThe pipeline's resource ID
operation*stringThe resource operation associated to the pipeline.
operation_human_readable*stringHuman readable version of the operation
max_parallel_actions*integerMaximum number of actions that can run in parallel for this pipeline. 0 means no limit of simultaneous actions. 1 means just a single action will be started at a time to run this pipeline.
trigger_when*|nullsteps*array<>created_by_user*|nullcreated_at*stringThe date and time when the record was created
updated_at*stringThe date and time when the record was last updated
curl -X POST 'https://api.devopness.com/pipelines/application/123' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer <your_api_token>' \ -H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \ -d '{ "name": "My pipeline", "operation": "deploy"}'{ "id": 342390, "name": "My pied piper-line", "environment_id": 4532342, "project_id": 97063242, "organization_id": 5324234, "resource_type": "application", "resource_type_human_readable": "Application", "resource_id": 5324234, "operation": "deploy", "operation_human_readable": "Deploy", "max_parallel_actions": 1, "trigger_when": { "conditions": [ { "name": "Check pullrequest author", "type": "request_body", "path": "pullrequest.author.nickname", "accepted_values": [ "myuser123", "bu_nick456" ] } ] }, "steps": [ { "id": 45678, "name": "Extra step before build app", "description": "This is an extra step before build application.", "type": "default-step", "run_as_user": "devopness", "command": "echo 'Deploy with devopness is a breeze!' | tee -a /tmp/build-started.log", "runner": "pip", "script_id": 3452033, "pipeline_id": 7869450, "trigger_order": 1001, "is_auto_generated": false, "is_default_step": false, "created_at": "2019-09-25T13:22:37.000000Z", "updated_at": "2019-09-25T13:22:37.000000Z" } ], "created_by_user": { "id": 1, "name": "string", "email": "user@example.com", "url_slug": "someone", "language": "en", "active": true, "created_at": "2019-09-25T15:50:48.000000Z", "updated_at": "2019-09-25T13:52:04.000000Z" }, "created_at": "2022-09-26T15:30:31.000000Z", "updated_at": "2022-09-26T15:30:58.000000Z"}