# Data Category Detail

Gets data category details and the child categories by a given category. This resource can be used in API version 38.0 and later.

Salesforce Knowledge must be enabled in your organization. Use the language code format used in [Which Languages Does Salesforce Support?](https://help.salesforce.com/apex/HTViewHelpDoc?id=faq_getstart_what_languages_does.htm).

## Syntax

**URI:** `/services/data/vXX.X/support/dataCategoryGroups/group/dataCategories/category`

**Method:** GET

**Formats:** JSON, XML

**Authentication:** `Authorization: Bearer token`

**HTTP headers**

**Accept:** Optional. Can be either `application/json` or `application/xml`.

**Accept-language:** Optional. Language to translate the categories. Any ISO-639 language abbreviation, and an ISO-3166 country code subtag in the HTTP Accept-Language header. Only one language accepted. If no language specified, the non-translated labels are returned.

**Input:**

string `sObjectName`: Required. `KnowledgeArticleVersion` only.

**Output:**

Details of the category and a list of child categories (name, label, etc.).

- **Data Category Detail**

  Used for situations where the hierarchical representation of data categories is important. The child property contains a list of child data categories.

  ```nolang
  {
      "name": String, // the unique name of the category
      "label":  String, // returns the translated version if it is available
      "url":  URL,
      "childCategories": [ Data Category Summary, ....],
  }
  ```

:::note
If the category isn’t visible to the current user the return is empty.
:::

## Example

**Example Request**

```nolang
curl https://MyDomainName.my.salesforce.com/services/data/v68.0/support/dataCategoryGroups/Doc/dataCategories/All?sObjectName=KnowledgeArticleVersion -H "Authorization: Bearer token"
```

**Example Response Body**

```nolang
{
  "childCategories" : [ {
    "childCategories" : null,
    "label" : "Help",
    "name" : "Help",
    "url" : "/services/data/v68.0/support/dataCategoryGroups/Doc/dataCategories/Help?sObjectName=KnowledgeArticleVersion"
  }, {
    "childCategories" : null,
    "label" : "QA",
    "name" : "QA",
    "url" : "/services/data/v68.0/support/dataCategoryGroups/Doc/dataCategories/QA?sObjectName=KnowledgeArticleVersion"
  } ],
  "label" : "All",
  "name" : "All",
  "url" : "/services/data/v68.0/support/dataCategoryGroups/Doc/dataCategories/All?sObjectName=KnowledgeArticleVersion"
}
```
