diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 085c5aa51a7..011c51ec120 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -5795,6 +5795,33 @@ components:
type:
$ref: '#/components/schemas/FindingType'
type: object
+ BulkPutAppsDatastoreItemsRequest:
+ description: Request to insert multiple items into a datastore in a single operation.
+ properties:
+ data:
+ $ref: '#/components/schemas/BulkPutAppsDatastoreItemsRequestData'
+ type: object
+ BulkPutAppsDatastoreItemsRequestData:
+ description: Data wrapper containing the items to insert and their configuration
+ for the bulk insert operation.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/BulkPutAppsDatastoreItemsRequestDataAttributes'
+ type:
+ $ref: '#/components/schemas/DatastoreItemsDataType'
+ required:
+ - type
+ type: object
+ BulkPutAppsDatastoreItemsRequestDataAttributes:
+ description: Configuration for bulk inserting multiple items into a datastore.
+ properties:
+ conflict_mode:
+ $ref: '#/components/schemas/DatastoreItemConflictMode'
+ values:
+ $ref: '#/components/schemas/DatastoreItemValues'
+ required:
+ - values
+ type: object
CIAppAggregateBucketValue:
description: A bucket value, can either be a timeseries or a single value.
oneOf:
@@ -10785,6 +10812,77 @@ components:
- id
- type
type: object
+ CreateAppsDatastoreRequest:
+ description: Request to create a new datastore with specified configuration
+ and metadata.
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateAppsDatastoreRequestData'
+ type: object
+ CreateAppsDatastoreRequestData:
+ description: Data wrapper containing the configuration needed to create a new
+ datastore.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/CreateAppsDatastoreRequestDataAttributes'
+ id:
+ description: Optional ID for the new datastore. If not provided, one will
+ be generated automatically.
+ type: string
+ type:
+ $ref: '#/components/schemas/DatastoreDataType'
+ required:
+ - type
+ type: object
+ CreateAppsDatastoreRequestDataAttributes:
+ description: Configuration and metadata to create a new datastore.
+ properties:
+ description:
+ description: A human-readable description about the datastore.
+ type: string
+ name:
+ description: The display name for the new datastore.
+ example: datastore-name
+ type: string
+ org_access:
+ $ref: '#/components/schemas/CreateAppsDatastoreRequestDataAttributesOrgAccess'
+ primary_column_name:
+ $ref: '#/components/schemas/DatastoreAttributesPrimaryColumnName'
+ primary_key_generation_strategy:
+ $ref: '#/components/schemas/DatastorePrimaryKeyGenerationStrategy'
+ required:
+ - name
+ - primary_column_name
+ type: object
+ CreateAppsDatastoreRequestDataAttributesOrgAccess:
+ description: The organization access level for the datastore. For example, 'contributor'.
+ enum:
+ - contributor
+ - viewer
+ - manager
+ type: string
+ x-enum-varnames:
+ - CONTRIBUTOR
+ - VIEWER
+ - MANAGER
+ CreateAppsDatastoreResponse:
+ description: Response after successfully creating a new datastore, containing
+ the datastore's assigned ID.
+ properties:
+ data:
+ $ref: '#/components/schemas/CreateAppsDatastoreResponseData'
+ type: object
+ CreateAppsDatastoreResponseData:
+ description: The newly created datastore's data.
+ properties:
+ id:
+ description: The unique identifier assigned to the newly created datastore.
+ type: string
+ type:
+ $ref: '#/components/schemas/DatastoreDataType'
+ required:
+ - type
+ type: object
CreateCustomFrameworkRequest:
description: Request object to create a custom framework.
properties:
@@ -12635,7 +12733,7 @@ components:
type: string
finished_at:
description: Unix timestamp when the failure finished. It must be in nanoseconds,
- milliseconds, or seconds, and it should not be older than 1 hour.
+ milliseconds, or seconds.
example: 1693491984000000000
format: int64
type: integer
@@ -13512,6 +13610,134 @@ components:
required:
- data
type: object
+ Datastore:
+ description: A datastore's complete configuration and metadata.
+ properties:
+ data:
+ $ref: '#/components/schemas/DatastoreData'
+ type: object
+ DatastoreArray:
+ description: A collection of datastores returned by list operations.
+ properties:
+ data:
+ description: An array of datastore objects containing their configurations
+ and metadata.
+ items:
+ $ref: '#/components/schemas/DatastoreData'
+ type: array
+ required:
+ - data
+ type: object
+ DatastoreAttributesPrimaryColumnName:
+ description: "The name of the primary key column for this datastore. Primary
+ column names:\n - Must abide by both [PostgreSQL naming conventions](https://www.postgresql.org/docs/7.0/syntax525.htm)\n
+ \ - Cannot exceed 63 characters"
+ example: ''
+ maxLength: 63
+ type: string
+ DatastoreData:
+ description: Core information about a datastore, including its unique identifier
+ and attributes.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DatastoreDataAttributes'
+ id:
+ description: The unique identifier of the datastore.
+ type: string
+ type:
+ $ref: '#/components/schemas/DatastoreDataType'
+ required:
+ - type
+ type: object
+ DatastoreDataAttributes:
+ description: Detailed information about a datastore.
+ properties:
+ created_at:
+ description: Timestamp when the datastore was created.
+ format: date-time
+ type: string
+ creator_user_id:
+ description: The numeric ID of the user who created the datastore.
+ format: int64
+ type: integer
+ creator_user_uuid:
+ description: The UUID of the user who created the datastore.
+ type: string
+ description:
+ description: A human-readable description about the datastore.
+ type: string
+ modified_at:
+ description: Timestamp when the datastore was last modified.
+ format: date-time
+ type: string
+ name:
+ description: The display name of the datastore.
+ type: string
+ org_id:
+ description: The ID of the organization that owns this datastore.
+ format: int64
+ type: integer
+ primary_column_name:
+ $ref: '#/components/schemas/DatastoreAttributesPrimaryColumnName'
+ primary_key_generation_strategy:
+ $ref: '#/components/schemas/DatastorePrimaryKeyGenerationStrategy'
+ type: object
+ DatastoreDataType:
+ default: datastores
+ description: The resource type for datastores.
+ enum:
+ - datastores
+ example: datastores
+ type: string
+ x-enum-varnames:
+ - DATASTORES
+ DatastoreItemConflictMode:
+ description: How to handle conflicts when inserting items that already exist
+ in the datastore.
+ enum:
+ - fail_on_conflict
+ - overwrite_on_conflict
+ example: overwrite_on_conflict
+ type: string
+ x-enum-varnames:
+ - FAIL_ON_CONFLICT
+ - OVERWRITE_ON_CONFLICT
+ DatastoreItemValues:
+ description: An array of items to add to the datastore, where each item is a
+ set of key-value pairs representing the item's data. Up to 100 items can be
+ updated in a single request.
+ example:
+ - data: example data
+ key: value
+ - data: example data2
+ key: value2
+ items:
+ additionalProperties: {}
+ description: A single item's data as key-value pairs. Key names cannot exceed
+ 63 characters.
+ type: object
+ maxItems: 100
+ type: array
+ DatastoreItemsDataType:
+ default: items
+ description: The resource type for datastore items.
+ enum:
+ - items
+ example: items
+ type: string
+ x-enum-varnames:
+ - ITEMS
+ DatastorePrimaryKeyGenerationStrategy:
+ description: Can be set to `uuid` to automatically generate primary keys when
+ new items are added. Default value is `none`, which requires you to supply
+ a primary key for each new item.
+ enum:
+ - none
+ - uuid
+ type: string
+ x-enum-varnames:
+ - NONE
+ - UUID
Date:
description: Date as Unix timestamp in milliseconds.
example: 1722439510282
@@ -13537,6 +13763,59 @@ components:
- id
- type
type: object
+ DeleteAppsDatastoreItemRequest:
+ description: Request to delete a specific item from a datastore by its primary
+ key.
+ properties:
+ data:
+ $ref: '#/components/schemas/DeleteAppsDatastoreItemRequestData'
+ type: object
+ DeleteAppsDatastoreItemRequestData:
+ description: Data wrapper containing the information needed to identify and
+ delete a specific datastore item.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/DeleteAppsDatastoreItemRequestDataAttributes'
+ type:
+ $ref: '#/components/schemas/DatastoreItemsDataType'
+ required:
+ - type
+ type: object
+ DeleteAppsDatastoreItemRequestDataAttributes:
+ description: Attributes specifying which datastore item to delete by its primary
+ key.
+ properties:
+ id:
+ description: Optional unique identifier of the item to delete.
+ example: a7656bcc-51d4-4884-adf7-4d0d9a3e0633
+ type: string
+ item_key:
+ description: The primary key value that identifies the item to delete. Cannot
+ exceed 256 characters.
+ example: primaryKey
+ maxLength: 256
+ type: string
+ required:
+ - item_key
+ type: object
+ DeleteAppsDatastoreItemResponse:
+ description: Response from successfully deleting a datastore item.
+ properties:
+ data:
+ $ref: '#/components/schemas/DeleteAppsDatastoreItemResponseData'
+ type: object
+ DeleteAppsDatastoreItemResponseData:
+ description: Data containing the identifier of the datastore item that was successfully
+ deleted.
+ properties:
+ id:
+ description: The unique identifier of the item that was deleted.
+ type: string
+ type:
+ $ref: '#/components/schemas/DatastoreItemsDataType'
+ required:
+ - type
+ type: object
DeleteAppsRequest:
description: A request object for deleting multiple apps by ID.
example:
@@ -22969,6 +23248,125 @@ components:
type: string
x-enum-varnames:
- ERROR_TRACKING_SEARCH_RESULT
+ ItemApiPayload:
+ description: A single datastore item with its content and metadata.
+ properties:
+ data:
+ $ref: '#/components/schemas/ItemApiPayloadData'
+ type: object
+ ItemApiPayloadArray:
+ description: A collection of datastore items with pagination and schema metadata.
+ properties:
+ data:
+ description: An array of datastore items with their content and metadata.
+ items:
+ $ref: '#/components/schemas/ItemApiPayloadData'
+ maxItems: 100
+ type: array
+ meta:
+ $ref: '#/components/schemas/ItemApiPayloadMeta'
+ description: Metadata about the included items, including pagination info
+ and datastore schema.
+ required:
+ - data
+ type: object
+ ItemApiPayloadData:
+ description: Core data and metadata for a single datastore item.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/ItemApiPayloadDataAttributes'
+ id:
+ description: The unique identifier of the datastore.
+ type: string
+ type:
+ $ref: '#/components/schemas/DatastoreItemsDataType'
+ required:
+ - type
+ type: object
+ ItemApiPayloadDataAttributes:
+ description: Metadata and content of a datastore item.
+ properties:
+ created_at:
+ description: Timestamp when the item was first created.
+ format: date-time
+ type: string
+ modified_at:
+ description: Timestamp when the item was last modified.
+ format: date-time
+ type: string
+ org_id:
+ description: The ID of the organization that owns this item.
+ format: int64
+ type: integer
+ primary_column_name:
+ $ref: '#/components/schemas/DatastoreAttributesPrimaryColumnName'
+ signature:
+ description: A unique signature identifying this item version.
+ type: string
+ store_id:
+ description: The unique identifier of the datastore containing this item.
+ type: string
+ value:
+ $ref: '#/components/schemas/ItemApiPayloadDataAttributesValue'
+ type: object
+ ItemApiPayloadDataAttributesValue:
+ additionalProperties: {}
+ description: The data content (as key-value pairs) of a datastore item.
+ type: object
+ ItemApiPayloadMeta:
+ description: Additional metadata about a collection of datastore items, including
+ pagination and schema information.
+ properties:
+ page:
+ $ref: '#/components/schemas/ItemApiPayloadMetaPage'
+ schema:
+ $ref: '#/components/schemas/ItemApiPayloadMetaSchema'
+ type: object
+ ItemApiPayloadMetaPage:
+ description: Pagination information for a collection of datastore items.
+ properties:
+ hasMore:
+ description: Whether there are additional pages of items beyond the current
+ page.
+ type: boolean
+ totalCount:
+ description: The total number of items in the datastore, ignoring any filters.
+ format: int64
+ type: integer
+ totalFilteredCount:
+ description: The total number of items that match the current filter criteria.
+ format: int64
+ type: integer
+ type: object
+ ItemApiPayloadMetaSchema:
+ description: Schema information about the datastore, including its primary key
+ and field definitions.
+ properties:
+ fields:
+ description: An array describing the columns available in this datastore.
+ items:
+ $ref: '#/components/schemas/ItemApiPayloadMetaSchemaField'
+ type: array
+ primary_key:
+ description: The name of the primary key column for this datastore.
+ type: string
+ type: object
+ ItemApiPayloadMetaSchemaField:
+ description: Information about a specific column in the datastore schema.
+ properties:
+ name:
+ description: The name of this column in the datastore.
+ example: ''
+ type: string
+ type:
+ description: The data type of this column. For example, 'string', 'number',
+ or 'boolean'.
+ example: ''
+ type: string
+ required:
+ - name
+ - type
+ type: object
JSONAPIErrorItem:
description: API error response body
properties:
@@ -33877,6 +34275,32 @@ components:
data:
$ref: '#/components/schemas/Deployment'
type: object
+ PutAppsDatastoreItemResponseArray:
+ description: Response after successfully inserting multiple items into a datastore,
+ containing the identifiers of the created items.
+ properties:
+ data:
+ description: An array of data objects containing the identifiers of the
+ successfully inserted items.
+ items:
+ $ref: '#/components/schemas/PutAppsDatastoreItemResponseData'
+ maxItems: 100
+ type: array
+ required:
+ - data
+ type: object
+ PutAppsDatastoreItemResponseData:
+ description: Data containing the identifier of a single item that was successfully
+ inserted into the datastore.
+ properties:
+ id:
+ description: The unique identifier assigned to the inserted item.
+ type: string
+ type:
+ $ref: '#/components/schemas/DatastoreItemsDataType'
+ required:
+ - type
+ type: object
PutIncidentNotificationRuleRequest:
description: Put request for a notification rule.
properties:
@@ -45742,6 +46166,94 @@ components:
type: string
type: array
type: object
+ UpdateAppsDatastoreItemRequest:
+ description: Request to update specific fields on an existing datastore item.
+ properties:
+ data:
+ $ref: '#/components/schemas/UpdateAppsDatastoreItemRequestData'
+ type: object
+ UpdateAppsDatastoreItemRequestData:
+ description: Data wrapper containing the item identifier and the changes to
+ apply during the update operation.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/UpdateAppsDatastoreItemRequestDataAttributes'
+ id:
+ description: The unique identifier of the datastore item.
+ type: string
+ type:
+ $ref: '#/components/schemas/UpdateAppsDatastoreItemRequestDataType'
+ required:
+ - type
+ type: object
+ UpdateAppsDatastoreItemRequestDataAttributes:
+ description: Attributes for updating a datastore item, including the item key
+ and changes to apply.
+ properties:
+ id:
+ description: The unique identifier of the item being updated.
+ type: string
+ item_changes:
+ $ref: '#/components/schemas/UpdateAppsDatastoreItemRequestDataAttributesItemChanges'
+ item_key:
+ description: The primary key that identifies the item to update. Cannot
+ exceed 256 characters.
+ example: ''
+ maxLength: 256
+ type: string
+ required:
+ - item_changes
+ - item_key
+ type: object
+ UpdateAppsDatastoreItemRequestDataAttributesItemChanges:
+ description: Changes to apply to a datastore item using set operations.
+ properties:
+ ops_set:
+ additionalProperties: {}
+ description: Set operation that contains key-value pairs to set on the datastore
+ item.
+ type: object
+ type: object
+ UpdateAppsDatastoreItemRequestDataType:
+ default: items
+ description: The resource type for datastore items.
+ enum:
+ - items
+ example: items
+ type: string
+ x-enum-varnames:
+ - ITEMS
+ UpdateAppsDatastoreRequest:
+ description: Request to update a datastore's configuration such as its name
+ or description.
+ properties:
+ data:
+ $ref: '#/components/schemas/UpdateAppsDatastoreRequestData'
+ type: object
+ UpdateAppsDatastoreRequestData:
+ description: Data wrapper containing the datastore identifier and the attributes
+ to update.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/UpdateAppsDatastoreRequestDataAttributes'
+ id:
+ description: The unique identifier of the datastore to update.
+ type: string
+ type:
+ $ref: '#/components/schemas/DatastoreDataType'
+ required:
+ - type
+ type: object
+ UpdateAppsDatastoreRequestDataAttributes:
+ description: Attributes that can be updated on a datastore.
+ properties:
+ description:
+ description: A human-readable description about the datastore.
+ type: string
+ name:
+ description: The display name of the datastore.
+ type: string
+ type: object
UpdateCustomFrameworkRequest:
description: Request object to update a custom framework.
properties:
@@ -47765,6 +48277,378 @@ info:
version: '1.0'
openapi: 3.0.0
paths:
+ /api/v2/actions-datastores:
+ get:
+ description: Lists all datastores for the organization.
+ operationId: ListDatastores
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DatastoreArray'
+ description: OK
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: List datastores
+ tags:
+ - Actions Datastores
+ x-permission:
+ operator: OR
+ permissions:
+ - apps_datastore_read
+ post:
+ description: Creates a new datastore.
+ operationId: CreateDatastore
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateAppsDatastoreRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateAppsDatastoreResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Create datastore
+ tags:
+ - Actions Datastores
+ x-permission:
+ operator: OR
+ permissions:
+ - apps_datastore_manage
+ /api/v2/actions-datastores/{datastore_id}:
+ delete:
+ description: Deletes a datastore by its unique identifier.
+ operationId: DeleteDatastore
+ parameters:
+ - description: The unique identifier of the datastore to retrieve.
+ in: path
+ name: datastore_id
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Delete datastore
+ tags:
+ - Actions Datastores
+ x-permission:
+ operator: OR
+ permissions:
+ - apps_datastore_manage
+ get:
+ description: Retrieves a specific datastore by its ID.
+ operationId: GetDatastore
+ parameters:
+ - description: The unique identifier of the datastore to retrieve.
+ in: path
+ name: datastore_id
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Datastore'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Get datastore
+ tags:
+ - Actions Datastores
+ x-permission:
+ operator: OR
+ permissions:
+ - apps_datastore_read
+ patch:
+ description: Updates an existing datastore's attributes.
+ operationId: UpdateDatastore
+ parameters:
+ - description: The unique identifier of the datastore to retrieve.
+ in: path
+ name: datastore_id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateAppsDatastoreRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Datastore'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Update datastore
+ tags:
+ - Actions Datastores
+ x-permission:
+ operator: OR
+ permissions:
+ - apps_datastore_manage
+ /api/v2/actions-datastores/{datastore_id}/items:
+ delete:
+ description: Deletes an item from a datastore by its key.
+ operationId: DeleteDatastoreItem
+ parameters:
+ - description: The unique identifier of the datastore to retrieve.
+ in: path
+ name: datastore_id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeleteAppsDatastoreItemRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeleteAppsDatastoreItemResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Delete datastore item
+ tags:
+ - Actions Datastores
+ x-permission:
+ operator: OR
+ permissions:
+ - apps_datastore_write
+ get:
+ description: Lists items from a datastore. You can filter the results by specifying
+ either an item key or a filter query parameter, but not both at the same time.
+ Supports server-side pagination for large datasets.
+ operationId: ListDatastoreItems
+ parameters:
+ - description: The unique identifier of the datastore to retrieve.
+ in: path
+ name: datastore_id
+ required: true
+ schema:
+ type: string
+ - description: Optional query filter to search items using the [logs search
+ syntax](https://docs.datadoghq.com/logs/explorer/search_syntax/).
+ in: query
+ name: filter
+ schema:
+ type: string
+ - description: Optional primary key value to retrieve a specific item. Cannot
+ be used together with the filter parameter.
+ in: query
+ name: item_key
+ schema:
+ maxLength: 256
+ type: string
+ - description: Optional field to limit the number of items to return per page
+ for pagination. Up to 100 items can be returned per page.
+ in: query
+ name: page[limit]
+ schema:
+ format: int64
+ maximum: 100
+ minimum: 1
+ type: integer
+ - description: Optional field to offset the number of items to skip from the
+ beginning of the result set for pagination.
+ in: query
+ name: page[offset]
+ schema:
+ format: int64
+ type: integer
+ - description: Optional field to sort results by. Prefix with '-' for descending
+ order (e.g., '-created_at').
+ in: query
+ name: sort
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItemApiPayloadArray'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: List datastore items
+ tags:
+ - Actions Datastores
+ x-permission:
+ operator: OR
+ permissions:
+ - apps_datastore_read
+ patch:
+ description: Partially updates an item in a datastore by its key.
+ operationId: UpdateDatastoreItem
+ parameters:
+ - description: The unique identifier of the datastore to retrieve.
+ in: path
+ name: datastore_id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateAppsDatastoreItemRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ItemApiPayload'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Update datastore item
+ tags:
+ - Actions Datastores
+ x-permission:
+ operator: OR
+ permissions:
+ - apps_datastore_write
+ /api/v2/actions-datastores/{datastore_id}/items/bulk:
+ post:
+ description: Creates or replaces multiple items in a datastore by their keys
+ in a single operation.
+ operationId: BulkWriteDatastoreItems
+ parameters:
+ - description: The unique identifier of the datastore to retrieve.
+ in: path
+ name: datastore_id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BulkPutAppsDatastoreItemsRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PutAppsDatastoreItemResponseArray'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Bad Request
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JSONAPIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Bulk write datastore items
+ tags:
+ - Actions Datastores
+ x-permission:
+ operator: OR
+ permissions:
+ - apps_datastore_write
/api/v2/actions/app_key_registrations:
get:
description: List App Key Registrations
@@ -71931,6 +72815,12 @@ tags:
description: Find out more at
url: https://docs.datadoghq.com/service_management/workflows/connections/
name: Action Connection
+- description: 'Leverage the Actions Datastore API to create, modify, and delete
+
+ items in datastores owned by your organization.'
+ externalDocs:
+ url: https://docs.datadoghq.com/actions/datastore
+ name: Actions Datastores
- description: "Datadog Agentless Scanning provides visibility into risks and vulnerabilities\nwithin
your hosts, running containers, and serverless functions\u2014all without\nrequiring
teams to install Agents on every host or where Agents cannot be installed.\nAgentless
diff --git a/examples/v2/actions-datastores/BulkWriteDatastoreItems.java b/examples/v2/actions-datastores/BulkWriteDatastoreItems.java
new file mode 100644
index 00000000000..b068d9d0376
--- /dev/null
+++ b/examples/v2/actions-datastores/BulkWriteDatastoreItems.java
@@ -0,0 +1,49 @@
+// Bulk write datastore items returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ActionsDatastoresApi;
+import com.datadog.api.client.v2.model.BulkPutAppsDatastoreItemsRequest;
+import com.datadog.api.client.v2.model.BulkPutAppsDatastoreItemsRequestData;
+import com.datadog.api.client.v2.model.BulkPutAppsDatastoreItemsRequestDataAttributes;
+import com.datadog.api.client.v2.model.DatastoreItemsDataType;
+import com.datadog.api.client.v2.model.PutAppsDatastoreItemResponseArray;
+import java.util.Arrays;
+import java.util.Map;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ActionsDatastoresApi apiInstance = new ActionsDatastoresApi(defaultClient);
+
+ // there is a valid "datastore" in the system
+ String DATASTORE_DATA_ID = System.getenv("DATASTORE_DATA_ID");
+
+ BulkPutAppsDatastoreItemsRequest body =
+ new BulkPutAppsDatastoreItemsRequest()
+ .data(
+ new BulkPutAppsDatastoreItemsRequestData()
+ .attributes(
+ new BulkPutAppsDatastoreItemsRequestDataAttributes()
+ .values(
+ Arrays.asList(
+ Map.ofEntries(
+ Map.entry("id", "cust_3141"),
+ Map.entry("name", "Johnathan")),
+ Map.ofEntries(
+ Map.entry("id", "cust_3142"), Map.entry("name", "Mary")))))
+ .type(DatastoreItemsDataType.ITEMS));
+
+ try {
+ PutAppsDatastoreItemResponseArray result =
+ apiInstance.bulkWriteDatastoreItems(DATASTORE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ActionsDatastoresApi#bulkWriteDatastoreItems");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/actions-datastores/CreateDatastore.java b/examples/v2/actions-datastores/CreateDatastore.java
new file mode 100644
index 00000000000..36ae06db2d9
--- /dev/null
+++ b/examples/v2/actions-datastores/CreateDatastore.java
@@ -0,0 +1,38 @@
+// Create datastore returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ActionsDatastoresApi;
+import com.datadog.api.client.v2.model.CreateAppsDatastoreRequest;
+import com.datadog.api.client.v2.model.CreateAppsDatastoreRequestData;
+import com.datadog.api.client.v2.model.CreateAppsDatastoreRequestDataAttributes;
+import com.datadog.api.client.v2.model.CreateAppsDatastoreResponse;
+import com.datadog.api.client.v2.model.DatastoreDataType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ActionsDatastoresApi apiInstance = new ActionsDatastoresApi(defaultClient);
+
+ CreateAppsDatastoreRequest body =
+ new CreateAppsDatastoreRequest()
+ .data(
+ new CreateAppsDatastoreRequestData()
+ .attributes(
+ new CreateAppsDatastoreRequestDataAttributes()
+ .name("datastore-name")
+ .primaryColumnName("primaryKey"))
+ .type(DatastoreDataType.DATASTORES));
+
+ try {
+ CreateAppsDatastoreResponse result = apiInstance.createDatastore(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ActionsDatastoresApi#createDatastore");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/actions-datastores/DeleteDatastore.java b/examples/v2/actions-datastores/DeleteDatastore.java
new file mode 100644
index 00000000000..b2e3d1d6b8f
--- /dev/null
+++ b/examples/v2/actions-datastores/DeleteDatastore.java
@@ -0,0 +1,25 @@
+// Delete datastore returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ActionsDatastoresApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ActionsDatastoresApi apiInstance = new ActionsDatastoresApi(defaultClient);
+
+ // there is a valid "datastore" in the system
+ String DATASTORE_DATA_ID = System.getenv("DATASTORE_DATA_ID");
+
+ try {
+ apiInstance.deleteDatastore(DATASTORE_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ActionsDatastoresApi#deleteDatastore");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/actions-datastores/DeleteDatastoreItem.java b/examples/v2/actions-datastores/DeleteDatastoreItem.java
new file mode 100644
index 00000000000..05c53fe2b1d
--- /dev/null
+++ b/examples/v2/actions-datastores/DeleteDatastoreItem.java
@@ -0,0 +1,40 @@
+// Delete datastore item returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ActionsDatastoresApi;
+import com.datadog.api.client.v2.model.DatastoreItemsDataType;
+import com.datadog.api.client.v2.model.DeleteAppsDatastoreItemRequest;
+import com.datadog.api.client.v2.model.DeleteAppsDatastoreItemRequestData;
+import com.datadog.api.client.v2.model.DeleteAppsDatastoreItemRequestDataAttributes;
+import com.datadog.api.client.v2.model.DeleteAppsDatastoreItemResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ActionsDatastoresApi apiInstance = new ActionsDatastoresApi(defaultClient);
+
+ // there is a valid "datastore" in the system
+ String DATASTORE_DATA_ID = System.getenv("DATASTORE_DATA_ID");
+
+ DeleteAppsDatastoreItemRequest body =
+ new DeleteAppsDatastoreItemRequest()
+ .data(
+ new DeleteAppsDatastoreItemRequestData()
+ .attributes(
+ new DeleteAppsDatastoreItemRequestDataAttributes().itemKey("test-key"))
+ .type(DatastoreItemsDataType.ITEMS));
+
+ try {
+ DeleteAppsDatastoreItemResponse result =
+ apiInstance.deleteDatastoreItem(DATASTORE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ActionsDatastoresApi#deleteDatastoreItem");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/actions-datastores/GetDatastore.java b/examples/v2/actions-datastores/GetDatastore.java
new file mode 100644
index 00000000000..739b9dab553
--- /dev/null
+++ b/examples/v2/actions-datastores/GetDatastore.java
@@ -0,0 +1,27 @@
+// Get datastore returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ActionsDatastoresApi;
+import com.datadog.api.client.v2.model.Datastore;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ActionsDatastoresApi apiInstance = new ActionsDatastoresApi(defaultClient);
+
+ // there is a valid "datastore" in the system
+ String DATASTORE_DATA_ID = System.getenv("DATASTORE_DATA_ID");
+
+ try {
+ Datastore result = apiInstance.getDatastore(DATASTORE_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ActionsDatastoresApi#getDatastore");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/actions-datastores/ListDatastoreItems.java b/examples/v2/actions-datastores/ListDatastoreItems.java
new file mode 100644
index 00000000000..85f74d138e4
--- /dev/null
+++ b/examples/v2/actions-datastores/ListDatastoreItems.java
@@ -0,0 +1,27 @@
+// List datastore items returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ActionsDatastoresApi;
+import com.datadog.api.client.v2.model.ItemApiPayloadArray;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ActionsDatastoresApi apiInstance = new ActionsDatastoresApi(defaultClient);
+
+ // there is a valid "datastore" in the system
+ String DATASTORE_DATA_ID = System.getenv("DATASTORE_DATA_ID");
+
+ try {
+ ItemApiPayloadArray result = apiInstance.listDatastoreItems(DATASTORE_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ActionsDatastoresApi#listDatastoreItems");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/actions-datastores/ListDatastores.java b/examples/v2/actions-datastores/ListDatastores.java
new file mode 100644
index 00000000000..b01317b17b3
--- /dev/null
+++ b/examples/v2/actions-datastores/ListDatastores.java
@@ -0,0 +1,24 @@
+// List datastores returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ActionsDatastoresApi;
+import com.datadog.api.client.v2.model.DatastoreArray;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ActionsDatastoresApi apiInstance = new ActionsDatastoresApi(defaultClient);
+
+ try {
+ DatastoreArray result = apiInstance.listDatastores();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ActionsDatastoresApi#listDatastores");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/actions-datastores/UpdateDatastore.java b/examples/v2/actions-datastores/UpdateDatastore.java
new file mode 100644
index 00000000000..8b812f9b7d9
--- /dev/null
+++ b/examples/v2/actions-datastores/UpdateDatastore.java
@@ -0,0 +1,39 @@
+// Update datastore returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ActionsDatastoresApi;
+import com.datadog.api.client.v2.model.Datastore;
+import com.datadog.api.client.v2.model.DatastoreDataType;
+import com.datadog.api.client.v2.model.UpdateAppsDatastoreRequest;
+import com.datadog.api.client.v2.model.UpdateAppsDatastoreRequestData;
+import com.datadog.api.client.v2.model.UpdateAppsDatastoreRequestDataAttributes;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ActionsDatastoresApi apiInstance = new ActionsDatastoresApi(defaultClient);
+
+ // there is a valid "datastore" in the system
+ String DATASTORE_DATA_ID = System.getenv("DATASTORE_DATA_ID");
+
+ UpdateAppsDatastoreRequest body =
+ new UpdateAppsDatastoreRequest()
+ .data(
+ new UpdateAppsDatastoreRequestData()
+ .attributes(new UpdateAppsDatastoreRequestDataAttributes().name("updated name"))
+ .type(DatastoreDataType.DATASTORES)
+ .id(DATASTORE_DATA_ID));
+
+ try {
+ Datastore result = apiInstance.updateDatastore(DATASTORE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ActionsDatastoresApi#updateDatastore");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/examples/v2/actions-datastores/UpdateDatastoreItem.java b/examples/v2/actions-datastores/UpdateDatastoreItem.java
new file mode 100644
index 00000000000..30da7ae2b66
--- /dev/null
+++ b/examples/v2/actions-datastores/UpdateDatastoreItem.java
@@ -0,0 +1,43 @@
+// Update datastore item returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.ActionsDatastoresApi;
+import com.datadog.api.client.v2.model.ItemApiPayload;
+import com.datadog.api.client.v2.model.UpdateAppsDatastoreItemRequest;
+import com.datadog.api.client.v2.model.UpdateAppsDatastoreItemRequestData;
+import com.datadog.api.client.v2.model.UpdateAppsDatastoreItemRequestDataAttributes;
+import com.datadog.api.client.v2.model.UpdateAppsDatastoreItemRequestDataAttributesItemChanges;
+import com.datadog.api.client.v2.model.UpdateAppsDatastoreItemRequestDataType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ ActionsDatastoresApi apiInstance = new ActionsDatastoresApi(defaultClient);
+
+ // there is a valid "datastore" in the system
+ String DATASTORE_DATA_ID = System.getenv("DATASTORE_DATA_ID");
+
+ UpdateAppsDatastoreItemRequest body =
+ new UpdateAppsDatastoreItemRequest()
+ .data(
+ new UpdateAppsDatastoreItemRequestData()
+ .attributes(
+ new UpdateAppsDatastoreItemRequestDataAttributes()
+ .itemChanges(
+ new UpdateAppsDatastoreItemRequestDataAttributesItemChanges())
+ .itemKey("test-key"))
+ .type(UpdateAppsDatastoreItemRequestDataType.ITEMS));
+
+ try {
+ ItemApiPayload result = apiInstance.updateDatastoreItem(DATASTORE_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling ActionsDatastoresApi#updateDatastoreItem");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/api/ActionsDatastoresApi.java b/src/main/java/com/datadog/api/client/v2/api/ActionsDatastoresApi.java
new file mode 100644
index 00000000000..b4dbd96c55f
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/ActionsDatastoresApi.java
@@ -0,0 +1,1481 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.ApiResponse;
+import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.BulkPutAppsDatastoreItemsRequest;
+import com.datadog.api.client.v2.model.CreateAppsDatastoreRequest;
+import com.datadog.api.client.v2.model.CreateAppsDatastoreResponse;
+import com.datadog.api.client.v2.model.Datastore;
+import com.datadog.api.client.v2.model.DatastoreArray;
+import com.datadog.api.client.v2.model.DeleteAppsDatastoreItemRequest;
+import com.datadog.api.client.v2.model.DeleteAppsDatastoreItemResponse;
+import com.datadog.api.client.v2.model.ItemApiPayload;
+import com.datadog.api.client.v2.model.ItemApiPayloadArray;
+import com.datadog.api.client.v2.model.PutAppsDatastoreItemResponseArray;
+import com.datadog.api.client.v2.model.UpdateAppsDatastoreItemRequest;
+import com.datadog.api.client.v2.model.UpdateAppsDatastoreRequest;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ActionsDatastoresApi {
+ private ApiClient apiClient;
+
+ public ActionsDatastoresApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public ActionsDatastoresApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Bulk write datastore items.
+ *
+ *
See {@link #bulkWriteDatastoreItemsWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return PutAppsDatastoreItemResponseArray
+ * @throws ApiException if fails to make API call
+ */
+ public PutAppsDatastoreItemResponseArray bulkWriteDatastoreItems(
+ String datastoreId, BulkPutAppsDatastoreItemsRequest body) throws ApiException {
+ return bulkWriteDatastoreItemsWithHttpInfo(datastoreId, body).getData();
+ }
+
+ /**
+ * Bulk write datastore items.
+ *
+ *
See {@link #bulkWriteDatastoreItemsWithHttpInfoAsync}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return CompletableFuture<PutAppsDatastoreItemResponseArray>
+ */
+ public CompletableFuture bulkWriteDatastoreItemsAsync(
+ String datastoreId, BulkPutAppsDatastoreItemsRequest body) {
+ return bulkWriteDatastoreItemsWithHttpInfoAsync(datastoreId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Creates or replaces multiple items in a datastore by their keys in a single operation.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return ApiResponse<PutAppsDatastoreItemResponseArray>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse bulkWriteDatastoreItemsWithHttpInfo(
+ String datastoreId, BulkPutAppsDatastoreItemsRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'datastoreId' when calling bulkWriteDatastoreItems");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling bulkWriteDatastoreItems");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}/items/bulk"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.bulkWriteDatastoreItems",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Bulk write datastore items.
+ *
+ * See {@link #bulkWriteDatastoreItemsWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<PutAppsDatastoreItemResponseArray>>
+ */
+ public CompletableFuture>
+ bulkWriteDatastoreItemsWithHttpInfoAsync(
+ String datastoreId, BulkPutAppsDatastoreItemsRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'datastoreId' when calling bulkWriteDatastoreItems"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling bulkWriteDatastoreItems"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}/items/bulk"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.bulkWriteDatastoreItems",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create datastore.
+ *
+ * See {@link #createDatastoreWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CreateAppsDatastoreResponse
+ * @throws ApiException if fails to make API call
+ */
+ public CreateAppsDatastoreResponse createDatastore(CreateAppsDatastoreRequest body)
+ throws ApiException {
+ return createDatastoreWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create datastore.
+ *
+ *
See {@link #createDatastoreWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<CreateAppsDatastoreResponse>
+ */
+ public CompletableFuture createDatastoreAsync(
+ CreateAppsDatastoreRequest body) {
+ return createDatastoreWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Creates a new datastore.
+ *
+ * @param body (required)
+ * @return ApiResponse<CreateAppsDatastoreResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createDatastoreWithHttpInfo(
+ CreateAppsDatastoreRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createDatastore");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/actions-datastores";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.createDatastore",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create datastore.
+ *
+ * See {@link #createDatastoreWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<CreateAppsDatastoreResponse>>
+ */
+ public CompletableFuture>
+ createDatastoreWithHttpInfoAsync(CreateAppsDatastoreRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling createDatastore"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/actions-datastores";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.createDatastore",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Delete datastore.
+ *
+ * See {@link #deleteDatastoreWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteDatastore(String datastoreId) throws ApiException {
+ deleteDatastoreWithHttpInfo(datastoreId);
+ }
+
+ /**
+ * Delete datastore.
+ *
+ *
See {@link #deleteDatastoreWithHttpInfoAsync}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteDatastoreAsync(String datastoreId) {
+ return deleteDatastoreWithHttpInfoAsync(datastoreId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Deletes a datastore by its unique identifier.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteDatastoreWithHttpInfo(String datastoreId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'datastoreId' when calling deleteDatastore");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.deleteDatastore",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete datastore.
+ *
+ * See {@link #deleteDatastoreWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteDatastoreWithHttpInfoAsync(String datastoreId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'datastoreId' when calling deleteDatastore"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.deleteDatastore",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Delete datastore item.
+ *
+ * See {@link #deleteDatastoreItemWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return DeleteAppsDatastoreItemResponse
+ * @throws ApiException if fails to make API call
+ */
+ public DeleteAppsDatastoreItemResponse deleteDatastoreItem(
+ String datastoreId, DeleteAppsDatastoreItemRequest body) throws ApiException {
+ return deleteDatastoreItemWithHttpInfo(datastoreId, body).getData();
+ }
+
+ /**
+ * Delete datastore item.
+ *
+ *
See {@link #deleteDatastoreItemWithHttpInfoAsync}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return CompletableFuture<DeleteAppsDatastoreItemResponse>
+ */
+ public CompletableFuture deleteDatastoreItemAsync(
+ String datastoreId, DeleteAppsDatastoreItemRequest body) {
+ return deleteDatastoreItemWithHttpInfoAsync(datastoreId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Deletes an item from a datastore by its key.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return ApiResponse<DeleteAppsDatastoreItemResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteDatastoreItemWithHttpInfo(
+ String datastoreId, DeleteAppsDatastoreItemRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'datastoreId' when calling deleteDatastoreItem");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling deleteDatastoreItem");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}/items"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.deleteDatastoreItem",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Delete datastore item.
+ *
+ * See {@link #deleteDatastoreItemWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<DeleteAppsDatastoreItemResponse>>
+ */
+ public CompletableFuture>
+ deleteDatastoreItemWithHttpInfoAsync(
+ String datastoreId, DeleteAppsDatastoreItemRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'datastoreId' when calling deleteDatastoreItem"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling deleteDatastoreItem"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}/items"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.deleteDatastoreItem",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get datastore.
+ *
+ * See {@link #getDatastoreWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @return Datastore
+ * @throws ApiException if fails to make API call
+ */
+ public Datastore getDatastore(String datastoreId) throws ApiException {
+ return getDatastoreWithHttpInfo(datastoreId).getData();
+ }
+
+ /**
+ * Get datastore.
+ *
+ *
See {@link #getDatastoreWithHttpInfoAsync}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @return CompletableFuture<Datastore>
+ */
+ public CompletableFuture getDatastoreAsync(String datastoreId) {
+ return getDatastoreWithHttpInfoAsync(datastoreId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Retrieves a specific datastore by its ID.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @return ApiResponse<Datastore>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getDatastoreWithHttpInfo(String datastoreId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'datastoreId' when calling getDatastore");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.getDatastore",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get datastore.
+ *
+ * See {@link #getDatastoreWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @return CompletableFuture<ApiResponse<Datastore>>
+ */
+ public CompletableFuture> getDatastoreWithHttpInfoAsync(
+ String datastoreId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'datastoreId' when calling getDatastore"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.getDatastore",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /** Manage optional parameters to listDatastoreItems. */
+ public static class ListDatastoreItemsOptionalParameters {
+ private String filter;
+ private String itemKey;
+ private Long pageLimit;
+ private Long pageOffset;
+ private String sort;
+
+ /**
+ * Set filter.
+ *
+ * @param filter Optional query filter to search items using the logs search syntax.
+ * (optional)
+ * @return ListDatastoreItemsOptionalParameters
+ */
+ public ListDatastoreItemsOptionalParameters filter(String filter) {
+ this.filter = filter;
+ return this;
+ }
+
+ /**
+ * Set itemKey.
+ *
+ * @param itemKey Optional primary key value to retrieve a specific item. Cannot be used
+ * together with the filter parameter. (optional)
+ * @return ListDatastoreItemsOptionalParameters
+ */
+ public ListDatastoreItemsOptionalParameters itemKey(String itemKey) {
+ this.itemKey = itemKey;
+ return this;
+ }
+
+ /**
+ * Set pageLimit.
+ *
+ * @param pageLimit Optional field to limit the number of items to return per page for
+ * pagination. Up to 100 items can be returned per page. (optional)
+ * @return ListDatastoreItemsOptionalParameters
+ */
+ public ListDatastoreItemsOptionalParameters pageLimit(Long pageLimit) {
+ this.pageLimit = pageLimit;
+ return this;
+ }
+
+ /**
+ * Set pageOffset.
+ *
+ * @param pageOffset Optional field to offset the number of items to skip from the beginning of
+ * the result set for pagination. (optional)
+ * @return ListDatastoreItemsOptionalParameters
+ */
+ public ListDatastoreItemsOptionalParameters pageOffset(Long pageOffset) {
+ this.pageOffset = pageOffset;
+ return this;
+ }
+
+ /**
+ * Set sort.
+ *
+ * @param sort Optional field to sort results by. Prefix with '-' for descending order (e.g.,
+ * '-created_at'). (optional)
+ * @return ListDatastoreItemsOptionalParameters
+ */
+ public ListDatastoreItemsOptionalParameters sort(String sort) {
+ this.sort = sort;
+ return this;
+ }
+ }
+
+ /**
+ * List datastore items.
+ *
+ * See {@link #listDatastoreItemsWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @return ItemApiPayloadArray
+ * @throws ApiException if fails to make API call
+ */
+ public ItemApiPayloadArray listDatastoreItems(String datastoreId) throws ApiException {
+ return listDatastoreItemsWithHttpInfo(datastoreId, new ListDatastoreItemsOptionalParameters())
+ .getData();
+ }
+
+ /**
+ * List datastore items.
+ *
+ *
See {@link #listDatastoreItemsWithHttpInfoAsync}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @return CompletableFuture<ItemApiPayloadArray>
+ */
+ public CompletableFuture listDatastoreItemsAsync(String datastoreId) {
+ return listDatastoreItemsWithHttpInfoAsync(
+ datastoreId, new ListDatastoreItemsOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * List datastore items.
+ *
+ * See {@link #listDatastoreItemsWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param parameters Optional parameters for the request.
+ * @return ItemApiPayloadArray
+ * @throws ApiException if fails to make API call
+ */
+ public ItemApiPayloadArray listDatastoreItems(
+ String datastoreId, ListDatastoreItemsOptionalParameters parameters) throws ApiException {
+ return listDatastoreItemsWithHttpInfo(datastoreId, parameters).getData();
+ }
+
+ /**
+ * List datastore items.
+ *
+ *
See {@link #listDatastoreItemsWithHttpInfoAsync}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ItemApiPayloadArray>
+ */
+ public CompletableFuture listDatastoreItemsAsync(
+ String datastoreId, ListDatastoreItemsOptionalParameters parameters) {
+ return listDatastoreItemsWithHttpInfoAsync(datastoreId, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Lists items from a datastore. You can filter the results by specifying either an item key or a
+ * filter query parameter, but not both at the same time. Supports server-side pagination for
+ * large datasets.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<ItemApiPayloadArray>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listDatastoreItemsWithHttpInfo(
+ String datastoreId, ListDatastoreItemsOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'datastoreId' when calling listDatastoreItems");
+ }
+ String filter = parameters.filter;
+ String itemKey = parameters.itemKey;
+ Long pageLimit = parameters.pageLimit;
+ Long pageOffset = parameters.pageOffset;
+ String sort = parameters.sort;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}/items"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "item_key", itemKey));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.listDatastoreItems",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List datastore items.
+ *
+ * See {@link #listDatastoreItemsWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<ItemApiPayloadArray>>
+ */
+ public CompletableFuture> listDatastoreItemsWithHttpInfoAsync(
+ String datastoreId, ListDatastoreItemsOptionalParameters parameters) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'datastoreId' when calling listDatastoreItems"));
+ return result;
+ }
+ String filter = parameters.filter;
+ String itemKey = parameters.itemKey;
+ Long pageLimit = parameters.pageLimit;
+ Long pageOffset = parameters.pageOffset;
+ String sort = parameters.sort;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}/items"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "item_key", itemKey));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.listDatastoreItems",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List datastores.
+ *
+ * See {@link #listDatastoresWithHttpInfo}.
+ *
+ * @return DatastoreArray
+ * @throws ApiException if fails to make API call
+ */
+ public DatastoreArray listDatastores() throws ApiException {
+ return listDatastoresWithHttpInfo().getData();
+ }
+
+ /**
+ * List datastores.
+ *
+ *
See {@link #listDatastoresWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<DatastoreArray>
+ */
+ public CompletableFuture listDatastoresAsync() {
+ return listDatastoresWithHttpInfoAsync()
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Lists all datastores for the organization.
+ *
+ * @return ApiResponse<DatastoreArray>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse listDatastoresWithHttpInfo() throws ApiException {
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/actions-datastores";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.listDatastores",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * List datastores.
+ *
+ * See {@link #listDatastoresWithHttpInfo}.
+ *
+ * @return CompletableFuture<ApiResponse<DatastoreArray>>
+ */
+ public CompletableFuture> listDatastoresWithHttpInfoAsync() {
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/actions-datastores";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.listDatastores",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update datastore.
+ *
+ * See {@link #updateDatastoreWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return Datastore
+ * @throws ApiException if fails to make API call
+ */
+ public Datastore updateDatastore(String datastoreId, UpdateAppsDatastoreRequest body)
+ throws ApiException {
+ return updateDatastoreWithHttpInfo(datastoreId, body).getData();
+ }
+
+ /**
+ * Update datastore.
+ *
+ *
See {@link #updateDatastoreWithHttpInfoAsync}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return CompletableFuture<Datastore>
+ */
+ public CompletableFuture updateDatastoreAsync(
+ String datastoreId, UpdateAppsDatastoreRequest body) {
+ return updateDatastoreWithHttpInfoAsync(datastoreId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Updates an existing datastore's attributes.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return ApiResponse<Datastore>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateDatastoreWithHttpInfo(
+ String datastoreId, UpdateAppsDatastoreRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'datastoreId' when calling updateDatastore");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateDatastore");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.updateDatastore",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update datastore.
+ *
+ * See {@link #updateDatastoreWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<Datastore>>
+ */
+ public CompletableFuture> updateDatastoreWithHttpInfoAsync(
+ String datastoreId, UpdateAppsDatastoreRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'datastoreId' when calling updateDatastore"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateDatastore"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.updateDatastore",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update datastore item.
+ *
+ * See {@link #updateDatastoreItemWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return ItemApiPayload
+ * @throws ApiException if fails to make API call
+ */
+ public ItemApiPayload updateDatastoreItem(String datastoreId, UpdateAppsDatastoreItemRequest body)
+ throws ApiException {
+ return updateDatastoreItemWithHttpInfo(datastoreId, body).getData();
+ }
+
+ /**
+ * Update datastore item.
+ *
+ *
See {@link #updateDatastoreItemWithHttpInfoAsync}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return CompletableFuture<ItemApiPayload>
+ */
+ public CompletableFuture updateDatastoreItemAsync(
+ String datastoreId, UpdateAppsDatastoreItemRequest body) {
+ return updateDatastoreItemWithHttpInfoAsync(datastoreId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Partially updates an item in a datastore by its key.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return ApiResponse<ItemApiPayload>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 404 | Not Found | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateDatastoreItemWithHttpInfo(
+ String datastoreId, UpdateAppsDatastoreItemRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'datastoreId' when calling updateDatastoreItem");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateDatastoreItem");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}/items"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.updateDatastoreItem",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update datastore item.
+ *
+ * See {@link #updateDatastoreItemWithHttpInfo}.
+ *
+ * @param datastoreId The unique identifier of the datastore to retrieve. (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<ItemApiPayload>>
+ */
+ public CompletableFuture> updateDatastoreItemWithHttpInfoAsync(
+ String datastoreId, UpdateAppsDatastoreItemRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'datastoreId' is set
+ if (datastoreId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'datastoreId' when calling updateDatastoreItem"));
+ return result;
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateDatastoreItem"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/actions-datastores/{datastore_id}/items"
+ .replaceAll(
+ "\\{" + "datastore_id" + "\\}", apiClient.escapeString(datastoreId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ActionsDatastoresApi.updateDatastoreItem",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/BulkPutAppsDatastoreItemsRequest.java b/src/main/java/com/datadog/api/client/v2/model/BulkPutAppsDatastoreItemsRequest.java
new file mode 100644
index 00000000000..618e611ab80
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/BulkPutAppsDatastoreItemsRequest.java
@@ -0,0 +1,139 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Request to insert multiple items into a datastore in a single operation. */
+@JsonPropertyOrder({BulkPutAppsDatastoreItemsRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class BulkPutAppsDatastoreItemsRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private BulkPutAppsDatastoreItemsRequestData data;
+
+ public BulkPutAppsDatastoreItemsRequest data(BulkPutAppsDatastoreItemsRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data wrapper containing the items to insert and their configuration for the bulk insert
+ * operation.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public BulkPutAppsDatastoreItemsRequestData getData() {
+ return data;
+ }
+
+ public void setData(BulkPutAppsDatastoreItemsRequestData data) {
+ this.data = data;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return BulkPutAppsDatastoreItemsRequest
+ */
+ @JsonAnySetter
+ public BulkPutAppsDatastoreItemsRequest putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this BulkPutAppsDatastoreItemsRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BulkPutAppsDatastoreItemsRequest bulkPutAppsDatastoreItemsRequest =
+ (BulkPutAppsDatastoreItemsRequest) o;
+ return Objects.equals(this.data, bulkPutAppsDatastoreItemsRequest.data)
+ && Objects.equals(
+ this.additionalProperties, bulkPutAppsDatastoreItemsRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BulkPutAppsDatastoreItemsRequest {\n");
+ sb.append(" data: ").append(toIndentedString(data)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/BulkPutAppsDatastoreItemsRequestData.java b/src/main/java/com/datadog/api/client/v2/model/BulkPutAppsDatastoreItemsRequestData.java
new file mode 100644
index 00000000000..0a9a6fa0b31
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/BulkPutAppsDatastoreItemsRequestData.java
@@ -0,0 +1,184 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * Data wrapper containing the items to insert and their configuration for the bulk insert
+ * operation.
+ */
+@JsonPropertyOrder({
+ BulkPutAppsDatastoreItemsRequestData.JSON_PROPERTY_ATTRIBUTES,
+ BulkPutAppsDatastoreItemsRequestData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class BulkPutAppsDatastoreItemsRequestData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private BulkPutAppsDatastoreItemsRequestDataAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private DatastoreItemsDataType type = DatastoreItemsDataType.ITEMS;
+
+ public BulkPutAppsDatastoreItemsRequestData() {}
+
+ @JsonCreator
+ public BulkPutAppsDatastoreItemsRequestData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DatastoreItemsDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public BulkPutAppsDatastoreItemsRequestData attributes(
+ BulkPutAppsDatastoreItemsRequestDataAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Configuration for bulk inserting multiple items into a datastore.
+ *
+ * @return attributes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public BulkPutAppsDatastoreItemsRequestDataAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(BulkPutAppsDatastoreItemsRequestDataAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public BulkPutAppsDatastoreItemsRequestData type(DatastoreItemsDataType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The resource type for datastore items.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public DatastoreItemsDataType getType() {
+ return type;
+ }
+
+ public void setType(DatastoreItemsDataType type) {
+ if (!type.isValid()) {
+ this.unparsed = true;
+ }
+ this.type = type;
+ }
+
+ /**
+ * A container for additional, undeclared properties. This is a holder for any undeclared
+ * properties as specified with the 'additionalProperties' keyword in the OAS document.
+ */
+ private Map additionalProperties;
+
+ /**
+ * Set the additional (undeclared) property with the specified name and value. If the property
+ * does not already exist, create it otherwise replace it.
+ *
+ * @param key The arbitrary key to set
+ * @param value The associated value
+ * @return BulkPutAppsDatastoreItemsRequestData
+ */
+ @JsonAnySetter
+ public BulkPutAppsDatastoreItemsRequestData putAdditionalProperty(String key, Object value) {
+ if (this.additionalProperties == null) {
+ this.additionalProperties = new HashMap();
+ }
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ /**
+ * Return the additional (undeclared) property.
+ *
+ * @return The additional properties
+ */
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ /**
+ * Return the additional (undeclared) property with the specified name.
+ *
+ * @param key The arbitrary key to get
+ * @return The specific additional property for the given key
+ */
+ public Object getAdditionalProperty(String key) {
+ if (this.additionalProperties == null) {
+ return null;
+ }
+ return this.additionalProperties.get(key);
+ }
+
+ /** Return true if this BulkPutAppsDatastoreItemsRequestData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BulkPutAppsDatastoreItemsRequestData bulkPutAppsDatastoreItemsRequestData =
+ (BulkPutAppsDatastoreItemsRequestData) o;
+ return Objects.equals(this.attributes, bulkPutAppsDatastoreItemsRequestData.attributes)
+ && Objects.equals(this.type, bulkPutAppsDatastoreItemsRequestData.type)
+ && Objects.equals(
+ this.additionalProperties, bulkPutAppsDatastoreItemsRequestData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BulkPutAppsDatastoreItemsRequestData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/BulkPutAppsDatastoreItemsRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/BulkPutAppsDatastoreItemsRequestDataAttributes.java
new file mode 100644
index 00000000000..2ec5188e01b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/BulkPutAppsDatastoreItemsRequestDataAttributes.java
@@ -0,0 +1,192 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** Configuration for bulk inserting multiple items into a datastore. */
+@JsonPropertyOrder({
+ BulkPutAppsDatastoreItemsRequestDataAttributes.JSON_PROPERTY_CONFLICT_MODE,
+ BulkPutAppsDatastoreItemsRequestDataAttributes.JSON_PROPERTY_VALUES
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class BulkPutAppsDatastoreItemsRequestDataAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CONFLICT_MODE = "conflict_mode";
+ private DatastoreItemConflictMode conflictMode;
+
+ public static final String JSON_PROPERTY_VALUES = "values";
+ private List