Datadog Keys API

The Keys API from Datadog — 8 operation(s) for keys.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

datadog-keys-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  contact:
    email: support@datadoghq.com
    name: Datadog Support
    url: https://www.datadoghq.com/support/
  description: The Datadog API is an HTTP REST API. The API uses resource-oriented URLs to call the API, uses status codes to indicate the success or failure of requests, returns JSON from all requests, and uses standard HTTP response codes. Use the Datadog API to access the Datadog platform programmatically.
  title: Datadog Account Keys API
  version: '1.0'
servers:
- url: https://{subdomain}.{site}
  variables:
    site:
      default: datadoghq.com
      description: The regional site for Datadog customers.
      enum:
      - datadoghq.com
      - us3.datadoghq.com
      - us5.datadoghq.com
      - ap1.datadoghq.com
      - datadoghq.eu
      - ddog-gov.com
    subdomain:
      default: api
      description: The subdomain where the API is deployed.
- url: '{protocol}://{name}'
  variables:
    name:
      default: api.datadoghq.com
      description: Full site DNS name.
    protocol:
      default: https
      description: The protocol for accessing the API.
- url: https://{subdomain}.{site}
  variables:
    site:
      default: datadoghq.com
      description: Any Datadog deployment.
    subdomain:
      default: api
      description: The subdomain where the API is deployed.
security:
- apiKeyAuth: []
  appKeyAuth: []
tags:
- name: Keys
paths:
  /api/v2/api_keys:
    x-merge-override:
      post: true
    get:
      description: List all API keys available for your account.
      operationId: ListAPIKeys
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageNumber'
      - $ref: '#/components/parameters/APIKeysSortParameter'
      - $ref: '#/components/parameters/APIKeyFilterParameter'
      - $ref: '#/components/parameters/APIKeyFilterCreatedAtStartParameter'
      - $ref: '#/components/parameters/APIKeyFilterCreatedAtEndParameter'
      - $ref: '#/components/parameters/APIKeyFilterModifiedAtStartParameter'
      - $ref: '#/components/parameters/APIKeyFilterModifiedAtEndParameter'
      - $ref: '#/components/parameters/APIKeyIncludeParameter'
      - $ref: '#/components/parameters/APIKeyReadConfigReadEnabledParameter'
      - $ref: '#/components/parameters/APIKeyCategoryParameter'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeysResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Get All Api Keys
      tags:
      - Keys
      x-menu-order: 5
      x-permission:
        operator: OR
        permissions:
        - api_keys_read
      x-undo:
        type: safe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      description: Create an API key.
      operationId: CreateAPIKey
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIKeyCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyResponse'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Create an Api Key
      tags:
      - Keys
      x-codegen-request-body-name: body
      x-given:
        api_key:
          parameters:
          - name: body
            value: "{\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"{{ unique }}\"\n    },\n    \"type\": \"api_keys\"\n  }\n}"
          step: there is a valid "api_key" in the system
      x-menu-order: 4
      x-permission:
        operator: OR
        permissions:
        - api_keys_write
      x-undo:
        operationId: DeleteAPIKey
        parameters:
        - name: api_key_id
          source: data.id
        type: unsafe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/api_keys/{api_key_id}:
    x-merge-override:
      delete: true
      get: true
      patch: true
    delete:
      description: Delete an API key.
      operationId: DeleteAPIKey
      parameters:
      - $ref: '#/components/parameters/APIKeyId'
      responses:
        '204':
          description: No Content
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Delete an Api Key
      tags:
      - Keys
      x-menu-order: 1
      x-permission:
        operator: OR
        permissions:
        - api_keys_delete
      x-undo:
        type: idempotent
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    get:
      description: Get an API key.
      operationId: GetAPIKey
      parameters:
      - $ref: '#/components/parameters/APIKeyId'
      - $ref: '#/components/parameters/APIKeyIncludeParameter'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyResponse'
          description: OK
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Get Api Key
      tags:
      - Keys
      x-menu-order: 3
      x-merge-override:
        parameters: false
      x-permission:
        operator: OR
        permissions:
        - api_keys_read
      x-undo:
        type: safe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      description: Update an API key.
      operationId: UpdateAPIKey
      parameters:
      - $ref: '#/components/parameters/APIKeyId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APIKeyUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Edit an Api Key
      tags:
      - Keys
      x-codegen-request-body-name: body
      x-menu-order: 2
      x-permission:
        operator: OR
        permissions:
        - api_keys_write
      x-undo:
        type: idempotent
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/application_keys:
    get:
      description: List all application keys available for your org
      operationId: ListApplicationKeys
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageNumber'
      - $ref: '#/components/parameters/ApplicationKeysSortParameter'
      - $ref: '#/components/parameters/ApplicationKeyFilterParameter'
      - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
      - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
      - $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListApplicationKeysResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Get All Application Keys
      tags:
      - Keys
      x-menu-order: 9
      x-permission:
        operator: OR
        permissions:
        - org_app_keys_read
      x-undo:
        type: safe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/application_keys/{app_key_id}:
    x-merge-override:
      delete: true
      get: false
    delete:
      description: Delete an application key
      operationId: DeleteApplicationKey
      parameters:
      - $ref: '#/components/parameters/ApplicationKeyID'
      responses:
        '204':
          description: No Content
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Delete an Application Key
      tags:
      - Keys
      x-codegen-request-body-name: body
      x-menu-order: 6
      x-permission:
        operator: OR
        permissions:
        - org_app_keys_write
      x-undo:
        type: idempotent
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    get:
      description: Get an application key for your org.
      operationId: GetApplicationKey
      parameters:
      - $ref: '#/components/parameters/ApplicationKeyID'
      - $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationKeyResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Get an Application Key
      tags:
      - Keys
      x-menu-order: 8
      x-permission:
        operator: OR
        permissions:
        - org_app_keys_read
      x-undo:
        type: safe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      description: Edit an application key
      operationId: UpdateApplicationKey
      parameters:
      - $ref: '#/components/parameters/ApplicationKeyID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationKeyUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationKeyResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Edit an Application Key
      tags:
      - Keys
      x-codegen-request-body-name: body
      x-menu-order: 7
      x-permission:
        operator: OR
        permissions:
        - org_app_keys_write
      x-undo:
        type: idempotent
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/current_user/application_keys:
    get:
      description: List all application keys available for current user
      operationId: ListCurrentUserApplicationKeys
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageNumber'
      - $ref: '#/components/parameters/ApplicationKeysSortParameter'
      - $ref: '#/components/parameters/ApplicationKeyFilterParameter'
      - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
      - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
      - $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListApplicationKeysResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Get All Application Keys Owned by Current User
      tags:
      - Keys
      x-menu-order: 5
      x-permission:
        operator: OR
        permissions:
        - user_app_keys
      x-undo:
        type: safe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      description: Create an application key for current user
      operationId: CreateCurrentUserApplicationKey
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationKeyCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationKeyResponse'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Create an Application Key for Current User
      tags:
      - Keys
      x-codegen-request-body-name: body
      x-given:
        application_key:
          parameters:
          - name: body
            value: "{\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"{{ unique }}\"\n    },\n    \"type\": \"application_keys\"\n  }\n}"
          step: there is a valid "application_key" in the system
      x-menu-order: 4
      x-permission:
        operator: OR
        permissions:
        - user_app_keys
      x-undo:
        operationId: DeleteCurrentUserApplicationKey
        parameters:
        - name: app_key_id
          source: data.id
        type: unsafe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/current_user/application_keys/{app_key_id}:
    x-merge-override:
      delete: true
      patch: true
    delete:
      description: Delete an application key owned by current user
      operationId: DeleteCurrentUserApplicationKey
      parameters:
      - $ref: '#/components/parameters/ApplicationKeyID'
      responses:
        '204':
          description: No Content
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Delete an Application Key Owned by Current User
      tags:
      - Keys
      x-menu-order: 1
      x-permission:
        operator: OR
        permissions:
        - user_app_keys
      x-undo:
        type: idempotent
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    get:
      description: Get an application key owned by current user
      operationId: GetCurrentUserApplicationKey
      parameters:
      - $ref: '#/components/parameters/ApplicationKeyID'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationKeyResponse'
          description: OK
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Get One Application Key Owned by Current User
      tags:
      - Keys
      x-menu-order: 3
      x-permission:
        operator: OR
        permissions:
        - user_app_keys
      x-undo:
        type: safe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      description: Edit an application key owned by current user
      operationId: UpdateCurrentUserApplicationKey
      parameters:
      - $ref: '#/components/parameters/ApplicationKeyID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationKeyUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationKeyResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Edit an Application Key Owned by Current User
      tags:
      - Keys
      x-codegen-request-body-name: body
      x-menu-order: 2
      x-permission:
        operator: OR
        permissions:
        - user_app_keys
      x-undo:
        type: idempotent
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/service_accounts/{service_account_id}/application_keys:
    x-merge-override:
      get: false
    get:
      description: List all application keys available for this service account.
      operationId: ListServiceAccountApplicationKeys
      parameters:
      - $ref: '#/components/parameters/ServiceAccountID'
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageNumber'
      - $ref: '#/components/parameters/ApplicationKeysSortParameter'
      - $ref: '#/components/parameters/ApplicationKeyFilterParameter'
      - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
      - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListApplicationKeysResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog List Application Keys for This Service Account
      tags:
      - Keys
      x-menu-order: 6
      x-permission:
        operator: OR
        permissions:
        - service_account_write
      x-undo:
        type: safe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      description: Create an application key for this service account.
      operationId: CreateServiceAccountApplicationKey
      parameters:
      - $ref: '#/components/parameters/ServiceAccountID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationKeyCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationKeyResponse'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Create an Application Key for This Service Account
      tags:
      - Keys
      x-codegen-request-body-name: body
      x-given:
        service_account_application_key:
          parameters:
          - name: service_account_id
            value: '"{{ service_account_user.data.id }}"'
          - name: body
            value: "{\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"{{ unique }}\"\n    },\n    \"type\": \"application_keys\"\n  }\n}"
          step: there is a valid "service_account_application_key" for "service_account_user"
      x-menu-order: 5
      x-permission:
        operator: OR
        permissions:
        - service_account_write
      x-undo:
        operationId: DeleteServiceAccountApplicationKey
        parameters:
        - name: app_key_id
          source: data.id
        - name: service_account_id
          source: data.relationships.owned_by.data.id
        type: unsafe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}:
    x-merge-override:
      delete: true
    delete:
      description: Delete an application key owned by this service account.
      operationId: DeleteServiceAccountApplicationKey
      parameters:
      - $ref: '#/components/parameters/ServiceAccountID'
      - $ref: '#/components/parameters/ApplicationKeyID'
      responses:
        '204':
          description: No Content
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Delete an Application Key for This Service Account
      tags:
      - Keys
      x-menu-order: 3
      x-permission:
        operator: OR
        permissions:
        - service_account_write
      x-undo:
        type: idempotent
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    get:
      description: Get an application key owned by this service account.
      operationId: GetServiceAccountApplicationKey
      parameters:
      - $ref: '#/components/parameters/ServiceAccountID'
      - $ref: '#/components/parameters/ApplicationKeyID'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartialApplicationKeyResponse'
          description: OK
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Get One Application Key for This Service Account
      tags:
      - Keys
      x-menu-order: 1
      x-permission:
        operator: OR
        permissions:
        - service_account_write
      x-undo:
        type: safe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      description: Edit an application key owned by this service account.
      operationId: UpdateServiceAccountApplicationKey
      parameters:
      - $ref: '#/components/parameters/ServiceAccountID'
      - $ref: '#/components/parameters/ApplicationKeyID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationKeyUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartialApplicationKeyResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Not Found
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Edit an Application Key for This Service Account
      tags:
      - Keys
      x-codegen-request-body-name: body
      x-menu-order: 2
      x-permission:
        operator: OR
        permissions:
        - service_account_write
      x-undo:
        type: idempotent
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    UsersType:
      default: users
      description: Users resource type.
      enum:
      - users
      example: users
      type: string
      x-enum-varnames:
      - USERS
    PartialAPIKey:
      description: Partial Datadog API key.
      properties:
        attributes:
          $ref: '#/components/schemas/PartialAPIKeyAttributes'
        id:
          description: ID of the API key.
          type: string
          example: abc-123-def
        relationships:
          $ref: '#/components/schemas/APIKeyRelationships'
        type:
          $ref: '#/components/schemas/APIKeysType'
      type: object
      x-merge-override:
        required: false
    APIKeyRelationships:
      description: Resources related to the API key.
      properties:
        created_by:
          $ref: '#/components/schemas/RelationshipToUser'
        modified_by:
          $ref: '#/components/schemas/NullableRelationshipToUser'
      type: object
    LeakedKeyAttributes:
      description: The definition of LeakedKeyAttributes object.
      properties:
        date:
          description: The LeakedKeyAttributes date.
          example: '2017-07-21T17:

# --- truncated at 32 KB (70 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/datadog/refs/heads/main/openapi/datadog-keys-api-openapi.yml