summaryrefslogtreecommitdiffstats
path: root/docs/en/rst/api/core/v1/classification.rst
blob: efff5e50f0c49f18b950ba0e5f363c68f8f3dc57 (plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Classifications
===============

This part of the Bugzilla API allows you to deal with the available
classifications. You will be able to get information about them as well as
manipulate them.

.. _rest_get_classification:

Get Classification
------------------

Returns an object containing information about a set of classifications.

**Request**

To return information on a single classification using the ID or name:

.. code-block:: text

   GET /rest/classification/(id_or_name)

==============  =====  =====================================
name            type   description
==============  =====  =====================================
**id_or_name**  mixed  An Integer classification ID or name.
==============  =====  =====================================

**Response**

.. code-block:: js

   {
     "classifications": [
       {
         "sort_key": 0,
         "description": "Unassigned to any classifications",
         "products": [
           {
             "id": 2,
             "name": "FoodReplicator",
             "description": "Software that controls a piece of hardware that will create any food item through a voice interface."
           },
           {
             "description": "Silk, etc.",
             "name": "Spider Secretions",
             "id": 4
           }
         ],
         "id": 1,
         "name": "Unclassified"
       }
     ]
   }

``classifications`` (array) Each object is a classification that the user is
authorized to see and has the following items:

===========  ======  ============================================================
name         type    description
===========  ======  ============================================================
id           int     The ID of the classification.
name         string  The name of the classification.
description  string  The description of the classificaion.
sort_key     int     The value which determines the order the classification is
                     sorted.
products     array   Products the user is authorized to access within the
                     classification. The product object keys are described below.
===========  ======  ============================================================

Product object:

===========  ======  ================================
name         type    description
===========  ======  ================================
name         string  The name of the product.
id           int     The ID of the product.
description  string  The description of the product.
===========  ======  ================================