apis
Creates, updates, deletes, gets or lists an apis
resource.
Overview
Name | apis |
Type | Resource |
Id | datadog.catalog.apis |
Fields
The following fields are returned by SELECT
queries:
- list_apis
Name | Datatype | Description |
---|---|---|
id | string (uuid) | API identifier. (example: 90646597-5fdb-4a17-a240-647003f8c028) |
attributes | object | Attributes for ListAPIsResponseData . |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_apis | select | region | query , page[limit] , page[offset] | List APIs and their IDs. |
create_open_api | insert | region | Create a new API from the OpenAPI specification given. See the API Catalog documentation for additional information about the possible metadata. It returns the created API ID. | |
update_open_api | replace | id , region | Update information about a specific API. The given content will replace all API content of the given ID. The ID is returned by the create API, or can be found in the URL in the API catalog UI. | |
delete_open_api | delete | id , region | Delete a specific API by ID. | |
get_open_api | exec | id , region | Retrieve information about a specific API in OpenAPI format file. |
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 |
---|---|---|
id | string (uuid) | ID of the API to retrieve |
region | string | (default: datadoghq.com) |
page[limit] | integer (int64) | Number of items per page. |
page[offset] | integer (int64) | Offset for pagination. |
query | string | Filter APIs by name |
SELECT
examples
- list_apis
List APIs and their IDs.
SELECT
id,
attributes
FROM datadog.catalog.apis
WHERE region = '{{ region }}' -- required
AND query = '{{ query }}'
AND page[limit] = '{{ page[limit] }}'
AND page[offset] = '{{ page[offset] }}'
;
INSERT
examples
- create_open_api
- Manifest
Create a new API from the OpenAPI specification given.
See the API Catalog documentation for additional
information about the possible metadata.
It returns the created API ID.
INSERT INTO datadog.catalog.apis (
data__openapi_spec_file,
region
)
SELECT
'{{ openapi_spec_file }}',
'{{ region }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: apis
props:
- name: region
value: string
description: Required parameter for the apis resource.
- name: openapi_spec_file
value: string
description: |
Binary `OpenAPI` spec file
REPLACE
examples
- update_open_api
Update information about a specific API. The given content will replace all API content of the given ID.
The ID is returned by the create API, or can be found in the URL in the API catalog UI.
REPLACE datadog.catalog.apis
SET
data__openapi_spec_file = '{{ openapi_spec_file }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
RETURNING
data;
DELETE
examples
- delete_open_api
Delete a specific API by ID.
DELETE FROM datadog.catalog.apis
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- get_open_api
Retrieve information about a specific API in OpenAPI format file.
EXEC datadog.catalog.apis.get_open_api
@id='{{ id }}' --required,
@region='{{ region }}' --required
;