---
title: Get node types for a language
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Security Monitoring
---

# Get node types for a language{% #get-node-types-for-a-language %}
Copy pageCopied
{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                                          |
| ----------------- | ----------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/static-analysis/static-analysis-server/node-types/{language} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/static-analysis/static-analysis-server/node-types/{language} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/static-analysis/static-analysis-server/node-types/{language}      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/static-analysis/static-analysis-server/node-types/{language}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/static-analysis/static-analysis-server/node-types/{language}  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/static-analysis/static-analysis-server/node-types/{language}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/static-analysis/static-analysis-server/node-types/{language} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/static-analysis/static-analysis-server/node-types/{language} |

### Overview

Retrieve tree-sitter node type definitions for a given programming language.

OAuth apps require the `code_analysis_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#security-monitoring) to access this endpoint.



### Arguments

#### Path Parameters

| Name                       | Type   | Description                                                           |
| -------------------------- | ------ | --------------------------------------------------------------------- |
| language [*required*] | string | The programming language for which to retrieve node type definitions. |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
The response payload containing tree-sitter node type definitions for a programming language.

| Parent field | Field                        | Type     | Description                                                                                                         |
| ------------ | ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
|              | data [*required*]       | object   | The primary data object in the node types response.                                                                 |
| data         | attributes [*required*] | object   | The attributes of the node types response, containing the list of node type definitions for the requested language. |
| attributes   | node_types [*required*] | [object] | The list of tree-sitter node type definitions for the language.                                                     |
| data         | id [*required*]         | string   | The unique identifier of the node types response resource.                                                          |
| data         | type [*required*]       | enum     | Get node types response resource type. Allowed enum values: `get_node_types_response`                               |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "node_types": []
    },
    "id": "python",
    "type": "get_node_types_response"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parameters export language="python" \# Curl command curl -X GET "https://api.datadoghq.com/api/v2/static-analysis/static-analysis-server/node-types/${language}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" 
                
{% /tab %}
