Datadog · Capability

Datadog API — Queries

Datadog API — Queries. 12 operations. Lead operation: Datadog List Restriction Queries. Self-contained Naftiko capability covering one Datadog business surface.

Run with Naftiko DatadogQueries

What You Can Do

GET
Listrestrictionqueries — Datadog List Restriction Queries
/v1/api/v2/logs/config/restriction-queries
POST
Createrestrictionquery — Datadog Create a Restriction Query
/v1/api/v2/logs/config/restriction-queries
GET
Getrolerestrictionquery — Datadog Get Restriction Query for a Given Role
/v1/api/v2/logs/config/restriction-queries/role/{role-id}
GET
Listuserrestrictionqueries — Datadog Get All Restriction Queries for a Given User
/v1/api/v2/logs/config/restriction-queries/user/{user-id}
DELETE
Deleterestrictionquery — Datadog Delete a Restriction Query
/v1/api/v2/logs/config/restriction-queries/{restriction-query-id}
GET
Getrestrictionquery — Datadog Get a Restriction Query
/v1/api/v2/logs/config/restriction-queries/{restriction-query-id}
PATCH
Updaterestrictionquery — Datadog Update a Restriction Query
/v1/api/v2/logs/config/restriction-queries/{restriction-query-id}
DELETE
Removerolefromrestrictionquery — Datadog Revoke Role from a Restriction Query
/v1/api/v2/logs/config/restriction-queries/{restriction-query-id}/roles
GET
Listrestrictionqueryroles — Datadog List Roles for a Restriction Query
/v1/api/v2/logs/config/restriction-queries/{restriction-query-id}/roles
POST
Addroletorestrictionquery — Datadog Grant Role to a Restriction Query
/v1/api/v2/logs/config/restriction-queries/{restriction-query-id}/roles
POST
Queryscalardata — Datadog Query Scalar Data Across Multiple Products
/v1/api/v2/query/scalar
POST
Querytimeseriesdata — Datadog Query Timeseries Data Across Multiple Products
/v1/api/v2/query/timeseries

MCP Tools

datadog-list-restriction-queries

Datadog List Restriction Queries

read-only idempotent
datadog-create-restriction-query

Datadog Create a Restriction Query

read-only
datadog-get-restriction-query-given

Datadog Get Restriction Query for a Given Role

read-only idempotent
datadog-get-all-restriction-queries

Datadog Get All Restriction Queries for a Given User

read-only idempotent
datadog-delete-restriction-query

Datadog Delete a Restriction Query

idempotent
datadog-get-restriction-query

Datadog Get a Restriction Query

read-only idempotent
datadog-update-restriction-query

Datadog Update a Restriction Query

idempotent
datadog-revoke-role-restriction-query

Datadog Revoke Role from a Restriction Query

idempotent
datadog-list-roles-restriction-query

Datadog List Roles for a Restriction Query

read-only idempotent
datadog-grant-role-restriction-query

Datadog Grant Role to a Restriction Query

read-only
datadog-query-scalar-data-across

Datadog Query Scalar Data Across Multiple Products

read-only
datadog-query-timeseries-data-across

Datadog Query Timeseries Data Across Multiple Products

read-only

Capability Spec

datadog-queries.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Datadog API — Queries
  description: 'Datadog API — Queries. 12 operations. Lead operation: Datadog List Restriction Queries. Self-contained Naftiko
    capability covering one Datadog business surface.'
  tags:
  - Datadog
  - Queries
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DATADOG_API_KEY: DATADOG_API_KEY
capability:
  consumes:
  - type: http
    namespace: datadog-queries
    baseUri: https://{subdomain}.{site}
    description: Datadog API — Queries business capability. Self-contained, no shared references.
    resources:
    - name: api-v2-logs-config-restriction_queries
      path: /api/v2/logs/config/restriction_queries
      operations:
      - name: listrestrictionqueries
        method: GET
        description: Datadog List Restriction Queries
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createrestrictionquery
        method: POST
        description: Datadog Create a Restriction Query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-logs-config-restriction_queries-role-role_id
      path: /api/v2/logs/config/restriction_queries/role/{role_id}
      operations:
      - name: getrolerestrictionquery
        method: GET
        description: Datadog Get Restriction Query for a Given Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-v2-logs-config-restriction_queries-user-user_id
      path: /api/v2/logs/config/restriction_queries/user/{user_id}
      operations:
      - name: listuserrestrictionqueries
        method: GET
        description: Datadog Get All Restriction Queries for a Given User
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-v2-logs-config-restriction_queries-restriction_query_id
      path: /api/v2/logs/config/restriction_queries/{restriction_query_id}
      operations:
      - name: deleterestrictionquery
        method: DELETE
        description: Datadog Delete a Restriction Query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: getrestrictionquery
        method: GET
        description: Datadog Get a Restriction Query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updaterestrictionquery
        method: PATCH
        description: Datadog Update a Restriction Query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-logs-config-restriction_queries-restriction_query_id-roles
      path: /api/v2/logs/config/restriction_queries/{restriction_query_id}/roles
      operations:
      - name: removerolefromrestrictionquery
        method: DELETE
        description: Datadog Revoke Role from a Restriction Query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: listrestrictionqueryroles
        method: GET
        description: Datadog List Roles for a Restriction Query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: addroletorestrictionquery
        method: POST
        description: Datadog Grant Role to a Restriction Query
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-query-scalar
      path: /api/v2/query/scalar
      operations:
      - name: queryscalardata
        method: POST
        description: Datadog Query Scalar Data Across Multiple Products
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-query-timeseries
      path: /api/v2/query/timeseries
      operations:
      - name: querytimeseriesdata
        method: POST
        description: Datadog Query Timeseries Data Across Multiple Products
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.DATADOG_API_KEY}}'
  exposes:
  - type: rest
    namespace: datadog-queries-rest
    port: 8080
    description: REST adapter for Datadog API — Queries. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/v2/logs/config/restriction-queries
      name: api-v2-logs-config-restriction-queries
      description: REST surface for api-v2-logs-config-restriction_queries.
      operations:
      - method: GET
        name: listrestrictionqueries
        description: Datadog List Restriction Queries
        call: datadog-queries.listrestrictionqueries
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createrestrictionquery
        description: Datadog Create a Restriction Query
        call: datadog-queries.createrestrictionquery
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/logs/config/restriction-queries/role/{role-id}
      name: api-v2-logs-config-restriction-queries-role-role-id
      description: REST surface for api-v2-logs-config-restriction_queries-role-role_id.
      operations:
      - method: GET
        name: getrolerestrictionquery
        description: Datadog Get Restriction Query for a Given Role
        call: datadog-queries.getrolerestrictionquery
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/logs/config/restriction-queries/user/{user-id}
      name: api-v2-logs-config-restriction-queries-user-user-id
      description: REST surface for api-v2-logs-config-restriction_queries-user-user_id.
      operations:
      - method: GET
        name: listuserrestrictionqueries
        description: Datadog Get All Restriction Queries for a Given User
        call: datadog-queries.listuserrestrictionqueries
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/logs/config/restriction-queries/{restriction-query-id}
      name: api-v2-logs-config-restriction-queries-restriction-query-id
      description: REST surface for api-v2-logs-config-restriction_queries-restriction_query_id.
      operations:
      - method: DELETE
        name: deleterestrictionquery
        description: Datadog Delete a Restriction Query
        call: datadog-queries.deleterestrictionquery
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getrestrictionquery
        description: Datadog Get a Restriction Query
        call: datadog-queries.getrestrictionquery
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updaterestrictionquery
        description: Datadog Update a Restriction Query
        call: datadog-queries.updaterestrictionquery
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/logs/config/restriction-queries/{restriction-query-id}/roles
      name: api-v2-logs-config-restriction-queries-restriction-query-id-roles
      description: REST surface for api-v2-logs-config-restriction_queries-restriction_query_id-roles.
      operations:
      - method: DELETE
        name: removerolefromrestrictionquery
        description: Datadog Revoke Role from a Restriction Query
        call: datadog-queries.removerolefromrestrictionquery
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: listrestrictionqueryroles
        description: Datadog List Roles for a Restriction Query
        call: datadog-queries.listrestrictionqueryroles
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: addroletorestrictionquery
        description: Datadog Grant Role to a Restriction Query
        call: datadog-queries.addroletorestrictionquery
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/query/scalar
      name: api-v2-query-scalar
      description: REST surface for api-v2-query-scalar.
      operations:
      - method: POST
        name: queryscalardata
        description: Datadog Query Scalar Data Across Multiple Products
        call: datadog-queries.queryscalardata
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/query/timeseries
      name: api-v2-query-timeseries
      description: REST surface for api-v2-query-timeseries.
      operations:
      - method: POST
        name: querytimeseriesdata
        description: Datadog Query Timeseries Data Across Multiple Products
        call: datadog-queries.querytimeseriesdata
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: datadog-queries-mcp
    port: 9090
    transport: http
    description: MCP adapter for Datadog API — Queries. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: datadog-list-restriction-queries
      description: Datadog List Restriction Queries
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: datadog-queries.listrestrictionqueries
      outputParameters:
      - type: object
        mapping: $.
    - name: datadog-create-restriction-query
      description: Datadog Create a Restriction Query
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: datadog-queries.createrestrictionquery
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: datadog-get-restriction-query-given
      description: Datadog Get Restriction Query for a Given Role
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: datadog-queries.getrolerestrictionquery
      outputParameters:
      - type: object
        mapping: $.
    - name: datadog-get-all-restriction-queries
      description: Datadog Get All Restriction Queries for a Given User
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: datadog-queries.listuserrestrictionqueries
      outputParameters:
      - type: object
        mapping: $.
    - name: datadog-delete-restriction-query
      description: Datadog Delete a Restriction Query
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: datadog-queries.deleterestrictionquery
      outputParameters:
      - type: object
        mapping: $.
    - name: datadog-get-restriction-query
      description: Datadog Get a Restriction Query
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: datadog-queries.getrestrictionquery
      outputParameters:
      - type: object
        mapping: $.
    - name: datadog-update-restriction-query
      description: Datadog Update a Restriction Query
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: datadog-queries.updaterestrictionquery
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: datadog-revoke-role-restriction-query
      description: Datadog Revoke Role from a Restriction Query
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: datadog-queries.removerolefromrestrictionquery
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: datadog-list-roles-restriction-query
      description: Datadog List Roles for a Restriction Query
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: datadog-queries.listrestrictionqueryroles
      outputParameters:
      - type: object
        mapping: $.
    - name: datadog-grant-role-restriction-query
      description: Datadog Grant Role to a Restriction Query
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: datadog-queries.addroletorestrictionquery
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: datadog-query-scalar-data-across
      description: Datadog Query Scalar Data Across Multiple Products
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: datadog-queries.queryscalardata
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: datadog-query-timeseries-data-across
      description: Datadog Query Timeseries Data Across Multiple Products
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: datadog-queries.querytimeseriesdata
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.