apps
Creates, updates, deletes, gets or lists an apps
resource.
Overview
Name | apps |
Type | Resource |
Id | datadog.infrastructure.apps |
Fields
The following fields are returned by SELECT
queries:
- get_app
- list_apps
Name | Datatype | Description |
---|---|---|
id | string (uuid) | The ID of the app. (example: 65bb1f25-52e1-4510-9f8d-22d1516ed693) |
attributes | object | The app definition attributes, such as name, description, and components. |
type | string | The app definition type. (default: appDefinitions, example: appDefinitions) |
Name | Datatype | Description |
---|---|---|
id | string (uuid) | The ID of the app. (example: 65bb1f25-52e1-4510-9f8d-22d1516ed693) |
attributes | object | Basic information about the app such as name, description, and tags. |
meta | object | Metadata of an app. |
relationships | object | The app's publication information. |
type | string | The app definition type. (default: appDefinitions, example: appDefinitions) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_app | select | app_id , region | version | Get the full definition of an app. This API requires a registered application key. Alternatively, you can configure these permissions in the UI. |
list_apps | select | region | limit , page , filter[user_name] , filter[user_uuid] , filter[name] , filter[query] , filter[deployed] , filter[tags] , filter[favorite] , filter[self_service] , sort | List 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_app | insert | region | Create a new app, returning the app ID. This API requires a registered application key. Alternatively, you can configure these permissions in the UI. | |
update_app | update | app_id , region | 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. | |
delete_app | delete | app_id , region | Delete a single app. This API requires a registered application key. Alternatively, you can configure these permissions in the UI. | |
delete_apps | delete | region | Delete 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_app | exec | app_id , region | 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. | |
publish_app | exec | app_id , region | Publish 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.
Name | Datatype | Description |
---|---|---|
app_id | string (uuid) | The ID of the app to publish. (example: 65bb1f25-52e1-4510-9f8d-22d1516ed693) |
region | string | (default: datadoghq.com) |
filter[deployed] | boolean | Filter apps by whether they are published. |
filter[favorite] | boolean | Filter apps by whether you have added them to your favorites. |
filter[name] | string | Filter by app name. |
filter[query] | string | Filter apps by the app name or the app creator. |
filter[self_service] | boolean | Filter apps by whether they are enabled for self-service. |
filter[tags] | string | Filter apps by tags. |
filter[user_name] | string | Filter 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) |
limit | integer (int64) | The number of apps to return per page. |
page | integer (int64) | The page number to return. |
sort | array | The fields and direction to sort apps by. |
version | string | The 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_app
- list_apps
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 }}'
;
List 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.
SELECT
id,
attributes,
meta,
relationships,
type
FROM datadog.infrastructure.apps
WHERE region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND page = '{{ page }}'
AND filter[user_name] = '{{ filter[user_name] }}'
AND filter[user_uuid] = '{{ filter[user_uuid] }}'
AND filter[name] = '{{ filter[name] }}'
AND filter[query] = '{{ filter[query] }}'
AND filter[deployed] = '{{ filter[deployed] }}'
AND filter[tags] = '{{ filter[tags] }}'
AND filter[favorite] = '{{ filter[favorite] }}'
AND filter[self_service] = '{{ filter[self_service] }}'
AND sort = '{{ sort }}'
;
INSERT
examples
- create_app
- Manifest
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
;
# Description fields are for documentation purposes
- name: apps
props:
- name: region
value: string
description: Required parameter for the apps resource.
- name: data
value: object
description: |
The data object containing the app definition.
UPDATE
examples
- update_app
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_app
- delete_apps
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
;
Delete 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.
DELETE FROM datadog.infrastructure.apps
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- unpublish_app
- publish_app
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
;
Publish 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.
EXEC datadog.infrastructure.apps.publish_app
@app_id='{{ app_id }}' --required,
@region='{{ region }}' --required
;