Skip to main content

application_keys

Creates, updates, deletes, gets or lists an application_keys resource.

Overview

Nameapplication_keys
TypeResource
Iddatadog.organization.application_keys

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringID of the application key.
attributesobjectAttributes of a full application key.
relationshipsobjectResources related to the application key.
typestringApplication Keys resource type. (application_keys) (default: application_keys, example: application_keys)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_application_keyselectapp_key_idincludeGet an application key for your org.
list_application_keysselectpage[size], page[number], sort, filter, filter[created_at][start], filter[created_at][end], filter[owned_by], includeList all application keys available for your org
create_application_key_v1insertCreate an application key with a given name.<br />This endpoint is disabled for organizations in [One-Time Read mode](https:​//docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode).<br /><br />Note: This endpoint is disabled for the Government sites (US1-FED and US2-FED). Use the [V2 Key Management](https:​//docs.datadoghq.com/api/latest/key-management/) endpoints instead.
update_application_keyupdateapp_key_id, dataEdit an application key
delete_application_keydeleteapp_key_idDelete an application key

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
app_key_idstringThe ID of the application key.
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.
filterstringFilter application keys by the specified string.
filter[created_at][end]stringOnly include application keys created on or before the specified date.
filter[created_at][start]stringOnly include application keys created on or after the specified date.
filter[owned_by]stringFilter application keys by owner ID.
includestringResource path for related resources to include in the response. Only owned_by is supported.
page[number]integer (int64)Specific page number to return.
page[size]integer (int64)Number of items to return per page. The maximum allowed value is 100.
sortstringApplication key attribute used to sort results. Sort order is ascending by default. In order to specify a descending sort, prefix the attribute with a minus sign.

SELECT examples

Get an application key for your org.

SELECT
id,
attributes,
relationships,
type
FROM datadog.organization.application_keys
WHERE app_key_id = '{{ app_key_id }}' -- required
AND include = '{{ include }}'
;

INSERT examples

Create an application key with a given name.<br />This endpoint is disabled for organizations in [One-Time Read mode](https:​//docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode).<br /><br />Note: This endpoint is disabled for the Government sites (US1-FED and US2-FED). Use the [V2 Key Management](https:​//docs.datadoghq.com/api/latest/key-management/) endpoints instead.

INSERT INTO datadog.organization.application_keys (
name
)
SELECT
'{{ name }}'
RETURNING
application_key
;

UPDATE examples

Edit an application key

UPDATE datadog.organization.application_keys
SET
data = '{{ data }}'
WHERE
app_key_id = '{{ app_key_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data,
included;

DELETE examples

Delete an application key

DELETE FROM datadog.organization.application_keys
WHERE app_key_id = '{{ app_key_id }}' --required
;