Skip to content

Commit 01974c4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add new endpoint to upsert/list/delete custom kinds (#2600)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 914758b commit 01974c4

20 files changed

+1074
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-06-06 14:53:22.275829",
8-
"spec_repo_commit": "e591d5d4"
7+
"regenerated": "2025-06-06 17:43:35.755139",
8+
"spec_repo_commit": "01341d5b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-06 14:53:22.290847",
13-
"spec_repo_commit": "e591d5d4"
12+
"regenerated": "2025-06-06 17:43:35.770681",
13+
"spec_repo_commit": "01341d5b"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,14 @@ components:
563563
required: true
564564
schema:
565565
type: string
566+
KindID:
567+
description: Entity kind.
568+
in: path
569+
name: kind_id
570+
required: true
571+
schema:
572+
example: my-job
573+
type: string
566574
MetricID:
567575
description: The name of the log-based metric.
568576
in: path
@@ -19303,6 +19311,90 @@ components:
1930319311
- index
1930419312
- caseIndex
1930519313
type: object
19314+
KindAttributes:
19315+
description: Kind attributes.
19316+
properties:
19317+
description:
19318+
description: Short description of the kind.
19319+
type: string
19320+
displayName:
19321+
description: User friendly name of the kind.
19322+
type: string
19323+
name:
19324+
description: The kind name.
19325+
example: my-job
19326+
minLength: 1
19327+
type: string
19328+
type: object
19329+
KindData:
19330+
description: Schema that defines the structure of a Kind object in the Software
19331+
Catalog.
19332+
properties:
19333+
attributes:
19334+
$ref: '#/components/schemas/KindAttributes'
19335+
id:
19336+
description: A read-only globally unique identifier for the entity generated
19337+
by Datadog. User supplied values are ignored.
19338+
example: 4b163705-23c0-4573-b2fb-f6cea2163fcb
19339+
minLength: 1
19340+
type: string
19341+
meta:
19342+
$ref: '#/components/schemas/KindMetadata'
19343+
type:
19344+
description: Kind.
19345+
type: string
19346+
type: object
19347+
KindMetadata:
19348+
description: Kind metadata.
19349+
properties:
19350+
createdAt:
19351+
description: The creation time.
19352+
type: string
19353+
modifiedAt:
19354+
description: The modification time.
19355+
type: string
19356+
type: object
19357+
KindObj:
19358+
description: Schema for kind.
19359+
properties:
19360+
description:
19361+
description: Short description of the kind.
19362+
type: string
19363+
displayName:
19364+
description: The display name of the kind. Automatically generated if not
19365+
provided.
19366+
type: string
19367+
kind:
19368+
description: The name of the kind to create or update. This must be in kebab-case
19369+
format.
19370+
example: my-job
19371+
type: string
19372+
required:
19373+
- kind
19374+
type: object
19375+
KindRaw:
19376+
description: Kind definition in raw JSON or YAML representation.
19377+
example: 'kind: service
19378+
19379+
displayName: Service
19380+
19381+
description: A service entity in the catalog.
19382+
19383+
'
19384+
type: string
19385+
KindResponseData:
19386+
description: List of kind responses.
19387+
items:
19388+
$ref: '#/components/schemas/KindData'
19389+
type: array
19390+
KindResponseMeta:
19391+
description: Kind response metadata.
19392+
properties:
19393+
count:
19394+
description: Total kinds count.
19395+
format: int64
19396+
type: integer
19397+
type: object
1930619398
Layer:
1930719399
description: Encapsulates a layer resource, holding attributes like rotation
1930819400
details, plus relationships to the members covering that layer.
@@ -19789,6 +19881,14 @@ components:
1978919881
meta:
1979019882
$ref: '#/components/schemas/HistoricalJobListMeta'
1979119883
type: object
19884+
ListKindCatalogResponse:
19885+
description: List kind response.
19886+
properties:
19887+
data:
19888+
$ref: '#/components/schemas/KindResponseData'
19889+
meta:
19890+
$ref: '#/components/schemas/KindResponseMeta'
19891+
type: object
1979219892
ListPipelinesResponse:
1979319893
description: Represents the response payload containing a list of pipelines
1979419894
and associated metadata.
@@ -39531,6 +39631,19 @@ components:
3953139631
description: Upsert entity response included item.
3953239632
oneOf:
3953339633
- $ref: '#/components/schemas/EntityResponseIncludedSchema'
39634+
UpsertCatalogKindRequest:
39635+
description: Create or update kind request.
39636+
oneOf:
39637+
- $ref: '#/components/schemas/KindObj'
39638+
- $ref: '#/components/schemas/KindRaw'
39639+
UpsertCatalogKindResponse:
39640+
description: Upsert kind response.
39641+
properties:
39642+
data:
39643+
$ref: '#/components/schemas/KindResponseData'
39644+
meta:
39645+
$ref: '#/components/schemas/KindResponseMeta'
39646+
type: object
3953439647
Urgency:
3953539648
description: Specifies the level of urgency for a routing rule (low, high, or
3953639649
dynamic).
@@ -43768,6 +43881,105 @@ paths:
4376843881
summary: Delete a single entity
4376943882
tags:
4377043883
- Software Catalog
43884+
/api/v2/catalog/kind:
43885+
get:
43886+
description: Get a list of entity kinds from Software Catalog.
43887+
operationId: ListCatalogKind
43888+
parameters:
43889+
- $ref: '#/components/parameters/PageOffset'
43890+
- description: Maximum number of kinds in the response.
43891+
example: 100
43892+
in: query
43893+
name: page[limit]
43894+
required: false
43895+
schema:
43896+
default: 100
43897+
format: int64
43898+
type: integer
43899+
- $ref: '#/components/parameters/FilterByID'
43900+
- $ref: '#/components/parameters/FilterByName'
43901+
responses:
43902+
'200':
43903+
content:
43904+
application/json:
43905+
schema:
43906+
$ref: '#/components/schemas/ListKindCatalogResponse'
43907+
description: OK
43908+
'400':
43909+
$ref: '#/components/responses/BadRequestResponse'
43910+
'403':
43911+
$ref: '#/components/responses/ForbiddenResponse'
43912+
'429':
43913+
$ref: '#/components/responses/TooManyRequestsResponse'
43914+
security:
43915+
- apiKeyAuth: []
43916+
appKeyAuth: []
43917+
- AuthZ:
43918+
- apm_service_catalog_read
43919+
summary: Get a list of entity kinds
43920+
tags:
43921+
- Software Catalog
43922+
x-pagination:
43923+
limitParam: page[limit]
43924+
pageOffsetParam: page[offset]
43925+
resultsPath: data
43926+
post:
43927+
description: Create or update kinds in Software Catalog.
43928+
operationId: UpsertCatalogKind
43929+
requestBody:
43930+
content:
43931+
application/json:
43932+
schema:
43933+
$ref: '#/components/schemas/UpsertCatalogKindRequest'
43934+
description: Kind YAML or JSON.
43935+
required: true
43936+
responses:
43937+
'202':
43938+
content:
43939+
application/json:
43940+
schema:
43941+
$ref: '#/components/schemas/UpsertCatalogKindResponse'
43942+
description: ACCEPTED
43943+
'400':
43944+
$ref: '#/components/responses/BadRequestResponse'
43945+
'403':
43946+
$ref: '#/components/responses/ForbiddenResponse'
43947+
'429':
43948+
$ref: '#/components/responses/TooManyRequestsResponse'
43949+
security:
43950+
- apiKeyAuth: []
43951+
appKeyAuth: []
43952+
- AuthZ:
43953+
- apm_service_catalog_write
43954+
summary: Create or update kinds
43955+
tags:
43956+
- Software Catalog
43957+
x-codegen-request-body-name: body
43958+
/api/v2/catalog/kind/{kind_id}:
43959+
delete:
43960+
description: Delete a single kind in Software Catalog.
43961+
operationId: DeleteCatalogKind
43962+
parameters:
43963+
- $ref: '#/components/parameters/KindID'
43964+
responses:
43965+
'204':
43966+
description: OK
43967+
'400':
43968+
$ref: '#/components/responses/BadRequestResponse'
43969+
'403':
43970+
$ref: '#/components/responses/ForbiddenResponse'
43971+
'404':
43972+
$ref: '#/components/responses/NotFoundResponse'
43973+
'429':
43974+
$ref: '#/components/responses/TooManyRequestsResponse'
43975+
security:
43976+
- apiKeyAuth: []
43977+
appKeyAuth: []
43978+
- AuthZ:
43979+
- apm_service_catalog_write
43980+
summary: Delete a single kind
43981+
tags:
43982+
- Software Catalog
4377143983
/api/v2/catalog/relation:
4377243984
get:
4377343985
description: Get a list of entity relations from Software Catalog.

docs/datadog_api_client.v2.model.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8019,6 +8019,41 @@ datadog\_api\_client.v2.model.jsonapi\_error\_response module
80198019
:members:
80208020
:show-inheritance:
80218021

8022+
datadog\_api\_client.v2.model.kind\_attributes module
8023+
-----------------------------------------------------
8024+
8025+
.. automodule:: datadog_api_client.v2.model.kind_attributes
8026+
:members:
8027+
:show-inheritance:
8028+
8029+
datadog\_api\_client.v2.model.kind\_data module
8030+
-----------------------------------------------
8031+
8032+
.. automodule:: datadog_api_client.v2.model.kind_data
8033+
:members:
8034+
:show-inheritance:
8035+
8036+
datadog\_api\_client.v2.model.kind\_metadata module
8037+
---------------------------------------------------
8038+
8039+
.. automodule:: datadog_api_client.v2.model.kind_metadata
8040+
:members:
8041+
:show-inheritance:
8042+
8043+
datadog\_api\_client.v2.model.kind\_obj module
8044+
----------------------------------------------
8045+
8046+
.. automodule:: datadog_api_client.v2.model.kind_obj
8047+
:members:
8048+
:show-inheritance:
8049+
8050+
datadog\_api\_client.v2.model.kind\_response\_meta module
8051+
---------------------------------------------------------
8052+
8053+
.. automodule:: datadog_api_client.v2.model.kind_response_meta
8054+
:members:
8055+
:show-inheritance:
8056+
80228057
datadog\_api\_client.v2.model.layer module
80238058
------------------------------------------
80248059

@@ -8271,6 +8306,13 @@ datadog\_api\_client.v2.model.list\_historical\_jobs\_response module
82718306
:members:
82728307
:show-inheritance:
82738308

8309+
datadog\_api\_client.v2.model.list\_kind\_catalog\_response module
8310+
------------------------------------------------------------------
8311+
8312+
.. automodule:: datadog_api_client.v2.model.list_kind_catalog_response
8313+
:members:
8314+
:show-inheritance:
8315+
82748316
datadog\_api\_client.v2.model.list\_pipelines\_response module
82758317
--------------------------------------------------------------
82768318

@@ -17231,6 +17273,20 @@ datadog\_api\_client.v2.model.upsert\_catalog\_entity\_response\_included\_item
1723117273
:members:
1723217274
:show-inheritance:
1723317275

17276+
datadog\_api\_client.v2.model.upsert\_catalog\_kind\_request module
17277+
-------------------------------------------------------------------
17278+
17279+
.. automodule:: datadog_api_client.v2.model.upsert_catalog_kind_request
17280+
:members:
17281+
:show-inheritance:
17282+
17283+
datadog\_api\_client.v2.model.upsert\_catalog\_kind\_response module
17284+
--------------------------------------------------------------------
17285+
17286+
.. automodule:: datadog_api_client.v2.model.upsert_catalog_kind_response
17287+
:members:
17288+
:show-inheritance:
17289+
1723417290
datadog\_api\_client.v2.model.urgency module
1723517291
--------------------------------------------
1723617292

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Delete a single kind returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.software_catalog_api import SoftwareCatalogApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = SoftwareCatalogApi(api_client)
11+
api_instance.delete_catalog_kind(
12+
kind_id="my-job",
13+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Get a list of entity kinds returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.software_catalog_api import SoftwareCatalogApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = SoftwareCatalogApi(api_client)
11+
response = api_instance.list_catalog_kind()
12+
13+
print(response)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Get a list of entity kinds returns "OK" response with pagination
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.software_catalog_api import SoftwareCatalogApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = SoftwareCatalogApi(api_client)
11+
items = api_instance.list_catalog_kind_with_pagination()
12+
for item in items:
13+
print(item)

0 commit comments

Comments
 (0)