Webhooks

List webhooks

Returns all webhooks in the workspace. Restricted to admins only.
Required scopes: WORKSPACE, WEBHOOK_INFO

Resource URL
GET
/workspaces/:domain/webhooks
URL Parameters
Name Description
domain Required String The workspace domain.
Example
Request
GET
https://api.buddy.works/workspaces/buddy/webhooks
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/webhooks",
  "html_url": "https://app.buddy.works/buddy/webhook",
  "webhooks": [
    {
      "url": "https://api.buddy.works/workspaces/buddy/webhooks/1",
      "html_url": "https://app.buddy.works/buddy/webhook/1",
      "id": 1,
      "target_url": "http://localhost"
    }
  ]
}

Create

Creates a new webhook. Restricted to admins only.
Required scopes: WORKSPACE, WEBHOOK_ADD

Resource URL
POST
/workspaces/:domain/webhooks
URL Parameters
Name Description
domain Required String The workspace domain.
POST Parameters
Name Description
events Required String[] The array of events describing when the webhook will be executed. Can be set of PUSH, RELEASE_STARTED, RELEASE_SUCCESSFUL, RELEASE_FAILED or RELEASE_FINISHED.
target_url Required String The URL to which the payload will be sent.
project_filter Project Project.
secret_key String The value sent in the payload required by the webservice to validate the request.
Example
Request
POST
https://api.buddy.works/workspaces/buddy/webhooks
{
  "target_url": "http://localhost",
  "secret_key": "mysecretkey",
  "project_filter": {
    "name": "company-website"
  },
  "events": [
    "EXECUTION_FAILED"
  ]
}
Sample Response
Status: 201 Created
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/webhooks/2",
  "html_url": "https://app.buddy.works/buddy/webhook/2",
  "id": 2,
  "target_url": "http://localhost",
  "secret_key": "mysecretkey",
  "project_filter": {
    "url": "https://api.buddy.works/projects/company-website",
    "html_url": "https://app.buddy.works/buddy/company-website",
    "name": "company-website",
    "display_name": "Company Website",
    "status": "ACTIVE"
  },
  "events": [
    "EXECUTION_FAILED"
  ]
}

Get webhook

Shows details of the webhook. Restricted to admins only.
Required scopes: WORKSPACE, WEBHOOK_INFO

Resource URL
GET
/workspaces/:domain/webhooks/:webhook_id
URL Parameters
Name Description
domain Required String The workspace domain.
webhook_id Required Integer The numerical ID of the desired webhook.
Example
Request
GET
https://api.buddy.works/workspaces/buddy/webhooks/1
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/webhooks/1",
  "html_url": "https://app.buddy.works/buddy/webhook/1",
  "id": 1,
  "target_url": "http://test.buddy.works/auth/",
  "secret_key": "023bd610-7738-47a5-b0c4-5e887431ffcf",
  "project_filter": {
    "url": "https://api.buddy.works/projects/company-website",
    "html_url": "https://app.buddy.works/buddy/company-website",
    "name": "company-website",
    "display_name": "Company Website",
    "status": "ACTIVE"
  },
  "events": [
    "EXECUTION_FINISHED",
    "PUSH"
  ],
  "requests": [
    {
      "post_date": "2016-03-02T11:32:58Z",
      "response_status": 200,
      "body": "{\"workspace\":{\"url\":\"https://api.buddy.works/workspaces/buddy\",\"html_url\":\"https://app.buddy.works/buddy\",\"id\":1,\"name\":\"buddy\",\"domain\":\"buddy\"},\"invoker\":{\"url\":\"https://app.buddy.works/buddy/member/1\",\"html_url\":\"https://app.buddy.works/buddy/profile/1\",\"id\":1,\"name\":\"Mike Benson\",\"avatar_url\":\"https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png\",\"title\":\"Creative director\",\"email\":\"mike@buddy.works\"},\"project\":{\"url\":\"https://api.buddy.works/projects/company-website\",\"html_url\":\"https://app.buddy.works/buddy/company-website\",\"name\":\"company-website\",\"display_name\":\"Company Website\",\"status\":\"ACTIVE\"},\"current_date\":\"2016-03-02T11:32:58.604Z\",\"execution\":{\"url\":\"https://api.buddy.works/projects/company-website/pipelines/2/executions/1\",\"html_url\":\"https://app.buddy.works/buddy/company-website/pipelines/pipeline/2/execution/56d6cf6599f1e1114ef10774\",\"id\":1,\"start_date\":\"2016-03-02T11:32:53.355Z\",\"finish_date\":\"2016-03-02T11:32:58.576Z\",\"mode\":\"MANUAL\",\"refresh\":false,\"status\":\"SUCCESSFUL\",\"comment\":\"\",\"branch\":\"master\",\"creator\":{\"url\":\"https://app.buddy.works/buddy/member/1\",\"html_url\":\"https://app.buddy.works/buddy/profile/1\",\"id\":1,\"name\":\"Mike Benson\",\"avatar_url\":\"https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png\",\"title\":\"Creative director\",\"email\":\"mike@buddy.works\"},\"pipeline\":{\"url\":\"https://api.buddy.works/projects/company-website/pipelines/2\",\"html_url\":\"https://app.buddy.works/buddy/company-website/pipelines/pipeline/2/execution/56d6cf6599f1e1114ef10774\",\"id\":2,\"name\":\"Live mirror\",\"ref_name\":\"master\"},\"action_executions\":[{\"to_revision\":\"506a3963507943d6908154f4bc9646e829128a08\",\"status\":\"SUCCESSFUL\",\"progress\":100.0,\"action\":{\"url\":\"https://api.buddy.works/projects/company-website/pipelines/2/actions/5\",\"html_url\":\"https://app.buddy.works/buddy/company-website/pipelines/action/5/edit\",\"id\":5,\"name\":\"Upload files to Live mirror\",\"type\":\"FTP\",\"trigger_time\":\"ON_EVERY_EXECUTION\",\"run_only_on_first_failure\":false,\"status\":\"SUCCESSFUL\",\"revision\":null}}]}}"
    }
  ]
}

Edit Webhook

Updates a webhook. Restricted to admins only.
Required scopes: WORKSPACE, WEBHOOK_MANAGE

Resource URL
PATCH
/workspaces/:domain/webhooks/:webhook_id
URL Parameters
Name Description
domain Required String The workspace domain.
webhook_id Required Integer The numerical ID of the desired webhook.
POST Parameters
Name Description
events String[] The array of events describing when the webhook will be executed. Can be set of PUSH, RELEASE_STARTED, RELEASE_SUCCESSFUL, RELEASE_FAILED or RELEASE_FINISHED.
project_filter Project
secret_key String The value sent in the payload required by the webservice to validate the request.
target_url String The URL to which the payload will be sent.
Example
Request
PATCH
https://api.buddy.works/workspaces/buddy/webhooks/1
{
  "events": [
    "EXECUTION_FAILED",
    "EXECUTION_FINISHED"
  ]
}
Sample Response
Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
{
  "url": "https://api.buddy.works/workspaces/buddy/webhooks/1",
  "html_url": "https://app.buddy.works/buddy/webhook/1",
  "id": 1,
  "target_url": "http://localhost",
  "secret_key": "mysecretkey",
  "project_filter": {
    "url": "https://api.buddy.works/projects/company-website",
    "html_url": "https://app.buddy.works/buddy/company-website",
    "name": "company-website",
    "display_name": "Company Website",
    "status": "ACTIVE"
  },
  "events": [
    "EXECUTION_FINISHED",
    "EXECUTION_FAILED"
  ],
  "requests": []
}

Delete

Deletes the webhook.
Required scopes: WORKSPACE, WEBHOOK_MANAGE

Resource URL
DELETE
/workspaces/:domain/webhooks/:webhook_id
URL Parameters
Name Description
domain Required String The workspace domain.
webhook_id Required Integer The numerical ID of the desired webhook.
Example
Request
DELETE
https://api.buddy.works/workspaces/buddy/webhooks/1
Sample Response
Status: 204 NoContent
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999
esc

Sign up for free

No setup fees. No requirements. No obligation.

or sign up with