Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
314 changes: 314 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5362,6 +5362,72 @@ components:
example: _latest
type: string
type: object
AssignSeatsUserRequest:
properties:
data:
$ref: '#/components/schemas/AssignSeatsUserRequestData'
description: The data for the assign seats user request.
type: object
AssignSeatsUserRequestData:
properties:
attributes:
$ref: '#/components/schemas/AssignSeatsUserRequestDataAttributes'
description: The attributes of the assign seats user request.
id:
description: The ID of the assign seats user request.
type: string
type:
$ref: '#/components/schemas/SeatAssignmentsDataType'
description: The type of the assign seats user request.
required:
- type
- attributes
type: object
AssignSeatsUserRequestDataAttributes:
properties:
product_code:
description: The product code for which to assign seats.
example: ''
type: string
user_uuids:
description: The list of user IDs to assign seats to.
example:
- ''
items:
type: string
type: array
required:
- product_code
- user_uuids
type: object
AssignSeatsUserResponse:
properties:
data:
$ref: '#/components/schemas/AssignSeatsUserResponseData'
description: The data for the assign seats user response.
type: object
AssignSeatsUserResponseData:
properties:
attributes:
$ref: '#/components/schemas/AssignSeatsUserResponseDataAttributes'
description: The attributes of the assign seats user response.
id:
description: The ID of the assign seats user response.
type: string
type:
$ref: '#/components/schemas/SeatAssignmentsDataType'
type: object
AssignSeatsUserResponseDataAttributes:
properties:
assigned_ids:
description: The list of user IDs to which the seats were assigned.
items:
type: string
type: array
product_code:
description: The product code for which the seats were assigned.
type: string
type: object
AttachCaseRequest:
description: Request for attaching security findings to a case.
properties:
Expand Down Expand Up @@ -52255,6 +52321,80 @@ components:
- ISSUE_ASSIGNEE
- ISSUE_CASE
- ISSUE_TEAM_OWNERS
SeatAssignmentsDataType:
default: seat-assignments
description: Seat assignments resource type.
enum:
- seat-assignments
example: seat-assignments
type: string
x-enum-varnames:
- SEAT_ASSIGNMENTS
SeatUserData:
properties:
attributes:
$ref: '#/components/schemas/SeatUserDataAttributes'
description: The attributes of the seat user.
id:
description: The ID of the seat user.
example: 00000000-0000-0000-0000-000000000000
nullable: true
type: string
type:
$ref: '#/components/schemas/SeatUserDataType'
type: object
SeatUserDataArray:
properties:
data:
description: The list of seat users.
items:
$ref: '#/components/schemas/SeatUserData'
type: array
meta:
$ref: '#/components/schemas/SeatUserMeta'
description: The metadata of the seat users.
type: object
SeatUserDataAttributes:
properties:
assigned_at:
description: The date and time the seat was assigned.
example: '2021-01-01T00:00:00Z'
format: date-time
nullable: true
type: string
email:
description: The email of the user.
example: user@example.com
nullable: true
type: string
name:
description: The name of the user.
example: John Doe
nullable: true
type: string
type: object
SeatUserDataType:
default: seat-users
description: Seat users resource type.
enum:
- seat-users
example: seat-users
type: string
x-enum-varnames:
- SEAT_USERS
SeatUserMeta:
properties:
cursor:
description: The cursor for the seat users.
type: string
limit:
description: The limit for the seat users.
format: int64
type: integer
next_cursor:
description: The next cursor for the seat users.
type: string
type: object
SecretRuleArray:
properties:
data:
Expand Down Expand Up @@ -64399,6 +64539,44 @@ components:
type: string
x-enum-varnames:
- AZURE_UC_CONFIGS
UnassignSeatsUserRequest:
properties:
data:
$ref: '#/components/schemas/UnassignSeatsUserRequestData'
description: The data for the unassign seats user request.
type: object
UnassignSeatsUserRequestData:
properties:
attributes:
$ref: '#/components/schemas/UnassignSeatsUserRequestDataAttributes'
description: The attributes of the unassign seats user request.
id:
description: The ID of the unassign seats user request.
type: string
type:
$ref: '#/components/schemas/SeatAssignmentsDataType'
description: The type of the unassign seats user request.
required:
- type
- attributes
type: object
UnassignSeatsUserRequestDataAttributes:
properties:
product_code:
description: The product code for which to unassign seats.
example: ''
type: string
user_uuids:
description: The list of user IDs to unassign seats from.
example:
- ''
items:
type: string
type: array
required:
- product_code
- user_uuids
type: object
Unit:
description: Object containing the metric unit family, scale factor, name, and
short name.
Expand Down Expand Up @@ -92716,6 +92894,139 @@ paths:
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/seats/users:
delete:
description: Unassign seats from users for a product code.
operationId: UnassignSeatsUserV2
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UnassignSeatsUserRequest'
required: true
responses:
'204':
description: No Content
'400':
$ref: '#/components/responses/BadRequestResponse'
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Unprocessable Entity
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Internal Server Error
summary: Unassign seats from users
tags:
- Seats
x-permission:
operator: OR
permissions:
- billing_edit
- incident_write
- on_call_write
get:
description: Get the list of users assigned seats for a product code.
operationId: GetSeatsUsersV2
parameters:
- description: The product code for which to retrieve seat users.
in: query
name: product_code
required: true
schema:
type: string
- description: Maximum number of results to return.
in: query
name: page[limit]
required: false
schema:
type: integer
- description: Cursor for pagination.
in: query
name: page[cursor]
required: false
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SeatUserDataArray'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Unprocessable Entity
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Internal Server Error
summary: Get users with seats
tags:
- Seats
x-permission:
operator: OR
permissions:
- billing_read
- incident_read
- on_call_read
post:
description: Assign seats to users for a product code.
operationId: AssignSeatsUserV2
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AssignSeatsUserRequest'
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/AssignSeatsUserResponse'
description: Created
'400':
$ref: '#/components/responses/BadRequestResponse'
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Unprocessable Entity
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Internal Server Error
summary: Assign seats to users
tags:
- Seats
x-permission:
operator: OR
permissions:
- billing_edit
- incident_write
- on_call_write
/api/v2/security-entities/risk-scores:
get:
description: Get a list of entity risk scores for your organization. Entity
Expand Down Expand Up @@ -103849,6 +104160,9 @@ tags:
- description: Manage retention filters through [Manage Applications](https://app.datadoghq.com/rum/list)
of RUM for your organization.
name: Rum Retention Filters
- description: The seats API allows you to view, assign, and unassign seats for your
organization.
name: Seats
- description: Create and manage your security rules, signals, filters, and more.
See the [Datadog Security page](https://docs.datadoghq.com/security/) for more
information.
Expand Down
39 changes: 39 additions & 0 deletions examples/v2/seats/AssignSeatsUserV2.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Assign seats to users returns "Created" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SeatsApi;
import com.datadog.api.client.v2.model.AssignSeatsUserRequest;
import com.datadog.api.client.v2.model.AssignSeatsUserRequestData;
import com.datadog.api.client.v2.model.AssignSeatsUserRequestDataAttributes;
import com.datadog.api.client.v2.model.AssignSeatsUserResponse;
import com.datadog.api.client.v2.model.SeatAssignmentsDataType;
import java.util.Collections;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
SeatsApi apiInstance = new SeatsApi(defaultClient);

AssignSeatsUserRequest body =
new AssignSeatsUserRequest()
.data(
new AssignSeatsUserRequestData()
.attributes(
new AssignSeatsUserRequestDataAttributes()
.productCode("")
.userUuids(Collections.singletonList("")))
.type(SeatAssignmentsDataType.SEAT_ASSIGNMENTS));

try {
AssignSeatsUserResponse result = apiInstance.assignSeatsUserV2(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SeatsApi#assignSeatsUserV2");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Loading
Loading