API Reference

Categories

Job categories, which group jobs in the admin.

Prefix /cdna-api/hooks ReferenceCategory model GuideJobs and events
Categories in Postman

List job categories#

GET /cdna-api/hooks/categories

Lists job categories, 100 to a page unless limit says otherwise. This documentation site has none, as the example shows.

Access
Admin users and integrations, with an OAuth access token or an API key.
Model
Category, in the Reference

Parameters

propertiesquery
selector
The fields and relations to return, such as {id,name,site}.
filtersquery
name=value
Any stored field, or a relation with a dot, such as site.id=1. Prefix the name with !, >, <, % or |. Use stored field names exactly as in the model, and compare totalCount with the unfiltered list's to confirm a filter applied.
orderByquery
string
field:ASC or field:DESC, comma-separated. Stored fields only.
limitquery
integer
Records per response: 100 when left out, at most 500. A larger value answers 400.
pagequery
integer
The page to return, counting from 1. offset works too.

Example

List job categories
GET /cdna-api/hooks/categories?limit=2&properties={id,name,site} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response 200 OK
{
  "result": "success",
  "totalCount": 0,
  "data": []
}
Open in Postman docs Real response from this documentation site

Show a job category#

GET /cdna-api/hooks/category/{id}

Reads one job category by its id.

Access
Admin users and integrations, with an OAuth access token or an API key.
Model
Category, in the Reference

Parameters

idpathrequired
integer
The job category id.
propertiesquery
selector
The fields and relations to return, such as {id,name,site}.

Example

Show a job category
GET /cdna-api/hooks/category/3 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Create a job category#

POST /cdna-api/hooks/category

Creates a job category.

Access
Admin users and integrations, with an OAuth access token or an API key.
Returns
The new category under data.category, and a message.

Parameters

namebody
string
The category’s name.
sitebody
number
The site it belongs to, by id; left out, every site.

Example

Create a job category
POST /cdna-api/hooks/category HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json

{
  "name": "Integrations",
  "site": 1
}

Edit a job category#

PUT /cdna-api/hooks/category/{id}

Changes a job category. Fields left out keep their values.

Access
Admin users and integrations, with an OAuth access token or an API key.
Returns
The saved category under data.category, and a message.

Parameters

idpathrequired
integer
The job category id.
namebody
string
The category’s name.

Example

Edit a job category
PUT /cdna-api/hooks/category/3 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json

{
  "name": "Integrations and exports"
}

Delete a job category#

DELETE /cdna-api/hooks/category/{id}

Deletes a job category.

Access
Admin users and integrations, with an OAuth access token or an API key.

Parameters

idpathrequired
integer
The job category id.

Example

Delete a job category
DELETE /cdna-api/hooks/category/3 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Delete several job categories#

DELETE /cdna-api/hooks/categories

Deletes up to 50 job categories at once, their ids in ids. If any id names nothing, nothing is deleted and the answer is 404.

Access
Admin users and integrations, with an OAuth access token or an API key.

Parameters

idsbodyrequired
list
The ids of the job categories, at most 50.

Example

Delete several job categories
DELETE /cdna-api/hooks/categories HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json

{
  "ids": [
    4,
    5
  ]
}