Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

Drains API

« API Overview

The Drain resources allow you create, list and delete log drains

Contents

List Drains

Retrieves a list of drains for the application. The item properties are the same as the drain detail with the addition of the URL for the detail resource for each item.

Request

GET /applications/:slug/drains

Response

Status: 200 OK

[{
    "value" : "syslog://example.com",
    "token" : "d.94f87162-22e8-4474-99fb-e600d347fb39",
    "url" : "https://appharbor.com/applications/:slug/drains/:id"
}]

Get Drain Detail

Retrieves the settings for the specified drain.

Request

GET /applications/:slug/drains/:id

Response

Status: 200 OK

{
    "value" : "syslog://example.org",
    "token" : "d.94f87162-22e8-4474-99fb-e600d347fb39"
}

Response Properties

value The syslog, http or http drain url.
token Unique token for this drain

Create Drain

Adds the specified drain url to the application.

Request

POST /applications/:slug/drains

{
    "value" : "syslog://example.org"
}

Request Parameters

value Required The drain url to add

Response

Status: 201 Created
Location: https://appharbor.com/applications/:slug/drains/:id

Remove a Drain

Delete a drain from the application.

Request

DELETE /applications/:slug/drains/:id

Response

Status: 204 No Content

Back to overview