Fields

Rule objects have the following fields and links:

Fields

field name description
name the rule's name
description an optional description
enabled whether or not this rule will run
created_at when this rule was created
updated_at when this rule was last updated

Links

rel class embeddable? description
self rule no this rule

List

Retrieve a paginated list of rules.

GET https://yoursite.desk.com/api/v2/rules

Applicable Roles

Agent, Reporting Agent, Workflow Manager, Knowledgebase Manager, Content Manager, Business Manager, Administrative Manager, Administrator, Knowledgebase Adminstrator, and Billing Administrator

Example Curl Request

1
2
3
$ curl https://yoursite.desk.com/api/v2/rules \
    -u email:password \
    -H 'Accept: application/json'

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
  "total_entries": 2,
  "page": 1,
  "_links": {
    "self": {
      "href": "/api/v2/rules?page=1&per_page=50",
      "class": "page"
    },
    "first": {
      "href": "/api/v2/rules?page=1&per_page=50",
      "class": "page"
    },
    "last": {
      "href": "/api/v2/rules?page=1&per_page=50",
      "class": "page"
    },
    "next": null,
    "previous": null
  },
  "_embedded": {
    "entries": [
      {
        "name": "Assign to Support",
        "description": "Assign inbound tweets to support group",
        "enabled": true,
        "created_at": "2017-10-18T18:08:06Z",
        "updated_at": "2017-10-18T18:08:06Z",
        "_links": {
          "self": {
            "href": "/api/v2/rules/1",
            "class": "rule"
          }
        }
      },
      {
        "name": "Increase Priority for Influential Twitter Users",
        "description": null,
        "enabled": true,
        "created_at": "2017-10-18T18:08:06Z",
        "updated_at": "2017-10-18T18:08:06Z",
        "_links": {
          "self": {
            "href": "/api/v2/rules/2",
            "class": "rule"
          }
        }
      }
    ]
  }
}

Show

Retrieve a single rule.

GET https://yoursite.desk.com/api/v2/rules/:id

Applicable Roles

Agent, Reporting Agent, Workflow Manager, Knowledgebase Manager, Content Manager, Business Manager, Administrative Manager, Administrator, Knowledgebase Adminstrator, and Billing Administrator

Example Curl Request

1
2
3
$ curl https://yoursite.desk.com/api/v2/rules/:id \
    -u email:password \
    -H 'Accept: application/json'

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{
  "name": "Assign to Support",
  "description": "Assign inbound tweets to support group",
  "enabled": true,
  "created_at": "2017-10-18T18:08:06Z",
  "updated_at": "2017-10-18T18:08:06Z",
  "_links": {
    "self": {
      "href": "/api/v2/rules/1",
      "class": "rule"
    }
  }
}