Skip to main content

apps

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

Overview

Nameapps
TypeResource
Iddatadog.infrastructure.apps

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uuid)The ID of the app. (example: 65bb1f25-52e1-4510-9f8d-22d1516ed693)
attributesobjectThe app definition attributes, such as name, description, and components.
typestringThe app definition type. (default: appDefinitions, example: appDefinitions)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_appselectapp_id, regionversionGet the full definition of an app. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
list_appsselectregionlimit, page, filter[user_name], filter[user_uuid], filter[name], filter[query], filter[deployed], filter[tags], filter[favorite], filter[self_service], sortList all apps, with optional filters and sorting. This endpoint is paginated. Only basic app information such as the app ID, name, and description is returned by this endpoint. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
create_appinsertregionCreate a new app, returning the app ID. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
update_appupdateapp_id, regionUpdate an existing app. This creates a new version of the app. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
delete_appdeleteapp_id, regionDelete a single app. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
delete_appsdeleteregionDelete multiple apps in a single request from a list of app IDs. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
unpublish_appexecapp_id, regionUnpublish an app, removing the live version of the app. Unpublishing creates a new instance of a deployment object on the app, with a nil app_version_id (00000000-0000-0000-0000-000000000000). The app can still be updated and published again in the future. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.
publish_appexecapp_id, regionPublish an app for use by other users. To ensure the app is accessible to the correct users, you also need to set a Restriction Policy on the app if a policy does not yet exist. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.

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_idstring (uuid)The ID of the app to publish. (example: 65bb1f25-52e1-4510-9f8d-22d1516ed693)
regionstring(default: datadoghq.com)
filter[deployed]booleanFilter apps by whether they are published.
filter[favorite]booleanFilter apps by whether you have added them to your favorites.
filter[name]stringFilter by app name.
filter[query]stringFilter apps by the app name or the app creator.
filter[self_service]booleanFilter apps by whether they are enabled for self-service.
filter[tags]stringFilter apps by tags.
filter[user_name]stringFilter apps by the app creator. Usually the user's email.
filter[user_uuid]string (uuid)Filter apps by the app creator's UUID. (example: 65bb1f25-52e1-4510-9f8d-22d1516ed693)
limitinteger (int64)The number of apps to return per page.
pageinteger (int64)The page number to return.
sortarrayThe fields and direction to sort apps by.
versionstringThe version number of the app to retrieve. If not specified, the latest version is returned. Version numbers start at 1 and increment with each update. The special values latest and deployed can be used to retrieve the latest version or the published version, respectively.

SELECT examples

Get the full definition of an app. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.

SELECT
id,
attributes,
type
FROM datadog.infrastructure.apps
WHERE app_id = '{{ app_id }}' -- required
AND region = '{{ region }}' -- required
AND version = '{{ version }}'
;

INSERT examples

Create a new app, returning the app ID. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.

INSERT INTO datadog.infrastructure.apps (
data__data,
region
)
SELECT
'{{ data }}',
'{{ region }}'
RETURNING
data
;

UPDATE examples

Update an existing app. This creates a new version of the app. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.

UPDATE datadog.infrastructure.apps
SET
data__data = '{{ data }}'
WHERE
app_id = '{{ app_id }}' --required
AND region = '{{ region }}' --required
RETURNING
data,
included,
meta,
relationship;

DELETE examples

Delete a single app. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.

DELETE FROM datadog.infrastructure.apps
WHERE app_id = '{{ app_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Unpublish an app, removing the live version of the app. Unpublishing creates a new instance of a deployment object on the app, with a nil app_version_id (00000000-0000-0000-0000-000000000000). The app can still be updated and published again in the future. This API requires a registered application key. Alternatively, you can configure these permissions in the UI.

EXEC datadog.infrastructure.apps.unpublish_app 
@app_id='{{ app_id }}' --required,
@region='{{ region }}' --required
;