Skip to main content
Kinetic Community

Webhook Jobs

A webhook job is an instance of a webhook tied to a specific record (Submission, Form, User) that was created due to an action occurring on the record.

Operation List

GET /webhookJobs Retrieve all in Space
GET /webhookJobs Retrieve by Scope (Space)
GET /webhookJobs Retrieve by Webhook (Space)
GET /webhookJobs Retrieve by Parent (Space)
POST /webhookJobs Create Webhook Job (Space)
GET /webhookJobs/{id} Retrieve Webhook Job (Space)
PUT /webhookJobs/{id} Update a Webhook Job (Space)
DELETE /webhookJobs/{id} Delete a Webhook Job (Space)
GET /kapps/{kappSlug}/webhookJobs Retrieve by Scope (Kapp)
GET /kapps/{kappSlug}/webhookJobs Retrieve by Webhook (Kapp)
GET /kapps/{kappSlug}/webhookJobs Retrieve by Parent (Kapp)
POST /kapps/{kappSlug}/webhookJobs Create Webhook Job (Kapp)
GET /kapps/{kappSlug}/webhookJobs/{id} Retrieve Webhook Job (Kapp)
PUT /kapps/{kappSlug}/webhookJobs/{id} Update a Webhook Job (Kapp)
DELETE /kapps/{kappSlug}/webhookJobs/{id} Delete a Webhook Job (Kapp)
GET /webhookJobs/poller Get Poller Status
POST /webhookJobs/poller Send Poller command

Resource Schema

Available Includes

  • details

Operations

Retrieve all in Space

GET /webhookJobs

Returns a list of webhook jobs for all Webhooks defined on the Space and any Kapp within the Space.

Request

Query Parameters
include

comma-separated list of properties to include in the response

all

Indicates all webhook jobs that exist within the Space should be retrieved.

status

Filter the webhook jobs to optionally display only records that are failed or queued.

Response

Body
{
  "webhookJobs": [
    {
      "event": "Complete",
      "id": "00000000-0000-1000-8000-000000000000",
      "name": "Foo",
      "parentId": "00000000-0000-1000-8000-000000000000",
      "requestContent": null,
      "responseContent": null,
      "retryCount": 0,
      "scheduledAt": "2016-04-20T12:00:00Z",
      "scopeId": "00000000-0000-1000-8000-000000000000",
      "scopeType": "Kapp",
      "status": "Queued",
      "summary": null,
      "type": "Submission",
      "url": "http://my.server.com/api"
    }
  ],
  "nextPageToken": ""
}

Retrieve by Scope (Space)

GET /webhookJobs

Returns a list of webhook jobs that are scoped to the Space. In other words, returns a list of webhook jobs that were triggered from a webhook defined on the Space, not on a Kapp.

Request

Query Parameters
include

comma-separated list of properties to include in the response

status

Filter the webhook jobs to optionally display only records that are failed or queued.

Response

Body
{
  "webhookJobs": [
    {
      "event": "Complete",
      "id": "00000000-0000-1000-8000-000000000000",
      "name": "Foo",
      "parentId": "00000000-0000-1000-8000-000000000000",
      "requestContent": null,
      "responseContent": null,
      "retryCount": 0,
      "scheduledAt": "2016-04-20T12:00:00Z",
      "scopeId": "00000000-0000-1000-8000-000000000000",
      "scopeType": "Kapp",
      "status": "Queued",
      "summary": null,
      "type": "Submission",
      "url": "http://my.server.com/api"
    }
  ],
  "nextPageToken": ""
}

Retrieve by Webhook (Space)

GET /webhookJobs

Returns a list of webhook jobs that are tied to a Webhook defined on the Space.

Request

Query Parameters
include

comma-separated list of properties to include in the response

webhook

Name of the webhook to search for.

status

Filter the webhook jobs to optionally display only records that are failed or queued.

Response

Body
{
  "webhookJobs": [
    {
      "event": "Complete",
      "id": "00000000-0000-1000-8000-000000000000",
      "name": "Foo",
      "parentId": "00000000-0000-1000-8000-000000000000",
      "requestContent": null,
      "responseContent": null,
      "retryCount": 0,
      "scheduledAt": "2016-04-20T12:00:00Z",
      "scopeId": "00000000-0000-1000-8000-000000000000",
      "scopeType": "Kapp",
      "status": "Queued",
      "summary": null,
      "type": "Submission",
      "url": "http://my.server.com/api"
    }
  ],
  "nextPageToken": ""
}

Retrieve by Parent (Space)

GET /webhookJobs

Returns a list of webhook jobs that are tied to a specific parent record, such as the Space or a User.

Request

Query Parameters
include

comma-separated list of properties to include in the response

parentType

The Parent object type.

parentKey

The unique key value for the specified record. The value will depend on the parentType selected.

- Space: space slug
- User: username
status

Filter the webhook jobs to optionally display only records that are failed or queued.

Response

Body
{
  "webhookJobs": [
    {
      "event": "Complete",
      "id": "00000000-0000-1000-8000-000000000000",
      "name": "Foo",
      "parentId": "00000000-0000-1000-8000-000000000000",
      "requestContent": null,
      "responseContent": null,
      "retryCount": 0,
      "scheduledAt": "2016-04-20T12:00:00Z",
      "scopeId": "00000000-0000-1000-8000-000000000000",
      "scopeType": "Kapp",
      "status": "Queued",
      "summary": null,
      "type": "Submission",
      "url": "http://my.server.com/api"
    }
  ],
  "nextPageToken": ""
}

Create Webhook Job (Space)

POST /webhookJobs

Creates a new webhook job for the specified Space.

The user must have Space management privileges to perform this action.

Request

Query Parameters
include

comma-separated list of properties to include in the response

Body
{
  "event": "Complete",
  "name": "Foo",
  "type": "Submission",
  "url": "http://my.server.com/api"
}

Response

Body
{
  "webhookJob": {
    "event": "Complete",
    "id": "00000000-0000-1000-8000-000000000000",
    "name": "Foo",
    "parentId": "00000000-0000-1000-8000-000000000000",
    "requestContent": null,
    "responseContent": null,
    "retryCount": 0,
    "scheduledAt": "2016-04-20T12:00:00Z",
    "scopeId": "00000000-0000-1000-8000-000000000000",
    "scopeType": "Kapp",
    "status": "Queued",
    "summary": null,
    "type": "Submission",
    "url": "http://my.server.com/api"
  }
}

Retrieve Webhook Job (Space)

GET /webhookJobs/{id}

Retrieves the Webhook Job identified by the {id} parameter.

The user must have Space management privileges to perform this action.

Request

Path Parameters
id

The id of the webhook job to retrieve.

Query Parameters
include

comma-separated list of properties to include in the response

Response

Body
{
  "webhookJob": {
    "event": "Complete",
    "id": "00000000-0000-1000-8000-000000000000",
    "name": "Foo",
    "parentId": "00000000-0000-1000-8000-000000000000",
    "requestContent": null,
    "responseContent": null,
    "retryCount": 0,
    "scheduledAt": "2016-04-20T12:00:00Z",
    "scopeId": "00000000-0000-1000-8000-000000000000",
    "scopeType": "Kapp",
    "status": "Queued",
    "summary": null,
    "type": "Submission",
    "url": "http://my.server.com/api"
  }
}

Update a Webhook Job (Space)

PUT /webhookJobs/{id}

Updates the Webhook Job specified by the {id} parameter with the property values sent in the request body.

NOTE All properties in the request body are optional, and only the properties supplied will be updated.

The user must have Space management privileges to perform this action.

Request

Path Parameters
id

The id of the webhook job to update.

Query Parameters
include

comma-separated list of properties to include in the response

Body
{
  "status": "Cancelled",
  "summary": "Manually cancelled by manager"
}

Response

Body
{
  "webhookJob": {
    "event": "Complete",
    "id": "00000000-0000-1000-8000-000000000000",
    "name": "Foo",
    "parentId": "00000000-0000-1000-8000-000000000000",
    "requestContent": null,
    "responseContent": null,
    "retryCount": 0,
    "scheduledAt": "2016-04-20T12:00:00Z",
    "scopeId": "00000000-0000-1000-8000-000000000000",
    "scopeType": "Kapp",
    "status": "Queued",
    "summary": null,
    "type": "Submission",
    "url": "http://my.server.com/api"
  }
}

Delete a Webhook Job (Space)

DELETE /webhookJobs/{id}

Deletes the Webhook Job identified by the {id} parameter.

Request

Path Parameters
id

The id of the webhook job to delete.

Query Parameters
include

comma-separated list of properties to include in the response

Response

Body
{
  "webhookJob": {
    "event": "Complete",
    "id": "00000000-0000-1000-8000-000000000000",
    "name": "Foo",
    "parentId": "00000000-0000-1000-8000-000000000000",
    "requestContent": null,
    "responseContent": null,
    "retryCount": 0,
    "scheduledAt": "2016-04-20T12:00:00Z",
    "scopeId": "00000000-0000-1000-8000-000000000000",
    "scopeType": "Kapp",
    "status": "Queued",
    "summary": null,
    "type": "Submission",
    "url": "http://my.server.com/api"
  }
}

Retrieve by Scope (Kapp)

GET /kapps/{kappSlug}/webhookJobs

Returns a list of webhook jobs that are scoped to the Kapp. In other words, returns a list of webhook jobs that were triggered from a webhook defined on a Kapp, not the Space.

Request

Path Parameters
kappSlug

The slug of the Kapp where the webhook is defined.

Query Parameters
include

comma-separated list of properties to include in the response

status

Filter the webhook jobs to optionally display only records that are failed or queued.

Response

Body
{
  "webhookJobs": [
    {
      "event": "Complete",
      "id": "00000000-0000-1000-8000-000000000000",
      "name": "Foo",
      "parentId": "00000000-0000-1000-8000-000000000000",
      "requestContent": null,
      "responseContent": null,
      "retryCount": 0,
      "scheduledAt": "2016-04-20T12:00:00Z",
      "scopeId": "00000000-0000-1000-8000-000000000000",
      "scopeType": "Kapp",
      "status": "Queued",
      "summary": null,
      "type": "Submission",
      "url": "http://my.server.com/api"
    }
  ],
  "nextPageToken": ""
}

Retrieve by Webhook (Kapp)

GET /kapps/{kappSlug}/webhookJobs

Returns a list of webhook jobs that are tied to a Webhook defined on the Kapp.

Request

Path Parameters
kappSlug

The slug of the Kapp where the webhook is defined.

Query Parameters
include

comma-separated list of properties to include in the response

webhook

Name of the webhook to search for.

status

Filter the webhook jobs to optionally display only records that are failed or queued.

Response

Body
{
  "webhookJobs": [
    {
      "event": "Complete",
      "id": "00000000-0000-1000-8000-000000000000",
      "name": "Foo",
      "parentId": "00000000-0000-1000-8000-000000000000",
      "requestContent": null,
      "responseContent": null,
      "retryCount": 0,
      "scheduledAt": "2016-04-20T12:00:00Z",
      "scopeId": "00000000-0000-1000-8000-000000000000",
      "scopeType": "Kapp",
      "status": "Queued",
      "summary": null,
      "type": "Submission",
      "url": "http://my.server.com/api"
    }
  ],
  "nextPageToken": ""
}

Retrieve by Parent (Kapp)

GET /kapps/{kappSlug}/webhookJobs

Returns a list of webhook jobs that are tied to a specific parent record, such as a Submission or a Form.

Request

Path Parameters
kappSlug

The slug of the Kapp where the webhook is defined.

Query Parameters
include

comma-separated list of properties to include in the response

parentType

The Parent object type.

parentKey

The unique key value for the specified record. The value will depend on the parentType selected.

- Form: form slug
- Submission: submission id
status

Filter the webhook jobs to optionally display only records that are failed or queued.

Response

Body
{
  "webhookJobs": [
    {
      "event": "Complete",
      "id": "00000000-0000-1000-8000-000000000000",
      "name": "Foo",
      "parentId": "00000000-0000-1000-8000-000000000000",
      "requestContent": null,
      "responseContent": null,
      "retryCount": 0,
      "scheduledAt": "2016-04-20T12:00:00Z",
      "scopeId": "00000000-0000-1000-8000-000000000000",
      "scopeType": "Kapp",
      "status": "Queued",
      "summary": null,
      "type": "Submission",
      "url": "http://my.server.com/api"
    }
  ],
  "nextPageToken": ""
}

Create Webhook Job (Kapp)

POST /kapps/{kappSlug}/webhookJobs

Creates a new webhook job for a Kapp.

The user must have Kapp management privileges to perform this action.

Request

Path Parameters
kappSlug

The slug of the kapp that the webhook is defined on.

Query Parameters
include

comma-separated list of properties to include in the response

Body
{
  "event": "Complete",
  "name": "Foo",
  "type": "Submission",
  "url": "http://my.server.com/api"
}

Response

Body
{
  "webhookJob": {
    "event": "Complete",
    "id": "00000000-0000-1000-8000-000000000000",
    "name": "Foo",
    "parentId": "00000000-0000-1000-8000-000000000000",
    "requestContent": null,
    "responseContent": null,
    "retryCount": 0,
    "scheduledAt": "2016-04-20T12:00:00Z",
    "scopeId": "00000000-0000-1000-8000-000000000000",
    "scopeType": "Kapp",
    "status": "Queued",
    "summary": null,
    "type": "Submission",
    "url": "http://my.server.com/api"
  }
}

Retrieve Webhook Job (Kapp)

GET /kapps/{kappSlug}/webhookJobs/{id}

Retrieves the Webhook Job identified by the {id} parameter.

Request

Path Parameters
kappSlug

The slug of the kapp that the webhook is defined on.

id

The id of the webhook job to retrieve.

Query Parameters
include

comma-separated list of properties to include in the response

Response

Body
{
  "webhookJob": {
    "event": "Complete",
    "id": "00000000-0000-1000-8000-000000000000",
    "name": "Foo",
    "parentId": "00000000-0000-1000-8000-000000000000",
    "requestContent": null,
    "responseContent": null,
    "retryCount": 0,
    "scheduledAt": "2016-04-20T12:00:00Z",
    "scopeId": "00000000-0000-1000-8000-000000000000",
    "scopeType": "Kapp",
    "status": "Queued",
    "summary": null,
    "type": "Submission",
    "url": "http://my.server.com/api"
  }
}

Update a Webhook Job (Kapp)

PUT /kapps/{kappSlug}/webhookJobs/{id}

Updates the Webhook Job specified by the {id} parameter with the property values sent in the request body.

NOTE All properties in the request body are optional, and only the properties supplied will be updated.

The user must have Kapp management privileges to perform this action.

Request

Path Parameters
kappSlug

The slug of the kapp that the webhook id defined on.

id

The id of the webhook job to update.

Query Parameters
include

comma-separated list of properties to include in the response

Body
{
  "status": "Cancelled",
  "summary": "Manually cancelled by manager"
}

Response

Body
{
  "webhookJob": {
    "event": "Complete",
    "id": "00000000-0000-1000-8000-000000000000",
    "name": "Foo",
    "parentId": "00000000-0000-1000-8000-000000000000",
    "requestContent": null,
    "responseContent": null,
    "retryCount": 0,
    "scheduledAt": "2016-04-20T12:00:00Z",
    "scopeId": "00000000-0000-1000-8000-000000000000",
    "scopeType": "Kapp",
    "status": "Queued",
    "summary": null,
    "type": "Submission",
    "url": "http://my.server.com/api"
  

Delete a Webhook Job (Kapp)

DELETE /kapps/{kappSlug}/webhookJobs/{id}

Deletes the Webhook Job identified by the {id} parameter.

The user must have Kapp management privileges to perform this action.

Request

Path Parameters
kappSlug

The slug of the kapp that the webhook id defined on.

id

The id of the webhook job to delete.

Query Parameters
include

comma-separated list of properties to include in the response

Response

Body
{
  "webhookJob": {
    "event": "Complete",
    "id": "00000000-0000-1000-8000-000000000000",
    "name": "Foo",
    "parentId": "00000000-0000-1000-8000-000000000000",
    "requestContent": null,
    "responseContent": null,
    "retryCount": 0,
    "scheduledAt": "2016-04-20T12:00:00Z",
    "scopeId": "00000000-0000-1000-8000-000000000000",
    "scopeType": "Kapp",
    "status": "Queued",
    "summary": null,
    "type": "Submission",
    "url": "http://my.server.com/api"
  }
}

Get Poller Status

GET /webhookJobs/poller

Gets the Webhook Job Poller status.

Request

Response

Body
{
  "status": "running"
}

Send Poller command

POST /webhookJobs/poller

Controls the Webhook Job Poller by sending either a ‘start’ or ‘stop’ command.

Request

Body
{
  "command": "start|stop"
}

Response

Body
{
  "status": "running"
}

 

Related