Netlify

POST Parameters

You can find the list with common parameters for all Buddy actions here.

NameTypeDescription
type
Required
StringThe type of the action. Should be set to NETLIFY.
integration_id
Required
IntegerThe ID of the integration.
execute_commands
Required
String[]Commands that will be executed.
application_name
Required
StringThe name of the Netlify application.
site_id
Required
StringThe API ID in the site details.
trigger_conditionStringDefines when the build action should be run. Can be one of ALWAYS, ON_CHANGE, ON_CHANGE_AT_PATH, VAR_IS, VAR_IS_NOT or VAR_CONTAINS.
variablesVariable []The list of variables defined for this action.

Example

Request

POST https://api.buddy.works/workspaces/buddy/projects/company-website/pipelines/2/actions

JSON

{
"name": "Deploy to apk-42707",
"type": "NETLIFY",
"trigger_time": "ON_EVERY_EXECUTION",
"trigger_condition": "ALWAYS",
"application_name": "apk-42707",
"site_id": "70225fg3-9sc1-17c6-98dc-ef367123f12d9"
"execute_commands": [
"netlify deploy --dir=."
],
"variables": [
{
"key": "netlify_dir",
"value": "directory_name"
}
]
"integration": {
"id": 33
},
}

Sample Response

HTTP

Status: 201 Created
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999

JSON

{
"type": "BUILD",
"id": 81242,
"name": "Deploy to app-42707",
"triggerTime": "ON_EVERY_EXECUTION",
"pushHash": "b56a4460ac2194ca15c117668s02912a8",
"pipelineId": 1,
"pipelineName": "example name",
"runOnlyOnFirstFailure": false,
"active": true,
"triggerCondition": "ALWAYS",
"triggerConditionArgs": "",
"triggerVariable": "",
"runNextParallel": false,
"buildType": "NETLIFY",
"buildCommands": [
"netlify deploy --dir=."
],
"integration": {
"id": 2979
},
"target": "40227f03-13c1-47ds-18dc-ef36721f12d9",
"applicationName": "app-42707",
"shell": "SH",
"forceArg": false,
"variables": [
{
"key": "netlify_dir",
"value": "directory_name"
}
]
}