Endpoints

Resource Fields

Name Type Read-only Description
title string
type string EMAIL, HTTP, SLACK
attributes Attributes
is_enabled boolean
last_attempt_result string SUCCESS, FAILURE
last_attempt_message string
last_attempt_at timestamp ISO-8601 Format

Attributes

RESOURCE FIELDS

Name Type Read-only Description
name string
value string

Metadata




 
 




Actions

Retrieve all endpoints

GET /api/v1/endpoints.json

Information

Allowed for Admins & Owners
Scope configuration
Ordered by id (descending)

Response

    {
        "status": 200,
        "data": [
            {
    "id": 1,

    "title": "Case update notifications",
    "type": "EMAIL",
    "attributes": [
        {
            "name": "address",
            "value": "support@brewfictus.com",
            "resource_type": "endpoint_attribute"
        },
        {
            "name": "subject",
            "value": "Case has been updated",
            "resource_type": "endpoint_attribute"
        }
    ],
    "is_enabled": true,
    "last_attempt_result": "SUCCESS",
    "last_attempt_message": null,
    "last_attempt_at": "2016-02-10T08:42:03+05:00",

    "resource_type": "endpoint"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/endpoints/1"

}
        ],
        "resource": "endpoint",
        "offset": 0,
        "limit": 10,
        "total_count": 1
    }

Retrieve an endpoint

GET /api/v1/endpoints/:id.json

Information

Allowed for Admins & Owners
Scope configuration

Response

    {
        "status": 200,
        "data": {
    "id": 1,

    "title": "Case update notifications",
    "type": "EMAIL",
    "attributes": [
        {
            "name": "address",
            "value": "support@brewfictus.com",
            "resource_type": "endpoint_attribute"
        },
        {
            "name": "subject",
            "value": "Case has been updated",
            "resource_type": "endpoint_attribute"
        }
    ],
    "is_enabled": true,
    "last_attempt_result": "SUCCESS",
    "last_attempt_message": null,
    "last_attempt_at": "2016-02-10T08:42:03+05:00",

    "resource_type": "endpoint"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/endpoints/1"

},
        "resource": "endpoint"
    }

Add an endpoint

POST /api/v1/endpoints.json

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
title string
type string
EMAIL, HTTP, SLACK
attributes string
Example for type EMAIL:

address and subject are mandatory

{"address":"support@brewfictus.com", "subject":"Conversation has been updated"}

Example for type HTTP:

url, method, content_type and use_auth are mandatory
auth_username is mandatory if use_auth set to true
auth_password is mandatory if use_auth set to true

Allowed method are GET, POST, PUT, PATCH, DELETE
Allowed content_type are FORM, XML, JSON
content_type is mandatory for POST, PUT and PATCH method

{"url":"https://mydesk.kayako.com/incoming", "method":"POST", "use_auth":false, "auth_username":"", "auth_password":"", "content_type":"FORM"}

Note: For url, HTTP 2xx response codes are considered successful.

Example for type SLACK:

webhook_url is mandatory

{"webhook_url":"https://hooks.slack.com/services/T000/B000/XXXX", "channel":"engineering"}
is_enabled boolean Default: true

Response

    {
        "status": 201,
        "data": {
    "id": 1,

    "title": "Case update notifications",
    "type": "EMAIL",
    "attributes": [
        {
            "name": "address",
            "value": "support@brewfictus.com",
            "resource_type": "endpoint_attribute"
        },
        {
            "name": "subject",
            "value": "Case has been updated",
            "resource_type": "endpoint_attribute"
        }
    ],
    "is_enabled": true,
    "last_attempt_result": "SUCCESS",
    "last_attempt_message": null,
    "last_attempt_at": "2016-02-10T08:42:03+05:00",

    "resource_type": "endpoint"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/endpoints/1"

},
        "resource": "endpoint"
    }

Update an endpoint

PUT /api/v1/endpoints.json

Information

Allowed for Admins & Owners
Scope configuration

Parameters

Name Type Mandatory Description
title string
attributes string Example for type EMAIL:

address and subject are mandatory

{"address":"support@brewfictus.com", "subject":"Conversation has been updated"}

Example for type HTTP:

url, method, content_type and use_auth are mandatory
auth_username is mandatory if use_auth set to true
auth_password is mandatory if use_auth set to true

Allowed method are GET, POST, PUT, PATCH, DELETE
Allowed content_type are FORM, XML, JSON

{"url":"https://mydesk.kayako.com/incoming", "method":"POST", "content_type":"FORM", "use_auth":false, "auth_username":"", "auth_password":""}

Note: For url, HTTP 2xx response codes are considered successful.

Example for type SLACK:

webhook_url is mandatory

{"webhook_url":"https://hooks.slack.com/services/T000/B000/XXXX", "channel":"engineering"}
is_enabled boolean

Response

    {
        "status": 200,
        "data": {
    "id": 1,

    "title": "Case update notifications",
    "type": "EMAIL",
    "attributes": [
        {
            "name": "address",
            "value": "support@brewfictus.com",
            "resource_type": "endpoint_attribute"
        },
        {
            "name": "subject",
            "value": "Case has been updated",
            "resource_type": "endpoint_attribute"
        }
    ],
    "is_enabled": true,
    "last_attempt_result": "SUCCESS",
    "last_attempt_message": null,
    "last_attempt_at": "2016-02-10T08:42:03+05:00",

    "resource_type": "endpoint"

    ,"resource_url": "https://brewfictus.kayako.com/api/v1/endpoints/1"

},
        "resource": "endpoint"
    }

Delete an endpoint

DELETE /api/v1/endpoints/:id.json

Information

Allowed for Admins & Owners
Scope configuration

Response

{
    "status": 200
}

Delete endpoints

DELETE /api/v1/endpoints.json

Information

Allowed for Admins & Owners
Scope configuration

Arguments

Name Type Mandatory Description
ids string
The comma separated ids

Response

{
    "status": 200,
    "total_count": 2
}