diff --git a/.apigentools-info b/.apigentools-info
index 1ba50b490fe..718f7af0f9e 100644
--- a/.apigentools-info
+++ b/.apigentools-info
@@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.4",
- "regenerated": "2023-03-29 17:57:07.185563",
- "spec_repo_commit": "c0790f05"
+ "regenerated": "2023-03-30 18:44:41.335023",
+ "spec_repo_commit": "69b7dfb1"
},
"v2": {
"apigentools_version": "1.6.4",
- "regenerated": "2023-03-29 17:57:07.197967",
- "spec_repo_commit": "c0790f05"
+ "regenerated": "2023-03-30 18:44:41.347457",
+ "spec_repo_commit": "69b7dfb1"
}
}
}
\ No newline at end of file
diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 8a8b63be81e..ebc5d019156 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -3687,6 +3687,49 @@ components:
nullable: true
type: array
type: object
+ GetAllTeamsInclude:
+ description: Included related resources optionally requested.
+ enum:
+ - team_links
+ - user_team_permissions
+ type: string
+ x-enum-varnames:
+ - TEAM_LINKS
+ - USER_TEAM_PERMISSIONS
+ GetAllTeamsSort:
+ description: Specifies the order of the returned teams
+ enum:
+ - name
+ - -name
+ - user_count
+ - -user_count
+ type: string
+ x-enum-varnames:
+ - NAME
+ - _NAME
+ - USER_COUNT
+ - _USER_COUNT
+ GetTeamMembershipsSort:
+ description: Specifies the order of returned team memberships
+ enum:
+ - manager_name
+ - -manager_name
+ - name
+ - -name
+ - handle
+ - -handle
+ - email
+ - -email
+ type: string
+ x-enum-varnames:
+ - MANAGER_NAME
+ - _MANAGER_NAME
+ - NAME
+ - _NAME
+ - HANDLE
+ - _HANDLE
+ - EMAIL
+ - _EMAIL
GroupScalarColumn:
description: A column containing the tag keys and values in a group.
properties:
@@ -9477,6 +9520,28 @@ components:
- id
- type
type: object
+ RelationshipToTeamLinkData:
+ description: Relationship between a link and a team
+ properties:
+ id:
+ description: The team link's identifier
+ example: f9bb8444-af7f-11ec-ac2c-da7ad0900001
+ type: string
+ type:
+ $ref: '#/components/schemas/TeamLinkType'
+ required:
+ - id
+ - type
+ type: object
+ RelationshipToTeamLinks:
+ description: Relationship between a team and a team link
+ properties:
+ data:
+ description: Related team links
+ items:
+ $ref: '#/components/schemas/RelationshipToTeamLinkData'
+ type: array
+ type: object
RelationshipToUser:
description: Relationship to user.
properties:
@@ -9498,6 +9563,46 @@ components:
- id
- type
type: object
+ RelationshipToUserTeamPermission:
+ description: Relationship between a user team permission and a team
+ properties:
+ data:
+ $ref: '#/components/schemas/RelationshipToUserTeamPermissionData'
+ type: object
+ RelationshipToUserTeamPermissionData:
+ description: Related user team permission data
+ properties:
+ id:
+ description: The ID of the user team permission
+ example: UserTeamPermissions-aeadc05e-98a8-11ec-ac2c-da7ad0900001-416595
+ type: string
+ type:
+ $ref: '#/components/schemas/UserTeamPermissionType'
+ required:
+ - id
+ - type
+ type: object
+ RelationshipToUserTeamUser:
+ description: Relationship between team membership and user
+ properties:
+ data:
+ $ref: '#/components/schemas/RelationshipToUserTeamUserData'
+ required:
+ - data
+ type: object
+ RelationshipToUserTeamUserData:
+ description: A user's relationship with a team
+ properties:
+ id:
+ description: The ID of the user associated with the team
+ example: b8626d7e-cedd-11eb-abf5-da7ad0900001
+ type: string
+ type:
+ $ref: '#/components/schemas/UserTeamUserType'
+ required:
+ - id
+ - type
+ type: object
RelationshipToUsers:
description: Relationship to users.
properties:
@@ -12749,158 +12854,590 @@ components:
description: Tag associated with your event.
type: string
type: array
- TimeseriesFormulaQueryRequest:
- description: A request wrapper around a single timeseries query to be executed.
+ Team:
+ description: A team
properties:
- data:
- $ref: '#/components/schemas/TimeseriesFormulaRequest'
+ attributes:
+ $ref: '#/components/schemas/TeamAttributes'
+ id:
+ description: The team's identifier
+ example: aeadc05e-98a8-11ec-ac2c-da7ad0900001
+ type: string
+ relationships:
+ $ref: '#/components/schemas/TeamRelationships'
+ type:
+ $ref: '#/components/schemas/TeamType'
required:
- - data
+ - attributes
+ - id
+ - type
type: object
- TimeseriesFormulaQueryResponse:
- description: A message containing one response to a timeseries query made with
- timeseries formula query request.
+ TeamAttributes:
+ description: Team attributes
properties:
- data:
- $ref: '#/components/schemas/TimeseriesResponse'
- errors:
- description: The error generated by the request.
+ created_at:
+ description: Creation date of the team
+ format: date-time
+ type: string
+ description:
+ description: Free-form markdown description/content for the team's homepage
+ type: string
+ handle:
+ description: The team's identifier
+ example: example-team
+ maxLength: 64
type: string
+ link_count:
+ description: The number of links belonging to the team
+ format: int32
+ maximum: 2147483647
+ readOnly: true
+ type: integer
+ modified_at:
+ description: Modification date of the team
+ format: date-time
+ type: string
+ name:
+ description: The name of the team
+ example: Example Team
+ maxLength: 64
+ type: string
+ summary:
+ description: A brief summary of the team, derived from the `description`
+ maxLength: 120
+ type: string
+ user_count:
+ description: The number of users belonging to the team
+ format: int32
+ maximum: 2147483647
+ readOnly: true
+ type: integer
+ required:
+ - handle
+ - name
type: object
- TimeseriesFormulaRequest:
- description: A single timeseries query to be executed.
+ TeamCreate:
+ description: Team create
properties:
attributes:
- $ref: '#/components/schemas/TimeseriesFormulaRequestAttributes'
+ $ref: '#/components/schemas/TeamCreateAttributes'
+ relationships:
+ $ref: '#/components/schemas/TeamCreateRelationships'
type:
- $ref: '#/components/schemas/TimeseriesFormulaRequestType'
+ $ref: '#/components/schemas/TeamType'
required:
- - type
- attributes
+ - type
type: object
- TimeseriesFormulaRequestAttributes:
- description: The object describing a timeseries formula request.
+ TeamCreateAttributes:
+ description: Team creation attributes
properties:
- formulas:
- description: List of formulas to be calculated and returned as responses.
- items:
- $ref: '#/components/schemas/QueryFormula'
- type: array
- from:
- description: Start date (inclusive) of the query in milliseconds since the
- Unix epoch.
- example: 1568899800000
- format: int64
- type: integer
- interval:
- description: 'A time interval in milliseconds.
-
- May be overridden by a larger interval if the query would result in
-
- too many points for the specified timeframe.
-
- Defaults to a reasonable interval for the given timeframe.'
- example: 5000
- format: int64
- type: integer
- queries:
- $ref: '#/components/schemas/TimeseriesFormulaRequestQueries'
- to:
- description: End date (exclusive) of the query in milliseconds since the
- Unix epoch.
- example: 1568923200000
- format: int64
+ description:
+ description: Free-form markdown description/content for the team's homepage
+ type: string
+ handle:
+ description: The team's identifier
+ example: example-team
+ maxLength: 64
+ type: string
+ link_count:
+ description: The number of links belonging to the team
+ format: int32
+ maximum: 2147483647
+ readOnly: true
type: integer
+ name:
+ description: The name of the team
+ example: Example Team
+ maxLength: 64
+ type: string
required:
- - to
- - from
- - queries
+ - handle
+ - name
type: object
- TimeseriesFormulaRequestQueries:
- description: List of queries to be run and used as inputs to the formulas.
- items:
- $ref: '#/components/schemas/TimeseriesQuery'
- type: array
- TimeseriesFormulaRequestType:
- default: timeseries_request
- description: The type of the resource. The value should always be timeseries_request.
- enum:
- - timeseries_request
- example: timeseries_request
- type: string
- x-enum-varnames:
- - TIMESERIES_REQUEST
- TimeseriesFormulaResponseType:
- default: timeseries_response
- description: The type of the resource. The value should always be timeseries_response.
- enum:
- - timeseries_response
- example: timeseries_response
- type: string
- x-enum-varnames:
- - TIMESERIES_RESPONSE
- TimeseriesQuery:
- description: An individual timeseries query to one of the basic Datadog data
- sources.
- oneOf:
- - $ref: '#/components/schemas/MetricsTimeseriesQuery'
- - $ref: '#/components/schemas/EventsTimeseriesQuery'
+ TeamCreateRelationships:
+ description: Relationships formed with the team on creation
+ properties:
+ users:
+ $ref: '#/components/schemas/RelationshipToUsers'
type: object
- TimeseriesResponse:
- description: A message containing the response to a timeseries query.
+ TeamCreateRequest:
+ description: Request to create a team
+ properties:
+ data:
+ $ref: '#/components/schemas/TeamCreate'
+ required:
+ - data
+ type: object
+ TeamData:
+ description: A team
properties:
attributes:
- $ref: '#/components/schemas/TimeseriesResponseAttributes'
+ $ref: '#/components/schemas/TeamAttributes'
+ id:
+ description: The team's identifier
+ example: aeadc05e-98a8-11ec-ac2c-da7ad0900001
+ type: string
type:
- $ref: '#/components/schemas/TimeseriesFormulaResponseType'
+ $ref: '#/components/schemas/TeamType'
+ required:
+ - attributes
+ - id
+ - type
type: object
- TimeseriesResponseAttributes:
- description: The object describing a timeseries response.
+ TeamIncluded:
+ description: Included resources related to the team
+ oneOf:
+ - $ref: '#/components/schemas/User'
+ - $ref: '#/components/schemas/TeamLink'
+ - $ref: '#/components/schemas/UserTeamPermission'
+ properties: {}
+ type: object
+ TeamLink:
+ description: Team link
properties:
- series:
- $ref: '#/components/schemas/TimeseriesResponseSeriesList'
- times:
- $ref: '#/components/schemas/TimeseriesResponseTimes'
- values:
- $ref: '#/components/schemas/TimeseriesResponseValuesList'
+ attributes:
+ $ref: '#/components/schemas/TeamLinkAttributes'
+ id:
+ description: The team link's identifier
+ example: b8626d7e-cedd-11eb-abf5-da7ad0900001
+ type: string
+ type:
+ $ref: '#/components/schemas/TeamLinkType'
+ required:
+ - attributes
+ - id
+ - type
type: object
- TimeseriesResponseSeries:
- description: ''
+ TeamLinkAttributes:
+ description: Team link attributes
properties:
- group_tags:
- $ref: '#/components/schemas/GroupTags'
- query_index:
- description: The index of the query in the "formulas" array (or "queries"
- array if no "formulas" was specified).
- example: 0
+ label:
+ description: The link's label
+ example: Link label
+ maxLength: 256
+ type: string
+ position:
+ description: The link's position, used to sort links for the team
format: int32
maximum: 2147483647
type: integer
- unit:
- description: 'Detailed information about the unit.
-
- The first element describes the "primary unit" (for example, `bytes` in
- `bytes per second`).
-
- The second element describes the "per unit" (for example, `second` in
- `bytes per second`).
-
- If the second element is not present, the API returns null.'
- items:
- $ref: '#/components/schemas/Unit'
- type: array
+ team_id:
+ description: ID of the team the link is associated with
+ readOnly: true
+ type: string
+ url:
+ description: The URL for the link
+ example: https://example.com
+ type: string
+ required:
+ - label
+ - url
type: object
- TimeseriesResponseSeriesList:
- description: Array of response series. The index here corresponds to the index
- in the `formulas` or `queries` array from the request.
- items:
- $ref: '#/components/schemas/TimeseriesResponseSeries'
- type: array
- TimeseriesResponseTimes:
- description: Array of times, 1-1 match with individual values arrays.
- items:
- description: Start date (inclusive) of the query in seconds since the Unix
- epoch.
+ TeamLinkCreate:
+ description: Team link create
+ properties:
+ attributes:
+ $ref: '#/components/schemas/TeamLinkAttributes'
+ type:
+ $ref: '#/components/schemas/TeamLinkType'
+ required:
+ - attributes
+ - type
+ type: object
+ TeamLinkCreateRequest:
+ description: Team link create request
+ properties:
+ data:
+ $ref: '#/components/schemas/TeamLinkCreate'
+ required:
+ - data
+ type: object
+ TeamLinkResponse:
+ description: Team link response
+ properties:
+ data:
+ $ref: '#/components/schemas/TeamLink'
+ type: object
+ TeamLinkType:
+ default: team_links
+ description: Team link type
+ enum:
+ - team_links
+ example: team_links
+ type: string
+ x-enum-varnames:
+ - TEAM_LINKS
+ TeamLinksResponse:
+ description: Team links response
+ properties:
+ data:
+ description: Team links response data
+ items:
+ $ref: '#/components/schemas/TeamLink'
+ type: array
+ type: object
+ TeamPermissionSetting:
+ description: Team permission setting
+ properties:
+ attributes:
+ $ref: '#/components/schemas/TeamPermissionSettingAttributes'
+ id:
+ description: The team permission setting's identifier
+ example: TeamPermission-aeadc05e-98a8-11ec-ac2c-da7ad0900001-edit
+ type: string
+ type:
+ $ref: '#/components/schemas/TeamPermissionSettingType'
+ required:
+ - id
+ - type
+ type: object
+ TeamPermissionSettingAttributes:
+ description: Team permission setting attributes
+ properties:
+ action:
+ $ref: '#/components/schemas/TeamPermissionSettingSerializerAction'
+ editable:
+ description: Whether or not the permission setting is editable by the current
+ user
+ readOnly: true
+ type: boolean
+ options:
+ $ref: '#/components/schemas/TeamPermissionSettingValues'
+ title:
+ description: The team permission name
+ readOnly: true
+ type: string
+ value:
+ $ref: '#/components/schemas/TeamPermissionSettingValue'
+ type: object
+ TeamPermissionSettingResponse:
+ description: Team permission setting response
+ properties:
+ data:
+ $ref: '#/components/schemas/TeamPermissionSetting'
+ type: object
+ TeamPermissionSettingSerializerAction:
+ description: The identifier for the action
+ enum:
+ - manage_membership
+ - edit
+ readOnly: true
+ type: string
+ x-enum-varnames:
+ - MANAGE_MEMBERSHIP
+ - EDIT
+ TeamPermissionSettingType:
+ default: team_permission_settings
+ description: Team permission setting type
+ enum:
+ - team_permission_settings
+ example: team_permission_settings
+ type: string
+ x-enum-varnames:
+ - TEAM_PERMISSION_SETTINGS
+ TeamPermissionSettingUpdate:
+ description: Team permission setting update
+ properties:
+ attributes:
+ $ref: '#/components/schemas/TeamPermissionSettingUpdateAttributes'
+ type:
+ $ref: '#/components/schemas/TeamPermissionSettingType'
+ required:
+ - type
+ type: object
+ TeamPermissionSettingUpdateAttributes:
+ description: Team permission setting update attributes
+ properties:
+ value:
+ $ref: '#/components/schemas/TeamPermissionSettingValue'
+ type: object
+ TeamPermissionSettingUpdateRequest:
+ description: Team permission setting update request
+ properties:
+ data:
+ $ref: '#/components/schemas/TeamPermissionSettingUpdate'
+ required:
+ - data
+ type: object
+ TeamPermissionSettingValue:
+ description: What type of user is allowed to perform the specified action
+ enum:
+ - admins
+ - members
+ - organization
+ - user_access_manage
+ - teams_manage
+ type: string
+ x-enum-varnames:
+ - ADMINS
+ - MEMBERS
+ - ORGANIZATION
+ - USER_ACCESS_MANAGE
+ - TEAMS_MANAGE
+ TeamPermissionSettingValues:
+ description: Possible values for action
+ items:
+ $ref: '#/components/schemas/TeamPermissionSettingValue'
+ readOnly: true
+ type: array
+ TeamPermissionSettingsResponse:
+ description: Team permission settings response
+ properties:
+ data:
+ description: Team permission settings response data
+ items:
+ $ref: '#/components/schemas/TeamPermissionSetting'
+ type: array
+ type: object
+ TeamRelationships:
+ description: Resources related to a team
+ properties:
+ team_links:
+ $ref: '#/components/schemas/RelationshipToTeamLinks'
+ user_team_permissions:
+ $ref: '#/components/schemas/RelationshipToUserTeamPermission'
+ type: object
+ TeamResponse:
+ description: Response with a team
+ properties:
+ data:
+ $ref: '#/components/schemas/TeamData'
+ type: object
+ TeamType:
+ default: team
+ description: Team type
+ enum:
+ - team
+ example: team
+ type: string
+ x-enum-varnames:
+ - TEAM
+ TeamUpdate:
+ description: Team update request
+ properties:
+ attributes:
+ $ref: '#/components/schemas/TeamUpdateAttributes'
+ relationships:
+ $ref: '#/components/schemas/TeamUpdateRelationships'
+ type:
+ $ref: '#/components/schemas/TeamType'
+ required:
+ - attributes
+ - type
+ type: object
+ TeamUpdateAttributes:
+ description: Team update attributes
+ properties:
+ color:
+ description: An identifier for the color representing the team
+ format: int32
+ maximum: 13
+ minimum: 0
+ type: integer
+ description:
+ description: Free-form markdown description/content for the team's homepage
+ type: string
+ handle:
+ description: The team's identifier
+ example: example-team
+ maxLength: 64
+ type: string
+ link_count:
+ description: The number of links belonging to the team
+ format: int32
+ maximum: 2147483647
+ readOnly: true
+ type: integer
+ name:
+ description: The name of the team
+ example: Example Team
+ maxLength: 64
+ type: string
+ required:
+ - handle
+ - name
+ type: object
+ TeamUpdateRelationships:
+ description: Team update relationships
+ properties:
+ team_links:
+ $ref: '#/components/schemas/RelationshipToTeamLinks'
+ type: object
+ TeamUpdateRequest:
+ description: Team update request
+ properties:
+ data:
+ $ref: '#/components/schemas/TeamUpdate'
+ required:
+ - data
+ type: object
+ TeamsResponse:
+ description: Response with multiple teams
+ properties:
+ data:
+ description: Teams response data
+ items:
+ $ref: '#/components/schemas/Team'
+ type: array
+ included:
+ description: Resources related to the team
+ items:
+ $ref: '#/components/schemas/TeamIncluded'
+ type: array
+ type: object
+ TimeseriesFormulaQueryRequest:
+ description: A request wrapper around a single timeseries query to be executed.
+ properties:
+ data:
+ $ref: '#/components/schemas/TimeseriesFormulaRequest'
+ required:
+ - data
+ type: object
+ TimeseriesFormulaQueryResponse:
+ description: A message containing one response to a timeseries query made with
+ timeseries formula query request.
+ properties:
+ data:
+ $ref: '#/components/schemas/TimeseriesResponse'
+ errors:
+ description: The error generated by the request.
+ type: string
+ type: object
+ TimeseriesFormulaRequest:
+ description: A single timeseries query to be executed.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/TimeseriesFormulaRequestAttributes'
+ type:
+ $ref: '#/components/schemas/TimeseriesFormulaRequestType'
+ required:
+ - type
+ - attributes
+ type: object
+ TimeseriesFormulaRequestAttributes:
+ description: The object describing a timeseries formula request.
+ properties:
+ formulas:
+ description: List of formulas to be calculated and returned as responses.
+ items:
+ $ref: '#/components/schemas/QueryFormula'
+ type: array
+ from:
+ description: Start date (inclusive) of the query in milliseconds since the
+ Unix epoch.
+ example: 1568899800000
+ format: int64
+ type: integer
+ interval:
+ description: 'A time interval in milliseconds.
+
+ May be overridden by a larger interval if the query would result in
+
+ too many points for the specified timeframe.
+
+ Defaults to a reasonable interval for the given timeframe.'
+ example: 5000
+ format: int64
+ type: integer
+ queries:
+ $ref: '#/components/schemas/TimeseriesFormulaRequestQueries'
+ to:
+ description: End date (exclusive) of the query in milliseconds since the
+ Unix epoch.
+ example: 1568923200000
+ format: int64
+ type: integer
+ required:
+ - to
+ - from
+ - queries
+ type: object
+ TimeseriesFormulaRequestQueries:
+ description: List of queries to be run and used as inputs to the formulas.
+ items:
+ $ref: '#/components/schemas/TimeseriesQuery'
+ type: array
+ TimeseriesFormulaRequestType:
+ default: timeseries_request
+ description: The type of the resource. The value should always be timeseries_request.
+ enum:
+ - timeseries_request
+ example: timeseries_request
+ type: string
+ x-enum-varnames:
+ - TIMESERIES_REQUEST
+ TimeseriesFormulaResponseType:
+ default: timeseries_response
+ description: The type of the resource. The value should always be timeseries_response.
+ enum:
+ - timeseries_response
+ example: timeseries_response
+ type: string
+ x-enum-varnames:
+ - TIMESERIES_RESPONSE
+ TimeseriesQuery:
+ description: An individual timeseries query to one of the basic Datadog data
+ sources.
+ oneOf:
+ - $ref: '#/components/schemas/MetricsTimeseriesQuery'
+ - $ref: '#/components/schemas/EventsTimeseriesQuery'
+ type: object
+ TimeseriesResponse:
+ description: A message containing the response to a timeseries query.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/TimeseriesResponseAttributes'
+ type:
+ $ref: '#/components/schemas/TimeseriesFormulaResponseType'
+ type: object
+ TimeseriesResponseAttributes:
+ description: The object describing a timeseries response.
+ properties:
+ series:
+ $ref: '#/components/schemas/TimeseriesResponseSeriesList'
+ times:
+ $ref: '#/components/schemas/TimeseriesResponseTimes'
+ values:
+ $ref: '#/components/schemas/TimeseriesResponseValuesList'
+ type: object
+ TimeseriesResponseSeries:
+ description: ''
+ properties:
+ group_tags:
+ $ref: '#/components/schemas/GroupTags'
+ query_index:
+ description: The index of the query in the "formulas" array (or "queries"
+ array if no "formulas" was specified).
+ example: 0
+ format: int32
+ maximum: 2147483647
+ type: integer
+ unit:
+ description: 'Detailed information about the unit.
+
+ The first element describes the "primary unit" (for example, `bytes` in
+ `bytes per second`).
+
+ The second element describes the "per unit" (for example, `second` in
+ `bytes per second`).
+
+ If the second element is not present, the API returns null.'
+ items:
+ $ref: '#/components/schemas/Unit'
+ type: array
+ type: object
+ TimeseriesResponseSeriesList:
+ description: Array of response series. The index here corresponds to the index
+ in the `formulas` or `queries` array from the request.
+ items:
+ $ref: '#/components/schemas/TimeseriesResponseSeries'
+ type: array
+ TimeseriesResponseTimes:
+ description: Array of times, 1-1 match with individual values arrays.
+ items:
+ description: Start date (inclusive) of the query in seconds since the Unix
+ epoch.
example: 1568899800000
format: int64
type: integer
@@ -13247,6 +13784,148 @@ components:
roles:
$ref: '#/components/schemas/RelationshipToRoles'
type: object
+ UserTeam:
+ description: A user's relationship with a team
+ properties:
+ attributes:
+ $ref: '#/components/schemas/UserTeamAttributes'
+ id:
+ description: The ID of a user's relationship with a team
+ example: TeamMembership-aeadc05e-98a8-11ec-ac2c-da7ad0900001-38835
+ type: string
+ relationships:
+ $ref: '#/components/schemas/UserTeamRelationships'
+ type:
+ $ref: '#/components/schemas/UserTeamType'
+ required:
+ - id
+ - type
+ type: object
+ UserTeamAttributes:
+ description: Team membership attributes
+ properties:
+ role:
+ $ref: '#/components/schemas/UserTeamRole'
+ type: object
+ UserTeamCreate:
+ description: A user's relationship with a team
+ properties:
+ attributes:
+ $ref: '#/components/schemas/UserTeamAttributes'
+ relationships:
+ $ref: '#/components/schemas/UserTeamRelationships'
+ type:
+ $ref: '#/components/schemas/UserTeamType'
+ required:
+ - type
+ type: object
+ UserTeamPermission:
+ description: A user's permissions for a given team
+ properties:
+ attributes:
+ $ref: '#/components/schemas/UserTeamPermissionAttributes'
+ id:
+ description: The user team permission's identifier
+ example: UserTeamPermissions-aeadc05e-98a8-11ec-ac2c-da7ad0900001-416595
+ type: string
+ type:
+ $ref: '#/components/schemas/UserTeamPermissionType'
+ required:
+ - id
+ - type
+ type: object
+ UserTeamPermissionAttributes:
+ description: User team permission attributes
+ properties:
+ permissions:
+ description: Object of team permission actions and boolean values indicating
+ of the currently logged in user can perform them on this team
+ readOnly: true
+ type: object
+ type: object
+ UserTeamPermissionType:
+ default: user_team_permissions
+ description: User team permission type
+ enum:
+ - user_team_permissions
+ example: user_team_permissions
+ type: string
+ x-enum-varnames:
+ - USER_TEAM_PERMISSIONS
+ UserTeamRelationships:
+ description: Relationship between membership and a user
+ properties:
+ user:
+ $ref: '#/components/schemas/RelationshipToUserTeamUser'
+ type: object
+ UserTeamRequest:
+ description: Team membership request
+ properties:
+ data:
+ $ref: '#/components/schemas/UserTeamCreate'
+ required:
+ - data
+ type: object
+ UserTeamResponse:
+ description: Team membership response
+ properties:
+ data:
+ $ref: '#/components/schemas/UserTeam'
+ type: object
+ UserTeamRole:
+ description: The user's role within the team
+ enum:
+ - admin
+ nullable: true
+ type: string
+ x-enum-varnames:
+ - ADMIN
+ UserTeamType:
+ default: team_memberships
+ description: Team membership type
+ enum:
+ - team_memberships
+ example: team_memberships
+ type: string
+ x-enum-varnames:
+ - TEAM_MEMBERSHIPS
+ UserTeamUpdate:
+ description: A user's relationship with a team
+ properties:
+ attributes:
+ $ref: '#/components/schemas/UserTeamAttributes'
+ type:
+ $ref: '#/components/schemas/UserTeamType'
+ required:
+ - id
+ - type
+ type: object
+ UserTeamUpdateRequest:
+ description: Team membership request
+ properties:
+ data:
+ $ref: '#/components/schemas/UserTeamUpdate'
+ required:
+ - data
+ type: object
+ UserTeamUserType:
+ default: users
+ description: User team user type
+ enum:
+ - users
+ example: users
+ type: string
+ x-enum-varnames:
+ - USERS
+ UserTeamsResponse:
+ description: Team memberships response
+ properties:
+ data:
+ description: Team memberships response data
+ items:
+ $ref: '#/components/schemas/UserTeam'
+ type: array
+ type: object
UserUpdateAttributes:
description: Attributes of the edited user.
properties:
@@ -18501,8 +19180,164 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/RoleResponse'
+ $ref: '#/components/schemas/RoleResponse'
+ description: OK
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Authentication error
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Not found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Get a role
+ tags:
+ - Roles
+ x-codegen-request-body-name: body
+ patch:
+ description: Edit a role. Can only be used with application keys belonging to
+ administrators.
+ operationId: UpdateRole
+ parameters:
+ - $ref: '#/components/parameters/RoleID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleUpdateRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleUpdateResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Authentication error
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Not found
+ '422':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Unprocessable Entity
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - user_access_manage
+ summary: Update a role
+ tags:
+ - Roles
+ x-codegen-request-body-name: body
+ /api/v2/roles/{role_id}/clone:
+ post:
+ description: Clone an existing role
+ operationId: CloneRole
+ parameters:
+ - $ref: '#/components/parameters/RoleID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleCloneRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RoleResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Authentication error
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Not found
+ '409':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Conflict
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - user_access_manage
+ summary: Create a new role by cloning an existing role
+ tags:
+ - Roles
+ x-codegen-request-body-name: body
+ x-permission: OR(USER_ACCESS_MANAGE)
+ /api/v2/roles/{role_id}/permissions:
+ delete:
+ description: Removes a permission from a role.
+ operationId: RemovePermissionFromRole
+ parameters:
+ - $ref: '#/components/parameters/RoleID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RelationshipToPermission'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PermissionsResponse'
description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
'403':
content:
application/json:
@@ -18520,36 +19355,24 @@ paths:
security:
- apiKeyAuth: []
appKeyAuth: []
- - AuthZ: []
- summary: Get a role
+ - AuthZ:
+ - user_access_manage
+ summary: Revoke permission
tags:
- Roles
x-codegen-request-body-name: body
- patch:
- description: Edit a role. Can only be used with application keys belonging to
- administrators.
- operationId: UpdateRole
+ get:
+ description: Returns a list of all permissions for a single role.
+ operationId: ListRolePermissions
parameters:
- $ref: '#/components/parameters/RoleID'
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RoleUpdateRequest'
- required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/RoleUpdateResponse'
+ $ref: '#/components/schemas/PermissionsResponse'
description: OK
- '400':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
'403':
content:
application/json:
@@ -18562,41 +19385,33 @@ paths:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Not found
- '422':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Unprocessable Entity
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- - AuthZ:
- - user_access_manage
- summary: Update a role
+ - AuthZ: []
+ summary: List permissions for a role
tags:
- Roles
x-codegen-request-body-name: body
- /api/v2/roles/{role_id}/clone:
post:
- description: Clone an existing role
- operationId: CloneRole
+ description: Adds a permission to a role.
+ operationId: AddPermissionToRole
parameters:
- $ref: '#/components/parameters/RoleID'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/RoleCloneRequest'
+ $ref: '#/components/schemas/RelationshipToPermission'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/RoleResponse'
+ $ref: '#/components/schemas/PermissionsResponse'
description: OK
'400':
content:
@@ -18616,12 +19431,6 @@ paths:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Not found
- '409':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Conflict
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
@@ -18629,29 +19438,28 @@ paths:
appKeyAuth: []
- AuthZ:
- user_access_manage
- summary: Create a new role by cloning an existing role
+ summary: Grant permission to a role
tags:
- Roles
x-codegen-request-body-name: body
- x-permission: OR(USER_ACCESS_MANAGE)
- /api/v2/roles/{role_id}/permissions:
+ /api/v2/roles/{role_id}/users:
delete:
- description: Removes a permission from a role.
- operationId: RemovePermissionFromRole
+ description: Removes a user from a role.
+ operationId: RemoveUserFromRole
parameters:
- $ref: '#/components/parameters/RoleID'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/RelationshipToPermission'
+ $ref: '#/components/schemas/RelationshipToUser'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/PermissionsResponse'
+ $ref: '#/components/schemas/UsersResponse'
description: OK
'400':
content:
@@ -18678,21 +19486,41 @@ paths:
appKeyAuth: []
- AuthZ:
- user_access_manage
- summary: Revoke permission
+ summary: Remove a user from a role
tags:
- Roles
x-codegen-request-body-name: body
get:
- description: Returns a list of all permissions for a single role.
- operationId: ListRolePermissions
+ description: Gets all users of a role.
+ operationId: ListRoleUsers
parameters:
- $ref: '#/components/parameters/RoleID'
+ - $ref: '#/components/parameters/PageSize'
+ - $ref: '#/components/parameters/PageNumber'
+ - description: 'User attribute to order results by. Sort order is **ascending**
+ by default.
+
+ Sort order is **descending** if the field is prefixed by a negative sign,
+
+ for example `sort=-name`. Options: `name`, `email`, `status`.'
+ in: query
+ name: sort
+ required: false
+ schema:
+ default: name
+ type: string
+ - description: Filter all users by the given string. Defaults to no filtering.
+ in: query
+ name: filter
+ required: false
+ schema:
+ type: string
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/PermissionsResponse'
+ $ref: '#/components/schemas/UsersResponse'
description: OK
'403':
content:
@@ -18712,27 +19540,26 @@ paths:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
- summary: List permissions for a role
+ summary: Get all users of a role
tags:
- Roles
- x-codegen-request-body-name: body
post:
- description: Adds a permission to a role.
- operationId: AddPermissionToRole
+ description: Adds a user to a role.
+ operationId: AddUserToRole
parameters:
- $ref: '#/components/parameters/RoleID'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/RelationshipToPermission'
+ $ref: '#/components/schemas/RelationshipToUser'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/PermissionsResponse'
+ $ref: '#/components/schemas/UsersResponse'
description: OK
'400':
content:
@@ -18759,385 +19586,488 @@ paths:
appKeyAuth: []
- AuthZ:
- user_access_manage
- summary: Grant permission to a role
+ summary: Add a user to a role
tags:
- Roles
x-codegen-request-body-name: body
- /api/v2/roles/{role_id}/users:
- delete:
- description: Removes a user from a role.
- operationId: RemoveUserFromRole
- parameters:
- - $ref: '#/components/parameters/RoleID'
+ /api/v2/rum/analytics/aggregate:
+ post:
+ description: The API endpoint to aggregate RUM events into buckets of computed
+ metrics and timeseries.
+ operationId: AggregateRUMEvents
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/RelationshipToUser'
+ $ref: '#/components/schemas/RUMAggregateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/UsersResponse'
+ $ref: '#/components/schemas/RUMAnalyticsAggregateResponse'
description: OK
'400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ: []
+ summary: Aggregate RUM events
+ tags:
+ - RUM
+ x-codegen-request-body-name: body
+ /api/v2/rum/applications:
+ get:
+ description: List all the RUM applications in your organization.
+ operationId: GetRUMApplications
+ responses:
+ '200':
content:
application/json:
schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
- '403':
+ $ref: '#/components/schemas/RUMApplicationsResponse'
+ description: OK
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: List all the RUM applications
+ tags:
+ - RUM
+ post:
+ description: Create a new RUM application in your organization.
+ operationId: CreateRUMApplication
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RUMApplicationCreateRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RUMApplicationResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Create a new RUM application
+ tags:
+ - RUM
+ x-codegen-request-body-name: body
+ /api/v2/rum/applications/{id}:
+ delete:
+ description: Delete an existing RUM application in your organization.
+ operationId: DeleteRUMApplication
+ parameters:
+ - description: RUM application ID.
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ '204':
+ description: No Content
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Delete a RUM application
+ tags:
+ - RUM
+ get:
+ description: Get the RUM application with given ID in your organization.
+ operationId: GetRUMApplication
+ parameters:
+ - description: RUM application ID.
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RUMApplicationResponse'
+ description: OK
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Get a RUM application
+ tags:
+ - RUM
+ patch:
+ description: Update the RUM application with given ID in your organization.
+ operationId: UpdateRUMApplication
+ parameters:
+ - description: RUM application ID.
+ in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RUMApplicationUpdateRequest'
+ required: true
+ responses:
+ '200':
content:
application/json:
schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Authentication error
+ $ref: '#/components/schemas/RUMApplicationResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
'404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '422':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Not found
+ description: Unprocessable Entity.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- - AuthZ:
- - user_access_manage
- summary: Remove a user from a role
+ summary: Update a RUM application
tags:
- - Roles
+ - RUM
x-codegen-request-body-name: body
+ /api/v2/rum/events:
get:
- description: Gets all users of a role.
- operationId: ListRoleUsers
- parameters:
- - $ref: '#/components/parameters/RoleID'
- - $ref: '#/components/parameters/PageSize'
- - $ref: '#/components/parameters/PageNumber'
- - description: 'User attribute to order results by. Sort order is **ascending**
- by default.
+ description: 'List endpoint returns events that match a RUM search query.
- Sort order is **descending** if the field is prefixed by a negative sign,
+ [Results are paginated][1].
- for example `sort=-name`. Options: `name`, `email`, `status`.'
+
+ Use this endpoint to see your latest RUM events.
+
+
+ [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination'
+ operationId: ListRUMEvents
+ parameters:
+ - description: Search query following RUM syntax.
+ example: '@type:session @application_id:xxxx'
in: query
- name: sort
+ name: filter[query]
required: false
schema:
- default: name
type: string
- - description: Filter all users by the given string. Defaults to no filtering.
+ - description: Minimum timestamp for requested events.
+ example: '2019-01-02T09:42:36.320Z'
in: query
- name: filter
+ name: filter[from]
+ required: false
+ schema:
+ format: date-time
+ type: string
+ - description: Maximum timestamp for requested events.
+ example: '2019-01-03T09:42:36.320Z'
+ in: query
+ name: filter[to]
+ required: false
+ schema:
+ format: date-time
+ type: string
+ - description: Order of events in results.
+ in: query
+ name: sort
+ required: false
+ schema:
+ $ref: '#/components/schemas/RUMSort'
+ - description: List following results with a cursor provided in the previous
+ query.
+ example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==
+ in: query
+ name: page[cursor]
required: false
schema:
type: string
+ - description: Maximum number of events in the response.
+ example: 25
+ in: query
+ name: page[limit]
+ required: false
+ schema:
+ default: 10
+ format: int32
+ maximum: 1000
+ type: integer
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/UsersResponse'
+ $ref: '#/components/schemas/RUMEventsResponse'
description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
'403':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Authentication error
- '404':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Not found
+ $ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
- summary: Get all users of a role
+ summary: Get a list of RUM events
tags:
- - Roles
+ - RUM
+ x-pagination:
+ cursorParam: page[cursor]
+ cursorPath: meta.page.after
+ limitParam: page[limit]
+ resultsPath: data
+ /api/v2/rum/events/search:
post:
- description: Adds a user to a role.
- operationId: AddUserToRole
- parameters:
- - $ref: '#/components/parameters/RoleID'
+ description: 'List endpoint returns RUM events that match a RUM search query.
+
+ [Results are paginated][1].
+
+
+ Use this endpoint to build complex RUM events filtering and search.
+
+
+ [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination'
+ operationId: SearchRUMEvents
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/RelationshipToUser'
+ $ref: '#/components/schemas/RUMSearchEventsRequest'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/UsersResponse'
+ $ref: '#/components/schemas/RUMEventsResponse'
description: OK
'400':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
+ $ref: '#/components/responses/BadRequestResponse'
'403':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Authentication error
- '404':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Not found
+ $ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- - AuthZ:
- - user_access_manage
- summary: Add a user to a role
+ - AuthZ: []
+ summary: Search RUM events
tags:
- - Roles
+ - RUM
x-codegen-request-body-name: body
- /api/v2/rum/analytics/aggregate:
+ x-pagination:
+ cursorParam: body.page.cursor
+ cursorPath: meta.page.after
+ limitParam: body.page.limit
+ resultsPath: data
+ /api/v2/saml_configurations/idp_metadata:
post:
- description: The API endpoint to aggregate RUM events into buckets of computed
- metrics and timeseries.
- operationId: AggregateRUMEvents
+ description: 'Endpoint for uploading IdP metadata for SAML setup.
+
+
+ Use this endpoint to upload or replace IdP metadata for SAML login configuration.'
+ operationId: UploadIdPMetadata
requestBody:
content:
- application/json:
+ multipart/form-data:
schema:
- $ref: '#/components/schemas/RUMAggregateRequest'
+ $ref: '#/components/schemas/IdPMetadataFormData'
required: true
responses:
'200':
+ description: OK
+ '400':
content:
application/json:
schema:
- $ref: '#/components/schemas/RUMAnalyticsAggregateResponse'
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Forbidden
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Upload IdP metadata
+ tags:
+ - Organizations
+ x-codegen-request-body-name: body
+ /api/v2/security/cloud_workload/policy/download:
+ get:
+ description: 'The download endpoint generates a Cloud Workload Security policy
+ file from your currently active
+
+ Cloud Workload Security rules, and downloads them as a .policy file. This
+ file can then be deployed to
+
+ your Agents to update the policy running in your environment.'
+ operationId: DownloadCloudWorkloadPolicyFile
+ responses:
+ '200':
+ content:
+ application/yaml:
+ schema:
+ format: binary
+ type: string
description: OK
- '400':
- $ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- - AuthZ: []
- summary: Aggregate RUM events
+ summary: Get the latest Cloud Workload Security policy
tags:
- - RUM
- x-codegen-request-body-name: body
- /api/v2/rum/applications:
+ - Cloud Workload Security
+ /api/v2/security_monitoring/cloud_workload_security/agent_rules:
get:
- description: List all the RUM applications in your organization.
- operationId: GetRUMApplications
+ description: Get the list of Agent rules.
+ operationId: ListCloudWorkloadSecurityAgentRules
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/RUMApplicationsResponse'
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentRulesListResponse'
description: OK
- '404':
- $ref: '#/components/responses/NotFoundResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: List all the RUM applications
+ summary: Get all Cloud Workload Security Agent rules
tags:
- - RUM
+ - Cloud Workload Security
post:
- description: Create a new RUM application in your organization.
- operationId: CreateRUMApplication
+ description: Create a new Agent rule with the given parameters.
+ operationId: CreateCloudWorkloadSecurityAgentRule
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/RUMApplicationCreateRequest'
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateRequest'
+ description: The definition of the new Agent rule.
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/RUMApplicationResponse'
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '409':
+ $ref: '#/components/responses/ConflictResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Create a new RUM application
+ summary: Create a Cloud Workload Security Agent rule
tags:
- - RUM
+ - Cloud Workload Security
x-codegen-request-body-name: body
- /api/v2/rum/applications/{id}:
+ /api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}:
delete:
- description: Delete an existing RUM application in your organization.
- operationId: DeleteRUMApplication
+ description: Delete a specific Agent rule.
+ operationId: DeleteCloudWorkloadSecurityAgentRule
parameters:
- - description: RUM application ID.
- in: path
- name: id
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
responses:
'204':
- description: No Content
+ description: OK
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Delete a RUM application
+ summary: Delete a Cloud Workload Security Agent rule
tags:
- - RUM
+ - Cloud Workload Security
get:
- description: Get the RUM application with given ID in your organization.
- operationId: GetRUMApplication
+ description: Get the details of a specific Agent rule.
+ operationId: GetCloudWorkloadSecurityAgentRule
parameters:
- - description: RUM application ID.
- in: path
- name: id
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/RUMApplicationResponse'
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
description: OK
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Get a RUM application
+ summary: Get a Cloud Workload Security Agent rule
tags:
- - RUM
+ - Cloud Workload Security
patch:
- description: Update the RUM application with given ID in your organization.
- operationId: UpdateRUMApplication
+ description: 'Update a specific Agent rule.
+
+ Returns the Agent rule object when the request is successful.'
+ operationId: UpdateCloudWorkloadSecurityAgentRule
parameters:
- - description: RUM application ID.
- in: path
- name: id
- required: true
- schema:
- type: string
+ - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/RUMApplicationUpdateRequest'
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateRequest'
+ description: New definition of the Agent rule.
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/RUMApplicationResponse'
+ $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
- '422':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Unprocessable Entity.
+ '409':
+ $ref: '#/components/responses/ConcurrentModificationResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Update a RUM application
+ summary: Update a Cloud Workload Security Agent rule
tags:
- - RUM
+ - Cloud Workload Security
x-codegen-request-body-name: body
- /api/v2/rum/events:
+ /api/v2/security_monitoring/configuration/security_filters:
get:
- description: 'List endpoint returns events that match a RUM search query.
-
- [Results are paginated][1].
-
-
- Use this endpoint to see your latest RUM events.
-
-
- [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination'
- operationId: ListRUMEvents
- parameters:
- - description: Search query following RUM syntax.
- example: '@type:session @application_id:xxxx'
- in: query
- name: filter[query]
- required: false
- schema:
- type: string
- - description: Minimum timestamp for requested events.
- example: '2019-01-02T09:42:36.320Z'
- in: query
- name: filter[from]
- required: false
- schema:
- format: date-time
- type: string
- - description: Maximum timestamp for requested events.
- example: '2019-01-03T09:42:36.320Z'
- in: query
- name: filter[to]
- required: false
- schema:
- format: date-time
- type: string
- - description: Order of events in results.
- in: query
- name: sort
- required: false
- schema:
- $ref: '#/components/schemas/RUMSort'
- - description: List following results with a cursor provided in the previous
- query.
- example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==
- in: query
- name: page[cursor]
- required: false
- schema:
- type: string
- - description: Maximum number of events in the response.
- example: 25
- in: query
- name: page[limit]
- required: false
- schema:
- default: 10
- format: int32
- maximum: 1000
- type: integer
+ description: Get the list of configured security filters with their definitions.
+ operationId: ListSecurityFilters
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/RUMEventsResponse'
+ $ref: '#/components/schemas/SecurityFiltersResponse'
description: OK
- '400':
- $ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
@@ -19145,171 +20075,207 @@ paths:
security:
- apiKeyAuth: []
appKeyAuth: []
- - AuthZ: []
- summary: Get a list of RUM events
+ - AuthZ:
+ - security_monitoring_filters_read
+ summary: Get all security filters
tags:
- - RUM
- x-pagination:
- cursorParam: page[cursor]
- cursorPath: meta.page.after
- limitParam: page[limit]
- resultsPath: data
- /api/v2/rum/events/search:
+ - Security Monitoring
post:
- description: 'List endpoint returns RUM events that match a RUM search query.
-
- [Results are paginated][1].
-
+ description: 'Create a security filter.
- Use this endpoint to build complex RUM events filtering and search.
+ See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/)
- [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination'
- operationId: SearchRUMEvents
+ for more examples.'
+ operationId: CreateSecurityFilter
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/RUMSearchEventsRequest'
+ $ref: '#/components/schemas/SecurityFilterCreateRequest'
+ description: The definition of the new security filter.
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/RUMEventsResponse'
+ $ref: '#/components/schemas/SecurityFilterResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
+ '409':
+ $ref: '#/components/responses/ConflictResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- - AuthZ: []
- summary: Search RUM events
+ - AuthZ:
+ - security_monitoring_filters_write
+ summary: Create a security filter
tags:
- - RUM
+ - Security Monitoring
x-codegen-request-body-name: body
- x-pagination:
- cursorParam: body.page.cursor
- cursorPath: meta.page.after
- limitParam: body.page.limit
- resultsPath: data
- /api/v2/saml_configurations/idp_metadata:
- post:
- description: 'Endpoint for uploading IdP metadata for SAML setup.
+ /api/v2/security_monitoring/configuration/security_filters/{security_filter_id}:
+ delete:
+ description: Delete a specific security filter.
+ operationId: DeleteSecurityFilter
+ parameters:
+ - $ref: '#/components/parameters/SecurityFilterID'
+ responses:
+ '204':
+ description: OK
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - security_monitoring_filters_write
+ summary: Delete a security filter
+ tags:
+ - Security Monitoring
+ get:
+ description: 'Get the details of a specific security filter.
- Use this endpoint to upload or replace IdP metadata for SAML login configuration.'
- operationId: UploadIdPMetadata
- requestBody:
- content:
- multipart/form-data:
- schema:
- $ref: '#/components/schemas/IdPMetadataFormData'
- required: true
+ See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/)
+
+ for more examples.'
+ operationId: GetSecurityFilter
+ parameters:
+ - $ref: '#/components/parameters/SecurityFilterID'
responses:
'200':
- description: OK
- '400':
content:
application/json:
schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
+ $ref: '#/components/schemas/SecurityFilterResponse'
+ description: OK
'403':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Forbidden
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Upload IdP metadata
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - security_monitoring_filters_read
+ summary: Get a security filter
tags:
- - Organizations
- x-codegen-request-body-name: body
- /api/v2/security/cloud_workload/policy/download:
- get:
- description: 'The download endpoint generates a Cloud Workload Security policy
- file from your currently active
-
- Cloud Workload Security rules, and downloads them as a .policy file. This
- file can then be deployed to
+ - Security Monitoring
+ patch:
+ description: 'Update a specific security filter.
- your Agents to update the policy running in your environment.'
- operationId: DownloadCloudWorkloadPolicyFile
+ Returns the security filter object when the request is successful.'
+ operationId: UpdateSecurityFilter
+ parameters:
+ - $ref: '#/components/parameters/SecurityFilterID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SecurityFilterUpdateRequest'
+ description: New definition of the security filter.
+ required: true
responses:
'200':
content:
- application/yaml:
+ application/json:
schema:
- format: binary
- type: string
+ $ref: '#/components/schemas/SecurityFilterResponse'
description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '409':
+ $ref: '#/components/responses/ConcurrentModificationResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Get the latest Cloud Workload Security policy
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - security_monitoring_filters_write
+ summary: Update a security filter
tags:
- - Cloud Workload Security
- /api/v2/security_monitoring/cloud_workload_security/agent_rules:
+ - Security Monitoring
+ x-codegen-request-body-name: body
+ /api/v2/security_monitoring/rules:
get:
- description: Get the list of Agent rules.
- operationId: ListCloudWorkloadSecurityAgentRules
+ description: List rules.
+ operationId: ListSecurityMonitoringRules
+ parameters:
+ - $ref: '#/components/parameters/PageSize'
+ - $ref: '#/components/parameters/PageNumber'
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/CloudWorkloadSecurityAgentRulesListResponse'
+ $ref: '#/components/schemas/SecurityMonitoringListRulesResponse'
description: OK
- '403':
- $ref: '#/components/responses/NotAuthorizedResponse'
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Get all Cloud Workload Security Agent rules
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - security_monitoring_rules_read
+ summary: List rules
tags:
- - Cloud Workload Security
+ - Security Monitoring
post:
- description: Create a new Agent rule with the given parameters.
- operationId: CreateCloudWorkloadSecurityAgentRule
+ description: Create a detection rule.
+ operationId: CreateSecurityMonitoringRule
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleCreateRequest'
- description: The definition of the new Agent rule.
+ $ref: '#/components/schemas/SecurityMonitoringRuleCreatePayload'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
+ $ref: '#/components/schemas/SecurityMonitoringRuleResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
- '409':
- $ref: '#/components/responses/ConflictResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Create a Cloud Workload Security Agent rule
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - security_monitoring_rules_write
+ summary: Create a detection rule
tags:
- - Cloud Workload Security
+ - Security Monitoring
x-codegen-request-body-name: body
- /api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id}:
+ /api/v2/security_monitoring/rules/{rule_id}:
delete:
- description: Delete a specific Agent rule.
- operationId: DeleteCloudWorkloadSecurityAgentRule
+ description: Delete an existing rule. Default rules cannot be deleted.
+ operationId: DeleteSecurityMonitoringRule
parameters:
- - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
+ - $ref: '#/components/parameters/SecurityMonitoringRuleID'
responses:
'204':
description: OK
@@ -19319,169 +20285,218 @@ paths:
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Delete a Cloud Workload Security Agent rule
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - security_monitoring_rules_write
+ summary: Delete an existing rule
tags:
- - Cloud Workload Security
+ - Security Monitoring
get:
- description: Get the details of a specific Agent rule.
- operationId: GetCloudWorkloadSecurityAgentRule
+ description: Get a rule's details.
+ operationId: GetSecurityMonitoringRule
parameters:
- - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
+ - $ref: '#/components/parameters/SecurityMonitoringRuleID'
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
+ $ref: '#/components/schemas/SecurityMonitoringRuleResponse'
description: OK
- '403':
- $ref: '#/components/responses/NotAuthorizedResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Get a Cloud Workload Security Agent rule
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - security_monitoring_rules_read
+ summary: Get a rule's details
tags:
- - Cloud Workload Security
- patch:
- description: 'Update a specific Agent rule.
+ - Security Monitoring
+ put:
+ description: 'Update an existing rule. When updating `cases`, `queries` or `options`,
+ the whole field
- Returns the Agent rule object when the request is successful.'
- operationId: UpdateCloudWorkloadSecurityAgentRule
+ must be included. For example, when modifying a query all queries must be
+ included.
+
+ Default rules can only be updated to be enabled and to change notifications.'
+ operationId: UpdateSecurityMonitoringRule
parameters:
- - $ref: '#/components/parameters/CloudWorkloadSecurityAgentRuleID'
+ - $ref: '#/components/parameters/SecurityMonitoringRuleID'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleUpdateRequest'
- description: New definition of the Agent rule.
+ $ref: '#/components/schemas/SecurityMonitoringRuleUpdatePayload'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleResponse'
+ $ref: '#/components/schemas/SecurityMonitoringRuleResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/ConcurrentModificationResponse'
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
- '409':
- $ref: '#/components/responses/ConcurrentModificationResponse'
- '429':
- $ref: '#/components/responses/TooManyRequestsResponse'
- summary: Update a Cloud Workload Security Agent rule
- tags:
- - Cloud Workload Security
- x-codegen-request-body-name: body
- /api/v2/security_monitoring/configuration/security_filters:
- get:
- description: Get the list of configured security filters with their definitions.
- operationId: ListSecurityFilters
- responses:
- '200':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SecurityFiltersResponse'
- description: OK
- '403':
- $ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- - security_monitoring_filters_read
- summary: Get all security filters
+ - security_monitoring_rules_write
+ summary: Update an existing rule
tags:
- Security Monitoring
- post:
- description: 'Create a security filter.
-
+ x-codegen-request-body-name: body
+ /api/v2/security_monitoring/signals:
+ get:
+ description: 'The list endpoint returns security signals that match a search
+ query.
- See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/)
+ Both this endpoint and the POST endpoint can be used interchangeably when
+ listing
- for more examples.'
- operationId: CreateSecurityFilter
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SecurityFilterCreateRequest'
- description: The definition of the new security filter.
- required: true
+ security signals.'
+ operationId: ListSecurityMonitoringSignals
+ parameters:
+ - description: The search query for security signals.
+ example: security:attack status:high
+ in: query
+ name: filter[query]
+ required: false
+ schema:
+ type: string
+ - description: The minimum timestamp for requested security signals.
+ example: '2019-01-02T09:42:36.320Z'
+ in: query
+ name: filter[from]
+ required: false
+ schema:
+ format: date-time
+ type: string
+ - description: The maximum timestamp for requested security signals.
+ example: '2019-01-03T09:42:36.320Z'
+ in: query
+ name: filter[to]
+ required: false
+ schema:
+ format: date-time
+ type: string
+ - description: The order of the security signals in results.
+ in: query
+ name: sort
+ required: false
+ schema:
+ $ref: '#/components/schemas/SecurityMonitoringSignalsSort'
+ - description: A list of results using the cursor provided in the previous query.
+ example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==
+ in: query
+ name: page[cursor]
+ required: false
+ schema:
+ type: string
+ - description: The maximum number of security signals in the response.
+ example: 25
+ in: query
+ name: page[limit]
+ required: false
+ schema:
+ default: 10
+ format: int32
+ maximum: 1000
+ type: integer
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityFilterResponse'
+ $ref: '#/components/schemas/SecurityMonitoringSignalsListResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
- '409':
- $ref: '#/components/responses/ConflictResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- - security_monitoring_filters_write
- summary: Create a security filter
+ - security_monitoring_signals_read
+ summary: Get a quick list of security signals
tags:
- Security Monitoring
- x-codegen-request-body-name: body
- /api/v2/security_monitoring/configuration/security_filters/{security_filter_id}:
- delete:
- description: Delete a specific security filter.
- operationId: DeleteSecurityFilter
- parameters:
- - $ref: '#/components/parameters/SecurityFilterID'
+ x-pagination:
+ cursorParam: page[cursor]
+ cursorPath: meta.page.after
+ limitParam: page[limit]
+ resultsPath: data
+ /api/v2/security_monitoring/signals/search:
+ post:
+ description: 'Returns security signals that match a search query.
+
+ Both this endpoint and the GET endpoint can be used interchangeably for listing
+
+ security signals.'
+ operationId: SearchSecurityMonitoringSignals
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SecurityMonitoringSignalListRequest'
+ required: false
responses:
- '204':
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SecurityMonitoringSignalsListResponse'
description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
- '404':
- $ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- - security_monitoring_filters_write
- summary: Delete a security filter
+ - security_monitoring_signals_read
+ summary: Get a list of security signals
tags:
- Security Monitoring
+ x-codegen-request-body-name: body
+ x-pagination:
+ cursorParam: body.page.cursor
+ cursorPath: meta.page.after
+ limitParam: body.page.limit
+ resultsPath: data
+ /api/v2/security_monitoring/signals/{signal_id}:
get:
- description: 'Get the details of a specific security filter.
-
-
- See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/)
-
- for more examples.'
- operationId: GetSecurityFilter
+ description: Get a signal's details.
+ operationId: GetSecurityMonitoringSignal
parameters:
- - $ref: '#/components/parameters/SecurityFilterID'
+ - $ref: '#/components/parameters/SignalID'
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityFilterResponse'
+ $ref: '#/components/schemas/SecurityMonitoringSignal'
description: OK
- '403':
- $ref: '#/components/responses/NotAuthorizedResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
@@ -19490,365 +20505,435 @@ paths:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- - security_monitoring_filters_read
- summary: Get a security filter
+ - security_monitoring_signals_read
+ summary: Get a signal's details
tags:
- Security Monitoring
+ /api/v2/security_monitoring/signals/{signal_id}/assignee:
patch:
- description: 'Update a specific security filter.
-
- Returns the security filter object when the request is successful.'
- operationId: UpdateSecurityFilter
+ description: Modify the triage assignee of a security signal.
+ operationId: EditSecurityMonitoringSignalAssignee
parameters:
- - $ref: '#/components/parameters/SecurityFilterID'
+ - $ref: '#/components/parameters/SignalID'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityFilterUpdateRequest'
- description: New definition of the security filter.
+ $ref: '#/components/schemas/SecurityMonitoringSignalAssigneeUpdateRequest'
+ description: Attributes describing the signal update.
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityFilterResponse'
+ $ref: '#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse'
description: OK
'400':
- $ref: '#/components/responses/BadRequestResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
'403':
- $ref: '#/components/responses/NotAuthorizedResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Forbidden
'404':
- $ref: '#/components/responses/NotFoundResponse'
- '409':
- $ref: '#/components/responses/ConcurrentModificationResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- - AuthZ:
- - security_monitoring_filters_write
- summary: Update a security filter
+ summary: Modify the triage assignee of a security signal
tags:
- Security Monitoring
x-codegen-request-body-name: body
- /api/v2/security_monitoring/rules:
- get:
- description: List rules.
- operationId: ListSecurityMonitoringRules
+ /api/v2/security_monitoring/signals/{signal_id}/incidents:
+ patch:
+ description: Change the related incidents for a security signal.
+ operationId: EditSecurityMonitoringSignalIncidents
parameters:
- - $ref: '#/components/parameters/PageSize'
- - $ref: '#/components/parameters/PageNumber'
+ - $ref: '#/components/parameters/SignalID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SecurityMonitoringSignalIncidentsUpdateRequest'
+ description: Attributes describing the signal update.
+ required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringListRulesResponse'
+ $ref: '#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse'
description: OK
'400':
- $ref: '#/components/responses/BadRequestResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Forbidden
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- - AuthZ:
- - security_monitoring_rules_read
- summary: List rules
+ summary: Change the related incidents of a security signal
tags:
- Security Monitoring
- post:
- description: Create a detection rule.
- operationId: CreateSecurityMonitoringRule
+ x-codegen-request-body-name: body
+ /api/v2/security_monitoring/signals/{signal_id}/state:
+ patch:
+ description: Change the triage state of a security signal.
+ operationId: EditSecurityMonitoringSignalState
+ parameters:
+ - $ref: '#/components/parameters/SignalID'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringRuleCreatePayload'
+ $ref: '#/components/schemas/SecurityMonitoringSignalStateUpdateRequest'
+ description: Attributes describing the signal update.
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringRuleResponse'
+ $ref: '#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse'
description: OK
'400':
- $ref: '#/components/responses/BadRequestResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
'403':
- $ref: '#/components/responses/NotAuthorizedResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Forbidden
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- - AuthZ:
- - security_monitoring_rules_write
- summary: Create a detection rule
+ summary: Change the triage state of a security signal
tags:
- Security Monitoring
x-codegen-request-body-name: body
- /api/v2/security_monitoring/rules/{rule_id}:
- delete:
- description: Delete an existing rule. Default rules cannot be deleted.
- operationId: DeleteSecurityMonitoringRule
- parameters:
- - $ref: '#/components/parameters/SecurityMonitoringRuleID'
+ /api/v2/sensitive-data-scanner/config:
+ get:
+ description: List all the Scanning groups in your organization.
+ operationId: ListScanningGroups
responses:
- '204':
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SensitiveDataScannerGetConfigResponse'
description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
'403':
- $ref: '#/components/responses/NotAuthorizedResponse'
- '404':
- $ref: '#/components/responses/NotFoundResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Authentication Error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- - AuthZ:
- - security_monitoring_rules_write
- summary: Delete an existing rule
+ summary: List Scanning Groups
tags:
- - Security Monitoring
- get:
- description: Get a rule's details.
- operationId: GetSecurityMonitoringRule
- parameters:
- - $ref: '#/components/parameters/SecurityMonitoringRuleID'
+ - Sensitive Data Scanner
+ patch:
+ description: Reorder the list of groups.
+ operationId: ReorderScanningGroups
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SensitiveDataScannerConfigRequest'
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SensitiveDataScannerReorderGroupsResponse'
+ description: OK
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Authentication Error
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Reorder Groups
+ tags:
+ - Sensitive Data Scanner
+ x-codegen-request-body-name: body
+ /api/v2/sensitive-data-scanner/config/groups:
+ post:
+ description: 'Create a scanning group.
+
+ The request MAY include a configuration relationship.
+
+ A rules relationship can be omitted entirely, but if it is included it MUST
+ be
+
+ null or an empty array (rules cannot be created at the same time).
+
+ The new group will be ordered last within the configuration.'
+ operationId: CreateScanningGroup
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SensitiveDataScannerGroupCreateRequest'
+ required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringRuleResponse'
+ $ref: '#/components/schemas/SensitiveDataScannerCreateGroupResponse'
description: OK
- '404':
- $ref: '#/components/responses/NotFoundResponse'
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Authentication Error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- - AuthZ:
- - security_monitoring_rules_read
- summary: Get a rule's details
+ summary: Create Scanning Group
tags:
- - Security Monitoring
- put:
- description: 'Update an existing rule. When updating `cases`, `queries` or `options`,
- the whole field
-
- must be included. For example, when modifying a query all queries must be
- included.
-
- Default rules can only be updated to be enabled and to change notifications.'
- operationId: UpdateSecurityMonitoringRule
+ - Sensitive Data Scanner
+ x-codegen-request-body-name: body
+ /api/v2/sensitive-data-scanner/config/groups/{group_id}:
+ delete:
+ description: Delete a given group.
+ operationId: DeleteScanningGroup
parameters:
- - $ref: '#/components/parameters/SecurityMonitoringRuleID'
+ - $ref: '#/components/parameters/SensitiveDataScannerGroupID'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringRuleUpdatePayload'
+ $ref: '#/components/schemas/SensitiveDataScannerGroupDeleteRequest'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringRuleResponse'
+ $ref: '#/components/schemas/SensitiveDataScannerGroupDeleteResponse'
description: OK
'400':
- $ref: '#/components/responses/BadRequestResponse'
- '401':
- $ref: '#/components/responses/ConcurrentModificationResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
'403':
- $ref: '#/components/responses/NotAuthorizedResponse'
- '404':
- $ref: '#/components/responses/NotFoundResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Authentication Error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- - AuthZ:
- - security_monitoring_rules_write
- summary: Update an existing rule
+ summary: Delete Scanning Group
tags:
- - Security Monitoring
+ - Sensitive Data Scanner
x-codegen-request-body-name: body
- /api/v2/security_monitoring/signals:
- get:
- description: 'The list endpoint returns security signals that match a search
- query.
+ patch:
+ description: 'Update a group, including the order of the rules.
- Both this endpoint and the POST endpoint can be used interchangeably when
- listing
+ Rules within the group are reordered by including a rules relationship. If
+ the rules
- security signals.'
- operationId: ListSecurityMonitoringSignals
+ relationship is present, its data section MUST contain linkages for all of
+ the rules
+
+ currently in the group, and MUST NOT contain any others.'
+ operationId: UpdateScanningGroup
parameters:
- - description: The search query for security signals.
- example: security:attack status:high
- in: query
- name: filter[query]
- required: false
- schema:
- type: string
- - description: The minimum timestamp for requested security signals.
- example: '2019-01-02T09:42:36.320Z'
- in: query
- name: filter[from]
- required: false
- schema:
- format: date-time
- type: string
- - description: The maximum timestamp for requested security signals.
- example: '2019-01-03T09:42:36.320Z'
- in: query
- name: filter[to]
- required: false
- schema:
- format: date-time
- type: string
- - description: The order of the security signals in results.
- in: query
- name: sort
- required: false
- schema:
- $ref: '#/components/schemas/SecurityMonitoringSignalsSort'
- - description: A list of results using the cursor provided in the previous query.
- example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==
- in: query
- name: page[cursor]
- required: false
- schema:
- type: string
- - description: The maximum number of security signals in the response.
- example: 25
- in: query
- name: page[limit]
- required: false
- schema:
- default: 10
- format: int32
- maximum: 1000
- type: integer
+ - $ref: '#/components/parameters/SensitiveDataScannerGroupID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SensitiveDataScannerGroupUpdateRequest'
+ required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringSignalsListResponse'
+ $ref: '#/components/schemas/SensitiveDataScannerGroupUpdateResponse'
description: OK
'400':
- $ref: '#/components/responses/BadRequestResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
'403':
- $ref: '#/components/responses/NotAuthorizedResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Authentication Error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- - AuthZ:
- - security_monitoring_signals_read
- summary: Get a quick list of security signals
+ summary: Update Scanning Group
tags:
- - Security Monitoring
- x-pagination:
- cursorParam: page[cursor]
- cursorPath: meta.page.after
- limitParam: page[limit]
- resultsPath: data
- /api/v2/security_monitoring/signals/search:
+ - Sensitive Data Scanner
+ x-codegen-request-body-name: body
+ /api/v2/sensitive-data-scanner/config/rules:
post:
- description: 'Returns security signals that match a search query.
+ description: 'Create a scanning rule in a sensitive data scanner group, ordered
+ last.
- Both this endpoint and the GET endpoint can be used interchangeably for listing
+ The posted rule MUST include a group relationship.
- security signals.'
- operationId: SearchSecurityMonitoringSignals
+ It MUST include either a standard_pattern relationship or a regex attribute,
+ but not both.
+
+ If included_attributes is empty or missing, we will scan all attributes except
+
+ excluded_attributes. If both are missing, we will scan the whole event.'
+ operationId: CreateScanningRule
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringSignalListRequest'
- required: false
+ $ref: '#/components/schemas/SensitiveDataScannerRuleCreateRequest'
+ required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringSignalsListResponse'
+ $ref: '#/components/schemas/SensitiveDataScannerCreateRuleResponse'
description: OK
'400':
- $ref: '#/components/responses/BadRequestResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
'403':
- $ref: '#/components/responses/NotAuthorizedResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Authentication Error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- - AuthZ:
- - security_monitoring_signals_read
- summary: Get a list of security signals
+ summary: Create Scanning Rule
tags:
- - Security Monitoring
+ - Sensitive Data Scanner
x-codegen-request-body-name: body
- x-pagination:
- cursorParam: body.page.cursor
- cursorPath: meta.page.after
- limitParam: body.page.limit
- resultsPath: data
- /api/v2/security_monitoring/signals/{signal_id}:
- get:
- description: Get a signal's details.
- operationId: GetSecurityMonitoringSignal
+ /api/v2/sensitive-data-scanner/config/rules/{rule_id}:
+ delete:
+ description: Delete a given rule.
+ operationId: DeleteScanningRule
parameters:
- - $ref: '#/components/parameters/SignalID'
+ - $ref: '#/components/parameters/SensitiveDataScannerRuleID'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SensitiveDataScannerRuleDeleteRequest'
+ required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringSignal'
+ $ref: '#/components/schemas/SensitiveDataScannerRuleDeleteResponse'
description: OK
- '404':
- $ref: '#/components/responses/NotFoundResponse'
+ '400':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Bad Request
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Authentication Error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- appKeyAuth: []
- - AuthZ:
- - security_monitoring_signals_read
- summary: Get a signal's details
+ summary: Delete Scanning Rule
tags:
- - Security Monitoring
- /api/v2/security_monitoring/signals/{signal_id}/assignee:
+ - Sensitive Data Scanner
+ x-codegen-request-body-name: body
patch:
- description: Modify the triage assignee of a security signal.
- operationId: EditSecurityMonitoringSignalAssignee
+ description: 'Update a scanning rule.
+
+ The request body MUST NOT include a standard_pattern relationship, as that
+ relationship
+
+ is non-editable. Trying to edit the regex attribute of a rule with a standard_pattern
+
+ relationship will also result in an error.'
+ operationId: UpdateScanningRule
parameters:
- - $ref: '#/components/parameters/SignalID'
+ - $ref: '#/components/parameters/SensitiveDataScannerRuleID'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringSignalAssigneeUpdateRequest'
- description: Attributes describing the signal update.
+ $ref: '#/components/schemas/SensitiveDataScannerRuleUpdateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse'
+ $ref: '#/components/schemas/SensitiveDataScannerRuleUpdateResponse'
description: OK
'400':
content:
@@ -19861,39 +20946,80 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Forbidden
- '404':
+ description: Authentication Error
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Update Scanning Rule
+ tags:
+ - Sensitive Data Scanner
+ x-codegen-request-body-name: body
+ /api/v2/sensitive-data-scanner/config/standard-patterns:
+ get:
+ description: Returns all standard patterns.
+ operationId: ListStandardPatterns
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SensitiveDataScannerStandardPatternsResponseData'
+ description: OK
+ '400':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Not Found
+ description: Bad Request
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Authentication Error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Modify the triage assignee of a security signal
+ summary: List standard patterns
tags:
- - Security Monitoring
- x-codegen-request-body-name: body
- /api/v2/security_monitoring/signals/{signal_id}/incidents:
- patch:
- description: Change the related incidents for a security signal.
- operationId: EditSecurityMonitoringSignalIncidents
+ - Sensitive Data Scanner
+ /api/v2/series:
+ post:
+ description: "The metrics end-point allows you to post time-series data that
+ can be graphed on Datadog\u2019s dashboards.\nThe maximum payload size is
+ 500 kilobytes (512000 bytes). Compressed payloads must have a decompressed
+ size of less than 5 megabytes (5242880 bytes).\n\nIf you\u2019re submitting
+ metrics directly to the Datadog API without using DogStatsD, expect:\n\n-
+ 64 bits for the timestamp\n- 64 bits for the value\n- 20 bytes for the metric
+ names\n- 50 bytes for the timeseries\n- The full payload is approximately
+ 100 bytes.\n\nHost name is one of the resources in the Resources field."
+ operationId: SubmitMetrics
parameters:
- - $ref: '#/components/parameters/SignalID'
+ - description: HTTP header used to compress the media-type.
+ in: header
+ name: Content-Encoding
+ required: false
+ schema:
+ $ref: '#/components/schemas/MetricContentEncoding'
requestBody:
content:
application/json:
+ examples:
+ dynamic-points:
+ description: "Post time-series data that can be graphed on Datadog\u2019s
+ dashboards."
+ externalValue: examples/metrics/dynamic-points.json.sh
+ summary: Dynamic Points
+ x-variables:
+ NOW: $(date +%s)
schema:
- $ref: '#/components/schemas/SecurityMonitoringSignalIncidentsUpdateRequest'
- description: Attributes describing the signal update.
+ $ref: '#/components/schemas/MetricPayload'
required: true
responses:
- '200':
+ '202':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse'
- description: OK
+ $ref: '#/components/schemas/IntakePayloadAccepted'
+ description: Payload accepted
'400':
content:
application/json:
@@ -19905,38 +21031,43 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Forbidden
- '404':
+ description: Authentication error
+ '408':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Not Found
+ description: Request timeout
+ '413':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Payload too large
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Change the related incidents of a security signal
+ security:
+ - apiKeyAuth: []
+ summary: Submit metrics
tags:
- - Security Monitoring
+ - Metrics
x-codegen-request-body-name: body
- /api/v2/security_monitoring/signals/{signal_id}/state:
- patch:
- description: Change the triage state of a security signal.
- operationId: EditSecurityMonitoringSignalState
- parameters:
- - $ref: '#/components/parameters/SignalID'
+ /api/v2/service_accounts:
+ post:
+ description: Create a service account for your organization.
+ operationId: CreateServiceAccount
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringSignalStateUpdateRequest'
- description: Attributes describing the signal update.
+ $ref: '#/components/schemas/ServiceAccountCreateRequest'
required: true
responses:
- '200':
+ '201':
content:
application/json:
schema:
- $ref: '#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse'
+ $ref: '#/components/schemas/UserResponse'
description: OK
'400':
content:
@@ -19949,29 +21080,31 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Forbidden
- '404':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Not Found
+ description: Authentication error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Change the triage state of a security signal
+ summary: Create a service account
tags:
- - Security Monitoring
+ - Service Accounts
x-codegen-request-body-name: body
- /api/v2/sensitive-data-scanner/config:
+ /api/v2/service_accounts/{service_account_id}/application_keys:
get:
- description: List all the Scanning groups in your organization.
- operationId: ListScanningGroups
+ description: List all application keys available for this service account.
+ operationId: ListServiceAccountApplicationKeys
+ parameters:
+ - $ref: '#/components/parameters/ServiceAccountID'
+ - $ref: '#/components/parameters/PageSize'
+ - $ref: '#/components/parameters/PageNumber'
+ - $ref: '#/components/parameters/ApplicationKeysSortParameter'
+ - $ref: '#/components/parameters/ApplicationKeyFilterParameter'
+ - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
+ - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerGetConfigResponse'
+ $ref: '#/components/schemas/ListApplicationKeysResponse'
description: OK
'400':
content:
@@ -19984,28 +21117,36 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Authentication Error
+ description: Forbidden
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: List Scanning Groups
+ summary: List application keys for this service account
tags:
- - Sensitive Data Scanner
- patch:
- description: Reorder the list of groups.
- operationId: ReorderScanningGroups
+ - Service Accounts
+ post:
+ description: Create an application key for this service account.
+ operationId: CreateServiceAccountApplicationKey
+ parameters:
+ - $ref: '#/components/parameters/ServiceAccountID'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerConfigRequest'
+ $ref: '#/components/schemas/ApplicationKeyCreateRequest'
required: true
responses:
- '200':
+ '201':
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerReorderGroupsResponse'
- description: OK
+ $ref: '#/components/schemas/ApplicationKeyResponse'
+ description: Created
'400':
content:
application/json:
@@ -20017,75 +21158,88 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Authentication Error
+ description: Forbidden
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Reorder Groups
+ summary: Create an application key for this service account
tags:
- - Sensitive Data Scanner
+ - Service Accounts
x-codegen-request-body-name: body
- /api/v2/sensitive-data-scanner/config/groups:
- post:
- description: 'Create a scanning group.
-
- The request MAY include a configuration relationship.
-
- A rules relationship can be omitted entirely, but if it is included it MUST
- be
-
- null or an empty array (rules cannot be created at the same time).
-
- The new group will be ordered last within the configuration.'
- operationId: CreateScanningGroup
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SensitiveDataScannerGroupCreateRequest'
- required: true
+ /api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}:
+ delete:
+ description: Delete an application key owned by this service account.
+ operationId: DeleteServiceAccountApplicationKey
+ parameters:
+ - $ref: '#/components/parameters/ServiceAccountID'
+ - $ref: '#/components/parameters/ApplicationKeyID'
+ responses:
+ '204':
+ description: No Content
+ '403':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Forbidden
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Not Found
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Delete an application key for this service account
+ tags:
+ - Service Accounts
+ get:
+ description: Get an application key owned by this service account.
+ operationId: GetServiceAccountApplicationKey
+ parameters:
+ - $ref: '#/components/parameters/ServiceAccountID'
+ - $ref: '#/components/parameters/ApplicationKeyID'
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerCreateGroupResponse'
+ $ref: '#/components/schemas/PartialApplicationKeyResponse'
description: OK
- '400':
+ '403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
- '403':
+ description: Forbidden
+ '404':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Authentication Error
+ description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Create Scanning Group
+ summary: Get one application key for this service account
tags:
- - Sensitive Data Scanner
- x-codegen-request-body-name: body
- /api/v2/sensitive-data-scanner/config/groups/{group_id}:
- delete:
- description: Delete a given group.
- operationId: DeleteScanningGroup
+ - Service Accounts
+ patch:
+ description: Edit an application key owned by this service account.
+ operationId: UpdateServiceAccountApplicationKey
parameters:
- - $ref: '#/components/parameters/SensitiveDataScannerGroupID'
+ - $ref: '#/components/parameters/ServiceAccountID'
+ - $ref: '#/components/parameters/ApplicationKeyID'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerGroupDeleteRequest'
+ $ref: '#/components/schemas/ApplicationKeyUpdateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerGroupDeleteResponse'
+ $ref: '#/components/schemas/PartialApplicationKeyResponse'
description: OK
'400':
content:
@@ -20098,812 +21252,998 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Authentication Error
+ description: Forbidden
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Delete Scanning Group
+ summary: Edit an application key for this service account
tags:
- - Sensitive Data Scanner
+ - Service Accounts
x-codegen-request-body-name: body
- patch:
- description: 'Update a group, including the order of the rules.
-
- Rules within the group are reordered by including a rules relationship. If
- the rules
-
- relationship is present, its data section MUST contain linkages for all of
- the rules
-
- currently in the group, and MUST NOT contain any others.'
- operationId: UpdateScanningGroup
+ /api/v2/services:
+ get:
+ description: Get all incident services uploaded for the requesting user's organization.
+ If the `include[users]` query parameter is provided, the included attribute
+ will contain the users related to these incident services.
+ operationId: ListIncidentServices
parameters:
- - $ref: '#/components/parameters/SensitiveDataScannerGroupID'
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SensitiveDataScannerGroupUpdateRequest'
- required: true
+ - $ref: '#/components/parameters/IncidentServiceIncludeQueryParameter'
+ - $ref: '#/components/parameters/PageSize'
+ - $ref: '#/components/parameters/PageOffset'
+ - $ref: '#/components/parameters/IncidentServiceSearchQueryParameter'
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerGroupUpdateResponse'
+ $ref: '#/components/schemas/IncidentServicesResponse'
description: OK
'400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - incident_read
+ summary: Get a list of all incident services
+ tags:
+ - Incident Services
+ x-unstable: '**Note**: This endpoint is in public beta.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ post:
+ description: Creates a new incident service.
+ operationId: CreateIncidentService
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/IncidentServiceCreateRequest'
+ description: Incident Service Payload.
+ required: true
+ responses:
+ '201':
content:
application/json:
schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
+ $ref: '#/components/schemas/IncidentServiceResponse'
+ description: CREATED
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
'403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - incident_settings_write
+ summary: Create a new incident service
+ tags:
+ - Incident Services
+ x-codegen-request-body-name: body
+ x-unstable: '**Note**: This endpoint is in public beta.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ /api/v2/services/definitions:
+ get:
+ description: Get a list of all service definitions from the Datadog Service
+ Catalog.
+ operationId: ListServiceDefinitions
+ responses:
+ '200':
content:
application/json:
schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Authentication Error
+ $ref: '#/components/schemas/ServiceDefinitionsListResponse'
+ description: OK
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Update Scanning Group
+ summary: Get all service definitions
tags:
- - Sensitive Data Scanner
- x-codegen-request-body-name: body
- /api/v2/sensitive-data-scanner/config/rules:
+ - Service Definition
post:
- description: 'Create a scanning rule in a sensitive data scanner group, ordered
- last.
-
- The posted rule MUST include a group relationship.
-
- It MUST include either a standard_pattern relationship or a regex attribute,
- but not both.
-
- If included_attributes is empty or missing, we will scan all attributes except
-
- excluded_attributes. If both are missing, we will scan the whole event.'
- operationId: CreateScanningRule
+ description: Create or update service definition in the Datadog Service Catalog.
+ operationId: CreateOrUpdateServiceDefinitions
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerRuleCreateRequest'
+ $ref: '#/components/schemas/ServiceDefinitionsCreateRequest'
+ description: Service Definition YAML/JSON.
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerCreateRuleResponse'
+ $ref: '#/components/schemas/ServiceDefinitionCreateResponse'
+ description: CREATED
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '409':
+ $ref: '#/components/responses/ConflictResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Create or update service definition
+ tags:
+ - Service Definition
+ x-codegen-request-body-name: body
+ /api/v2/services/definitions/{service_name}:
+ delete:
+ description: Delete a single service definition in the Datadog Service Catalog.
+ operationId: DeleteServiceDefinition
+ parameters:
+ - $ref: '#/components/parameters/ServiceName'
+ responses:
+ '204':
description: OK
'400':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
+ $ref: '#/components/responses/BadRequestResponse'
'403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Delete a single service definition
+ tags:
+ - Service Definition
+ get:
+ description: Get a single service definition from the Datadog Service Catalog.
+ operationId: GetServiceDefinition
+ parameters:
+ - $ref: '#/components/parameters/ServiceName'
+ responses:
+ '200':
content:
application/json:
schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Authentication Error
+ $ref: '#/components/schemas/ServiceDefinitionGetResponse'
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '409':
+ $ref: '#/components/responses/ConflictResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Create Scanning Rule
+ summary: Get a single service definition
tags:
- - Sensitive Data Scanner
- x-codegen-request-body-name: body
- /api/v2/sensitive-data-scanner/config/rules/{rule_id}:
+ - Service Definition
+ /api/v2/services/{service_id}:
delete:
- description: Delete a given rule.
- operationId: DeleteScanningRule
+ description: Deletes an existing incident service.
+ operationId: DeleteIncidentService
+ parameters:
+ - $ref: '#/components/parameters/IncidentServiceIDPathParameter'
+ responses:
+ '204':
+ description: OK
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
+ '403':
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - incident_settings_write
+ summary: Delete an existing incident service
+ tags:
+ - Incident Services
+ x-unstable: '**Note**: This endpoint is in public beta.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ get:
+ description: 'Get details of an incident service. If the `include[users]` query
+ parameter is provided,
+
+ the included attribute will contain the users related to these incident services.'
+ operationId: GetIncidentService
parameters:
- - $ref: '#/components/parameters/SensitiveDataScannerRuleID'
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/SensitiveDataScannerRuleDeleteRequest'
- required: true
+ - $ref: '#/components/parameters/IncidentServiceIDPathParameter'
+ - $ref: '#/components/parameters/IncidentServiceIncludeQueryParameter'
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerRuleDeleteResponse'
+ $ref: '#/components/schemas/IncidentServiceResponse'
description: OK
'400':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
'403':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Authentication Error
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Delete Scanning Rule
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - incident_read
+ summary: Get details of an incident service
tags:
- - Sensitive Data Scanner
- x-codegen-request-body-name: body
- patch:
- description: 'Update a scanning rule.
-
- The request body MUST NOT include a standard_pattern relationship, as that
- relationship
-
- is non-editable. Trying to edit the regex attribute of a rule with a standard_pattern
+ - Incident Services
+ x-unstable: '**Note**: This endpoint is in public beta.
- relationship will also result in an error.'
- operationId: UpdateScanningRule
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ patch:
+ description: Updates an existing incident service. Only provide the attributes
+ which should be updated as this request is a partial update.
+ operationId: UpdateIncidentService
parameters:
- - $ref: '#/components/parameters/SensitiveDataScannerRuleID'
+ - $ref: '#/components/parameters/IncidentServiceIDPathParameter'
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerRuleUpdateRequest'
+ $ref: '#/components/schemas/IncidentServiceUpdateRequest'
+ description: Incident Service Payload.
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerRuleUpdateResponse'
+ $ref: '#/components/schemas/IncidentServiceResponse'
description: OK
'400':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
+ $ref: '#/components/responses/BadRequestResponse'
+ '401':
+ $ref: '#/components/responses/UnauthorizedResponse'
'403':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Authentication Error
+ $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Update Scanning Rule
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - incident_settings_write
+ summary: Update an existing incident service
tags:
- - Sensitive Data Scanner
+ - Incident Services
x-codegen-request-body-name: body
- /api/v2/sensitive-data-scanner/config/standard-patterns:
+ x-unstable: '**Note**: This endpoint is in public beta.
+
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ /api/v2/synthetics/settings/on_demand_concurrency_cap:
get:
- description: Returns all standard patterns.
- operationId: ListStandardPatterns
+ description: Get the on-demand concurrency cap.
+ operationId: GetOnDemandConcurrencyCap
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/SensitiveDataScannerStandardPatternsResponseData'
+ $ref: '#/components/schemas/OnDemandConcurrencyCapResponse'
description: OK
- '400':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
- '403':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Authentication Error
- '429':
- $ref: '#/components/responses/TooManyRequestsResponse'
- summary: List standard patterns
- tags:
- - Sensitive Data Scanner
- /api/v2/series:
- post:
- description: "The metrics end-point allows you to post time-series data that
- can be graphed on Datadog\u2019s dashboards.\nThe maximum payload size is
- 500 kilobytes (512000 bytes). Compressed payloads must have a decompressed
- size of less than 5 megabytes (5242880 bytes).\n\nIf you\u2019re submitting
- metrics directly to the Datadog API without using DogStatsD, expect:\n\n-
- 64 bits for the timestamp\n- 64 bits for the value\n- 20 bytes for the metric
- names\n- 50 bytes for the timeseries\n- The full payload is approximately
- 100 bytes.\n\nHost name is one of the resources in the Resources field."
- operationId: SubmitMetrics
- parameters:
- - description: HTTP header used to compress the media-type.
- in: header
- name: Content-Encoding
- required: false
- schema:
- $ref: '#/components/schemas/MetricContentEncoding'
- requestBody:
- content:
- application/json:
- examples:
- dynamic-points:
- description: "Post time-series data that can be graphed on Datadog\u2019s
- dashboards."
- externalValue: examples/metrics/dynamic-points.json.sh
- summary: Dynamic Points
- x-variables:
- NOW: $(date +%s)
- schema:
- $ref: '#/components/schemas/MetricPayload'
- required: true
- responses:
- '202':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/IntakePayloadAccepted'
- description: Payload accepted
- '400':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
- '403':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Authentication error
- '408':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Request timeout
- '413':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Payload too large
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- security:
- - apiKeyAuth: []
- summary: Submit metrics
+ summary: Get the on-demand concurrency cap
tags:
- - Metrics
- x-codegen-request-body-name: body
- /api/v2/service_accounts:
+ - Synthetics
post:
- description: Create a service account for your organization.
- operationId: CreateServiceAccount
+ description: Save new value for on-demand concurrency cap.
+ operationId: SetOnDemandConcurrencyCap
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/ServiceAccountCreateRequest'
+ $ref: '#/components/schemas/OnDemandConcurrencyCapAttributes'
+ description: .
required: true
responses:
- '201':
+ '200':
content:
application/json:
schema:
- $ref: '#/components/schemas/UserResponse'
+ $ref: '#/components/schemas/OnDemandConcurrencyCapResponse'
description: OK
- '400':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
- '403':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Authentication error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Create a service account
+ summary: Save new value for on-demand concurrency cap
tags:
- - Service Accounts
+ - Synthetics
x-codegen-request-body-name: body
- /api/v2/service_accounts/{service_account_id}/application_keys:
+ /api/v2/team:
get:
- description: List all application keys available for this service account.
- operationId: ListServiceAccountApplicationKeys
+ description: 'Get all teams.
+
+ Can be used to search for teams using the `filter[keyword]` and `filter[me]`
+ query parameters.'
+ operationId: GetAllTeams
parameters:
- - $ref: '#/components/parameters/ServiceAccountID'
- - $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PageNumber'
- - $ref: '#/components/parameters/ApplicationKeysSortParameter'
- - $ref: '#/components/parameters/ApplicationKeyFilterParameter'
- - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
- - $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
- responses:
- '200':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ListApplicationKeysResponse'
- description: OK
- '400':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
- '403':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Forbidden
- '404':
+ - $ref: '#/components/parameters/PageSize'
+ - description: Specifies the order of the returned teams
+ in: query
+ name: sort
+ schema:
+ $ref: '#/components/schemas/GetAllTeamsSort'
+ - description: 'Included related resources optionally requested. Allowed enum
+ values: `team_links, user_team_permissions`'
+ in: query
+ name: include
+ schema:
+ items:
+ $ref: '#/components/schemas/GetAllTeamsInclude'
+ type: array
+ - description: Search query. Can be team name, team handle, or email of team
+ member
+ in: query
+ name: filter[keyword]
+ schema:
+ type: string
+ - description: When true, only returns teams the current user belongs to
+ in: query
+ name: filter[me]
+ schema:
+ type: boolean
+ responses:
+ '200':
content:
application/json:
schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Not Found
+ $ref: '#/components/schemas/TeamsResponse'
+ description: OK
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: List application keys for this service account
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - teams_read
+ summary: Get all teams
tags:
- - Service Accounts
+ - Teams
post:
- description: Create an application key for this service account.
- operationId: CreateServiceAccountApplicationKey
- parameters:
- - $ref: '#/components/parameters/ServiceAccountID'
+ description: 'Create a new team.
+
+ User IDs passed through the `users` relationship field are added to the team.'
+ operationId: CreateTeam
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/ApplicationKeyCreateRequest'
+ $ref: '#/components/schemas/TeamCreateRequest'
required: true
responses:
'201':
content:
application/json:
schema:
- $ref: '#/components/schemas/ApplicationKeyResponse'
- description: Created
- '400':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
- '403':
+ $ref: '#/components/schemas/TeamResponse'
+ description: CREATED
+ '409':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Forbidden
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Create an application key for this service account
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - teams_read
+ summary: Create a team
tags:
- - Service Accounts
+ - Teams
x-codegen-request-body-name: body
- /api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id}:
+ /api/v2/team/{team_id}:
delete:
- description: Delete an application key owned by this service account.
- operationId: DeleteServiceAccountApplicationKey
+ description: Remove a team using the team's `id`.
+ operationId: RemoveTeam
parameters:
- - $ref: '#/components/parameters/ServiceAccountID'
- - $ref: '#/components/parameters/ApplicationKeyID'
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
responses:
'204':
description: No Content
- '403':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Not Found
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Delete an application key for this service account
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - teams_read
+ summary: Remove a team
tags:
- - Service Accounts
+ - Teams
get:
- description: Get an application key owned by this service account.
- operationId: GetServiceAccountApplicationKey
+ description: Get a single team using the team's `id`.
+ operationId: GetTeam
parameters:
- - $ref: '#/components/parameters/ServiceAccountID'
- - $ref: '#/components/parameters/ApplicationKeyID'
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/PartialApplicationKeyResponse'
+ $ref: '#/components/schemas/TeamResponse'
description: OK
- '403':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/APIErrorResponse'
- description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Not Found
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Get one application key for this service account
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - teams_read
+ summary: Get a team
tags:
- - Service Accounts
+ - Teams
patch:
- description: Edit an application key owned by this service account.
- operationId: UpdateServiceAccountApplicationKey
+ description: 'Update a team using the team''s `id`.
+
+ If the `team_links` relationship is present, the associated links are updated
+ to be in the order they appear in the array, and any existing team links not
+ present are removed.'
+ operationId: UpdateTeam
parameters:
- - $ref: '#/components/parameters/ServiceAccountID'
- - $ref: '#/components/parameters/ApplicationKeyID'
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/ApplicationKeyUpdateRequest'
+ $ref: '#/components/schemas/TeamUpdateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/PartialApplicationKeyResponse'
+ $ref: '#/components/schemas/TeamResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Bad Request
- '403':
+ description: API error response.
+ '404':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Forbidden
- '404':
+ description: API error response.
+ '409':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
- description: Not Found
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Edit an application key for this service account
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - teams_read
+ summary: Update a team
tags:
- - Service Accounts
+ - Teams
x-codegen-request-body-name: body
- /api/v2/services:
+ /api/v2/team/{team_id}/links:
get:
- description: Get all incident services uploaded for the requesting user's organization.
- If the `include[users]` query parameter is provided, the included attribute
- will contain the users related to these incident services.
- operationId: ListIncidentServices
+ description: Get all links for a given team.
+ operationId: GetTeamLinks
parameters:
- - $ref: '#/components/parameters/IncidentServiceIncludeQueryParameter'
- - $ref: '#/components/parameters/PageSize'
- - $ref: '#/components/parameters/PageOffset'
- - $ref: '#/components/parameters/IncidentServiceSearchQueryParameter'
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/IncidentServicesResponse'
+ $ref: '#/components/schemas/TeamLinksResponse'
description: OK
- '400':
- $ref: '#/components/responses/BadRequestResponse'
- '401':
- $ref: '#/components/responses/UnauthorizedResponse'
- '403':
- $ref: '#/components/responses/ForbiddenResponse'
'404':
- $ref: '#/components/responses/NotFoundResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- - incident_read
- summary: Get a list of all incident services
+ - teams_read
+ summary: Get links for a team
tags:
- - Incident Services
- x-unstable: '**Note**: This endpoint is in public beta.
-
- If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ - Teams
post:
- description: Creates a new incident service.
- operationId: CreateIncidentService
+ description: Add a new link to a team.
+ operationId: CreateTeamLink
+ parameters:
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/IncidentServiceCreateRequest'
- description: Incident Service Payload.
+ $ref: '#/components/schemas/TeamLinkCreateRequest'
required: true
responses:
- '201':
+ '200':
content:
application/json:
schema:
- $ref: '#/components/schemas/IncidentServiceResponse'
- description: CREATED
- '400':
- $ref: '#/components/responses/BadRequestResponse'
- '401':
- $ref: '#/components/responses/UnauthorizedResponse'
- '403':
- $ref: '#/components/responses/ForbiddenResponse'
+ $ref: '#/components/schemas/TeamLinkResponse'
+ description: OK
'404':
- $ref: '#/components/responses/NotFoundResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
+ '422':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- - incident_settings_write
- summary: Create a new incident service
+ - teams_read
+ summary: Create a team link
tags:
- - Incident Services
+ - Teams
x-codegen-request-body-name: body
- x-unstable: '**Note**: This endpoint is in public beta.
-
- If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
- /api/v2/services/definitions:
+ /api/v2/team/{team_id}/links/{link_id}:
+ delete:
+ description: Remove a link from a team.
+ operationId: RemoveTeamLink
+ parameters:
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
+ - description: None
+ in: path
+ name: link_id
+ required: true
+ schema:
+ type: string
+ responses:
+ '204':
+ description: No Content
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - teams_read
+ summary: Remove a team link
+ tags:
+ - Teams
get:
- description: Get a list of all service definitions from the Datadog Service
- Catalog.
- operationId: ListServiceDefinitions
+ description: Get a single link for a team.
+ operationId: GetTeamLink
+ parameters:
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
+ - description: None
+ in: path
+ name: link_id
+ required: true
+ schema:
+ type: string
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/ServiceDefinitionsListResponse'
+ $ref: '#/components/schemas/TeamLinkResponse'
description: OK
- '403':
- $ref: '#/components/responses/ForbiddenResponse'
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Get all service definitions
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - teams_read
+ summary: Get a team link
tags:
- - Service Definition
- post:
- description: Create or update service definition in the Datadog Service Catalog.
- operationId: CreateOrUpdateServiceDefinitions
+ - Teams
+ patch:
+ description: Update a team link.
+ operationId: UpdateTeamLink
+ parameters:
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
+ - description: None
+ in: path
+ name: link_id
+ required: true
+ schema:
+ type: string
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/ServiceDefinitionsCreateRequest'
- description: Service Definition YAML/JSON.
+ $ref: '#/components/schemas/TeamLinkCreateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/ServiceDefinitionCreateResponse'
- description: CREATED
- '400':
- $ref: '#/components/responses/BadRequestResponse'
- '403':
- $ref: '#/components/responses/ForbiddenResponse'
- '409':
- $ref: '#/components/responses/ConflictResponse'
- '429':
- $ref: '#/components/responses/TooManyRequestsResponse'
- summary: Create or update service definition
- tags:
- - Service Definition
- x-codegen-request-body-name: body
- /api/v2/services/definitions/{service_name}:
- delete:
- description: Delete a single service definition in the Datadog Service Catalog.
- operationId: DeleteServiceDefinition
- parameters:
- - $ref: '#/components/parameters/ServiceName'
- responses:
- '204':
+ $ref: '#/components/schemas/TeamLinkResponse'
description: OK
- '400':
- $ref: '#/components/responses/BadRequestResponse'
- '403':
- $ref: '#/components/responses/ForbiddenResponse'
'404':
- $ref: '#/components/responses/NotFoundResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Delete a single service definition
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - teams_read
+ summary: Update a team link
tags:
- - Service Definition
+ - Teams
+ x-codegen-request-body-name: body
+ /api/v2/team/{team_id}/memberships:
get:
- description: Get a single service definition from the Datadog Service Catalog.
- operationId: GetServiceDefinition
+ description: Get a paginated list of members for a team
+ operationId: GetTeamMemberships
parameters:
- - $ref: '#/components/parameters/ServiceName'
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
+ - $ref: '#/components/parameters/PageSize'
+ - $ref: '#/components/parameters/PageNumber'
+ - description: Specifies the order of returned team memberships
+ in: query
+ name: sort
+ schema:
+ $ref: '#/components/schemas/GetTeamMembershipsSort'
+ - description: Search query, can be user email or name
+ in: query
+ name: filter[keyword]
+ schema:
+ type: string
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/ServiceDefinitionGetResponse'
- description: OK
- '400':
- $ref: '#/components/responses/BadRequestResponse'
- '403':
- $ref: '#/components/responses/ForbiddenResponse'
+ $ref: '#/components/schemas/UserTeamsResponse'
+ description: Represents a user's association to a team
'404':
- $ref: '#/components/responses/NotFoundResponse'
- '409':
- $ref: '#/components/responses/ConflictResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Get a single service definition
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - teams_read
+ summary: Get team memberships
tags:
- - Service Definition
- /api/v2/services/{service_id}:
- delete:
- description: Deletes an existing incident service.
- operationId: DeleteIncidentService
+ - Teams
+ post:
+ description: Add a user to a team.
+ operationId: CreateTeamMembership
parameters:
- - $ref: '#/components/parameters/IncidentServiceIDPathParameter'
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserTeamRequest'
+ required: true
responses:
- '204':
- description: OK
- '400':
- $ref: '#/components/responses/BadRequestResponse'
- '401':
- $ref: '#/components/responses/UnauthorizedResponse'
- '403':
- $ref: '#/components/responses/ForbiddenResponse'
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UserTeamResponse'
+ description: Represents a user's association to a team
'404':
- $ref: '#/components/responses/NotFoundResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
+ '409':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- - incident_settings_write
- summary: Delete an existing incident service
+ - teams_read
+ summary: Add a user to a team
tags:
- - Incident Services
- x-unstable: '**Note**: This endpoint is in public beta.
-
- If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
- get:
- description: 'Get details of an incident service. If the `include[users]` query
- parameter is provided,
-
- the included attribute will contain the users related to these incident services.'
- operationId: GetIncidentService
+ - Teams
+ x-codegen-request-body-name: body
+ /api/v2/team/{team_id}/memberships/{user_id}:
+ delete:
+ description: Remove a user from a team.
+ operationId: RemoveTeamMembership
parameters:
- - $ref: '#/components/parameters/IncidentServiceIDPathParameter'
- - $ref: '#/components/parameters/IncidentServiceIncludeQueryParameter'
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
+ - description: None
+ in: path
+ name: user_id
+ required: true
+ schema:
+ type: string
responses:
- '200':
+ '204':
+ description: No Content
+ '404':
content:
application/json:
schema:
- $ref: '#/components/schemas/IncidentServiceResponse'
- description: OK
- '400':
- $ref: '#/components/responses/BadRequestResponse'
- '401':
- $ref: '#/components/responses/UnauthorizedResponse'
- '403':
- $ref: '#/components/responses/ForbiddenResponse'
- '404':
- $ref: '#/components/responses/NotFoundResponse'
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- - incident_read
- summary: Get details of an incident service
+ - teams_read
+ summary: Remove a user from a team
tags:
- - Incident Services
- x-unstable: '**Note**: This endpoint is in public beta.
-
- If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
+ - Teams
patch:
- description: Updates an existing incident service. Only provide the attributes
- which should be updated as this request is a partial update.
- operationId: UpdateIncidentService
+ description: Update a user's membership attributes on a team.
+ operationId: UpdateTeamMembership
parameters:
- - $ref: '#/components/parameters/IncidentServiceIDPathParameter'
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
+ - description: None
+ in: path
+ name: user_id
+ required: true
+ schema:
+ type: string
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/IncidentServiceUpdateRequest'
- description: Incident Service Payload.
+ $ref: '#/components/schemas/UserTeamUpdateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/IncidentServiceResponse'
- description: OK
- '400':
- $ref: '#/components/responses/BadRequestResponse'
- '401':
- $ref: '#/components/responses/UnauthorizedResponse'
- '403':
- $ref: '#/components/responses/ForbiddenResponse'
+ $ref: '#/components/schemas/UserTeamResponse'
+ description: Represents a user's association to a team
'404':
- $ref: '#/components/responses/NotFoundResponse'
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- - incident_settings_write
- summary: Update an existing incident service
+ - teams_read
+ summary: Update a user's membership attributes on a team
tags:
- - Incident Services
+ - Teams
x-codegen-request-body-name: body
- x-unstable: '**Note**: This endpoint is in public beta.
-
- If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
- /api/v2/synthetics/settings/on_demand_concurrency_cap:
+ /api/v2/team/{team_id}/permission-settings:
get:
- description: Get the on-demand concurrency cap.
- operationId: GetOnDemandConcurrencyCap
+ description: Get all permission settings for a given team.
+ operationId: GetTeamPermissionSettings
+ parameters:
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/OnDemandConcurrencyCapResponse'
+ $ref: '#/components/schemas/TeamPermissionSettingsResponse'
description: OK
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Get the on-demand concurrency cap
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - teams_read
+ summary: Get permission settings for a team
tags:
- - Synthetics
- post:
- description: Save new value for on-demand concurrency cap.
- operationId: SetOnDemandConcurrencyCap
+ - Teams
+ /api/v2/team/{team_id}/permission-settings/{action}:
+ put:
+ description: Update a team permission setting for a given team.
+ operationId: UpdateTeamPermissionSetting
+ parameters:
+ - description: None
+ in: path
+ name: team_id
+ required: true
+ schema:
+ type: string
+ - description: None
+ in: path
+ name: action
+ required: true
+ schema:
+ type: string
requestBody:
content:
application/json:
schema:
- $ref: '#/components/schemas/OnDemandConcurrencyCapAttributes'
- description: .
+ $ref: '#/components/schemas/TeamPermissionSettingUpdateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
- $ref: '#/components/schemas/OnDemandConcurrencyCapResponse'
+ $ref: '#/components/schemas/TeamPermissionSettingResponse'
description: OK
+ '404':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/APIErrorResponse'
+ description: API error response.
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
- summary: Save new value for on-demand concurrency cap
+ security:
+ - apiKeyAuth: []
+ appKeyAuth: []
+ - AuthZ:
+ - teams_read
+ summary: Update permission setting for team
tags:
- - Synthetics
+ - Teams
x-codegen-request-body-name: body
/api/v2/teams:
get:
@@ -22203,6 +23543,8 @@ tags:
use Datadog\u2019s API to\nmanage both test types programmatically.\n\nFor more
information about Synthetics, see the [Synthetics overview](https://docs.datadoghq.com/synthetics/)."
name: Synthetics
+- description: View and manage teams within Datadog.
+ name: Teams
- description: 'The usage metering API allows you to get hourly, daily, and
monthly usage across multiple facets of Datadog.
diff --git a/examples/v2/teams/CreateTeam.java b/examples/v2/teams/CreateTeam.java
new file mode 100644
index 00000000000..52b10d09a3a
--- /dev/null
+++ b/examples/v2/teams/CreateTeam.java
@@ -0,0 +1,38 @@
+// Create a team returns "CREATED" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.RelationshipToUsers;
+import com.datadog.api.client.v2.model.TeamCreate;
+import com.datadog.api.client.v2.model.TeamCreateAttributes;
+import com.datadog.api.client.v2.model.TeamCreateRelationships;
+import com.datadog.api.client.v2.model.TeamCreateRequest;
+import com.datadog.api.client.v2.model.TeamResponse;
+import com.datadog.api.client.v2.model.TeamType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ TeamCreateRequest body =
+ new TeamCreateRequest()
+ .data(
+ new TeamCreate()
+ .attributes(new TeamCreateAttributes().handle("1636629071").name("1636629071"))
+ .relationships(new TeamCreateRelationships().users(new RelationshipToUsers()))
+ .type(TeamType.TEAM));
+
+ try {
+ TeamResponse result = apiInstance.createTeam(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#createTeam");
+ 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/teams/CreateTeamLink.java b/examples/v2/teams/CreateTeamLink.java
new file mode 100644
index 00000000000..ac7bf64408d
--- /dev/null
+++ b/examples/v2/teams/CreateTeamLink.java
@@ -0,0 +1,42 @@
+// Create a team link returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.TeamLinkAttributes;
+import com.datadog.api.client.v2.model.TeamLinkCreate;
+import com.datadog.api.client.v2.model.TeamLinkCreateRequest;
+import com.datadog.api.client.v2.model.TeamLinkResponse;
+import com.datadog.api.client.v2.model.TeamLinkType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ TeamLinkCreateRequest body =
+ new TeamLinkCreateRequest()
+ .data(
+ new TeamLinkCreate()
+ .attributes(
+ new TeamLinkAttributes()
+ .label("Link label")
+ .url("https://example.com")
+ .position(0))
+ .type(TeamLinkType.TEAM_LINKS));
+
+ try {
+ TeamLinkResponse result = apiInstance.createTeamLink(DD_TEAM_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#createTeamLink");
+ 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/teams/CreateTeamMembership.java b/examples/v2/teams/CreateTeamMembership.java
new file mode 100644
index 00000000000..21d1673a4c8
--- /dev/null
+++ b/examples/v2/teams/CreateTeamMembership.java
@@ -0,0 +1,48 @@
+// Add a user to a team returns "Represents a user's association to a team" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.RelationshipToUserTeamUser;
+import com.datadog.api.client.v2.model.RelationshipToUserTeamUserData;
+import com.datadog.api.client.v2.model.UserTeamAttributes;
+import com.datadog.api.client.v2.model.UserTeamCreate;
+import com.datadog.api.client.v2.model.UserTeamRelationships;
+import com.datadog.api.client.v2.model.UserTeamRequest;
+import com.datadog.api.client.v2.model.UserTeamResponse;
+import com.datadog.api.client.v2.model.UserTeamRole;
+import com.datadog.api.client.v2.model.UserTeamType;
+import com.datadog.api.client.v2.model.UserTeamUserType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ UserTeamRequest body =
+ new UserTeamRequest()
+ .data(
+ new UserTeamCreate()
+ .attributes(new UserTeamAttributes().role(UserTeamRole.ADMIN))
+ .relationships(
+ new UserTeamRelationships()
+ .user(
+ new RelationshipToUserTeamUser()
+ .data(
+ new RelationshipToUserTeamUserData()
+ .id("b8626d7e-cedd-11eb-abf5-da7ad0900001")
+ .type(UserTeamUserType.USERS))))
+ .type(UserTeamType.TEAM_MEMBERSHIPS));
+
+ try {
+ UserTeamResponse result = apiInstance.createTeamMembership("team_id", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#createTeamMembership");
+ 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/teams/GetAllTeams.java b/examples/v2/teams/GetAllTeams.java
new file mode 100644
index 00000000000..86623e3179f
--- /dev/null
+++ b/examples/v2/teams/GetAllTeams.java
@@ -0,0 +1,24 @@
+// Get all teams returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.TeamsResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ try {
+ TeamsResponse result = apiInstance.getAllTeams();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#getAllTeams");
+ 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/teams/GetTeam.java b/examples/v2/teams/GetTeam.java
new file mode 100644
index 00000000000..ced9f873cd7
--- /dev/null
+++ b/examples/v2/teams/GetTeam.java
@@ -0,0 +1,27 @@
+// Get a team returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.TeamResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ try {
+ TeamResponse result = apiInstance.getTeam(DD_TEAM_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#getTeam");
+ 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/teams/GetTeamLink.java b/examples/v2/teams/GetTeamLink.java
new file mode 100644
index 00000000000..4221a4d49c7
--- /dev/null
+++ b/examples/v2/teams/GetTeamLink.java
@@ -0,0 +1,30 @@
+// Get a team link returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.TeamLinkResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ // there is a valid "team_link" in the system
+ String TEAM_LINK_DATA_ID = System.getenv("TEAM_LINK_DATA_ID");
+
+ try {
+ TeamLinkResponse result = apiInstance.getTeamLink(DD_TEAM_DATA_ID, TEAM_LINK_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#getTeamLink");
+ 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/teams/GetTeamLinks.java b/examples/v2/teams/GetTeamLinks.java
new file mode 100644
index 00000000000..9694ad8125c
--- /dev/null
+++ b/examples/v2/teams/GetTeamLinks.java
@@ -0,0 +1,27 @@
+// Get links for a team returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.TeamLinksResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ try {
+ TeamLinksResponse result = apiInstance.getTeamLinks(DD_TEAM_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#getTeamLinks");
+ 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/teams/GetTeamMemberships.java b/examples/v2/teams/GetTeamMemberships.java
new file mode 100644
index 00000000000..80bd60c2634
--- /dev/null
+++ b/examples/v2/teams/GetTeamMemberships.java
@@ -0,0 +1,27 @@
+// Get team memberships returns "Represents a user's association to a team" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.UserTeamsResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ try {
+ UserTeamsResponse result = apiInstance.getTeamMemberships(DD_TEAM_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#getTeamMemberships");
+ 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/teams/GetTeamPermissionSettings.java b/examples/v2/teams/GetTeamPermissionSettings.java
new file mode 100644
index 00000000000..c412e839874
--- /dev/null
+++ b/examples/v2/teams/GetTeamPermissionSettings.java
@@ -0,0 +1,28 @@
+// Get permission settings for a team returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.TeamPermissionSettingsResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ try {
+ TeamPermissionSettingsResponse result =
+ apiInstance.getTeamPermissionSettings(DD_TEAM_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#getTeamPermissionSettings");
+ 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/teams/RemoveTeam.java b/examples/v2/teams/RemoveTeam.java
new file mode 100644
index 00000000000..6cf12af79fc
--- /dev/null
+++ b/examples/v2/teams/RemoveTeam.java
@@ -0,0 +1,25 @@
+// Remove a team returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ try {
+ apiInstance.removeTeam(DD_TEAM_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#removeTeam");
+ 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/teams/RemoveTeamLink.java b/examples/v2/teams/RemoveTeamLink.java
new file mode 100644
index 00000000000..4301792f33f
--- /dev/null
+++ b/examples/v2/teams/RemoveTeamLink.java
@@ -0,0 +1,28 @@
+// Remove a team link returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ // there is a valid "team_link" in the system
+ String TEAM_LINK_DATA_ID = System.getenv("TEAM_LINK_DATA_ID");
+
+ try {
+ apiInstance.removeTeamLink(DD_TEAM_DATA_ID, TEAM_LINK_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#removeTeamLink");
+ 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/teams/RemoveTeamMembership.java b/examples/v2/teams/RemoveTeamMembership.java
new file mode 100644
index 00000000000..69147744c54
--- /dev/null
+++ b/examples/v2/teams/RemoveTeamMembership.java
@@ -0,0 +1,25 @@
+// Remove a user from a team returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ try {
+ apiInstance.removeTeamMembership(DD_TEAM_DATA_ID, "user_id");
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#removeTeamMembership");
+ 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/teams/UpdateTeam.java b/examples/v2/teams/UpdateTeam.java
new file mode 100644
index 00000000000..72da2dc60da
--- /dev/null
+++ b/examples/v2/teams/UpdateTeam.java
@@ -0,0 +1,43 @@
+// Update a team returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.TeamResponse;
+import com.datadog.api.client.v2.model.TeamType;
+import com.datadog.api.client.v2.model.TeamUpdate;
+import com.datadog.api.client.v2.model.TeamUpdateAttributes;
+import com.datadog.api.client.v2.model.TeamUpdateRequest;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ATTRIBUTES_HANDLE = System.getenv("DD_TEAM_DATA_ATTRIBUTES_HANDLE");
+ String DD_TEAM_DATA_ATTRIBUTES_NAME = System.getenv("DD_TEAM_DATA_ATTRIBUTES_NAME");
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ TeamUpdateRequest body =
+ new TeamUpdateRequest()
+ .data(
+ new TeamUpdate()
+ .attributes(
+ new TeamUpdateAttributes()
+ .handle(DD_TEAM_DATA_ATTRIBUTES_HANDLE)
+ .name("Example Team updated"))
+ .type(TeamType.TEAM));
+
+ try {
+ TeamResponse result = apiInstance.updateTeam(DD_TEAM_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#updateTeam");
+ 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/teams/UpdateTeamLink.java b/examples/v2/teams/UpdateTeamLink.java
new file mode 100644
index 00000000000..9ef39c60e36
--- /dev/null
+++ b/examples/v2/teams/UpdateTeamLink.java
@@ -0,0 +1,43 @@
+// Update a team link returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.TeamLinkAttributes;
+import com.datadog.api.client.v2.model.TeamLinkCreate;
+import com.datadog.api.client.v2.model.TeamLinkCreateRequest;
+import com.datadog.api.client.v2.model.TeamLinkResponse;
+import com.datadog.api.client.v2.model.TeamLinkType;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ // there is a valid "team_link" in the system
+ String TEAM_LINK_DATA_ID = System.getenv("TEAM_LINK_DATA_ID");
+
+ TeamLinkCreateRequest body =
+ new TeamLinkCreateRequest()
+ .data(
+ new TeamLinkCreate()
+ .attributes(
+ new TeamLinkAttributes().label("New Label").url("https://example.com"))
+ .type(TeamLinkType.TEAM_LINKS));
+
+ try {
+ TeamLinkResponse result =
+ apiInstance.updateTeamLink(DD_TEAM_DATA_ID, TEAM_LINK_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#updateTeamLink");
+ 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/teams/UpdateTeamMembership.java b/examples/v2/teams/UpdateTeamMembership.java
new file mode 100644
index 00000000000..18ca37e802a
--- /dev/null
+++ b/examples/v2/teams/UpdateTeamMembership.java
@@ -0,0 +1,37 @@
+// Update a user's membership attributes on a team returns "Represents a user's association to a
+// team" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.UserTeamAttributes;
+import com.datadog.api.client.v2.model.UserTeamResponse;
+import com.datadog.api.client.v2.model.UserTeamRole;
+import com.datadog.api.client.v2.model.UserTeamType;
+import com.datadog.api.client.v2.model.UserTeamUpdate;
+import com.datadog.api.client.v2.model.UserTeamUpdateRequest;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ UserTeamUpdateRequest body =
+ new UserTeamUpdateRequest()
+ .data(
+ new UserTeamUpdate()
+ .attributes(new UserTeamAttributes().role(UserTeamRole.ADMIN))
+ .type(UserTeamType.TEAM_MEMBERSHIPS));
+
+ try {
+ UserTeamResponse result = apiInstance.updateTeamMembership("team_id", "user_id", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#updateTeamMembership");
+ 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/teams/UpdateTeamPermissionSetting.java b/examples/v2/teams/UpdateTeamPermissionSetting.java
new file mode 100644
index 00000000000..8885fc23f11
--- /dev/null
+++ b/examples/v2/teams/UpdateTeamPermissionSetting.java
@@ -0,0 +1,42 @@
+// Update permission setting for team returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.TeamsApi;
+import com.datadog.api.client.v2.model.TeamPermissionSettingResponse;
+import com.datadog.api.client.v2.model.TeamPermissionSettingType;
+import com.datadog.api.client.v2.model.TeamPermissionSettingUpdate;
+import com.datadog.api.client.v2.model.TeamPermissionSettingUpdateAttributes;
+import com.datadog.api.client.v2.model.TeamPermissionSettingUpdateRequest;
+import com.datadog.api.client.v2.model.TeamPermissionSettingValue;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ TeamsApi apiInstance = new TeamsApi(defaultClient);
+
+ // there is a valid "dd_team" in the system
+ String DD_TEAM_DATA_ID = System.getenv("DD_TEAM_DATA_ID");
+
+ TeamPermissionSettingUpdateRequest body =
+ new TeamPermissionSettingUpdateRequest()
+ .data(
+ new TeamPermissionSettingUpdate()
+ .attributes(
+ new TeamPermissionSettingUpdateAttributes()
+ .value(TeamPermissionSettingValue.ADMINS))
+ .type(TeamPermissionSettingType.TEAM_PERMISSION_SETTINGS));
+
+ try {
+ TeamPermissionSettingResponse result =
+ apiInstance.updateTeamPermissionSetting(DD_TEAM_DATA_ID, "manage_membership", body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling TeamsApi#updateTeamPermissionSetting");
+ 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/TeamsApi.java b/src/main/java/com/datadog/api/client/v2/api/TeamsApi.java
new file mode 100644
index 00000000000..4a1afc80099
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/TeamsApi.java
@@ -0,0 +1,2682 @@
+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.GetAllTeamsInclude;
+import com.datadog.api.client.v2.model.GetAllTeamsSort;
+import com.datadog.api.client.v2.model.GetTeamMembershipsSort;
+import com.datadog.api.client.v2.model.TeamCreateRequest;
+import com.datadog.api.client.v2.model.TeamLinkCreateRequest;
+import com.datadog.api.client.v2.model.TeamLinkResponse;
+import com.datadog.api.client.v2.model.TeamLinksResponse;
+import com.datadog.api.client.v2.model.TeamPermissionSettingResponse;
+import com.datadog.api.client.v2.model.TeamPermissionSettingUpdateRequest;
+import com.datadog.api.client.v2.model.TeamPermissionSettingsResponse;
+import com.datadog.api.client.v2.model.TeamResponse;
+import com.datadog.api.client.v2.model.TeamUpdateRequest;
+import com.datadog.api.client.v2.model.TeamsResponse;
+import com.datadog.api.client.v2.model.UserTeamRequest;
+import com.datadog.api.client.v2.model.UserTeamResponse;
+import com.datadog.api.client.v2.model.UserTeamUpdateRequest;
+import com.datadog.api.client.v2.model.UserTeamsResponse;
+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 TeamsApi {
+ private ApiClient apiClient;
+
+ public TeamsApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public TeamsApi(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;
+ }
+
+ /**
+ * Create a team.
+ *
+ *
See {@link #createTeamWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return TeamResponse
+ * @throws ApiException if fails to make API call
+ */
+ public TeamResponse createTeam(TeamCreateRequest body) throws ApiException {
+ return createTeamWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create a team.
+ *
+ *
See {@link #createTeamWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<TeamResponse>
+ */
+ public CompletableFuture createTeamAsync(TeamCreateRequest body) {
+ return createTeamWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a new team. User IDs passed through the users relationship field are added
+ * to the team.
+ *
+ * @param body (required)
+ * @return ApiResponse<TeamResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 201 | CREATED | - |
+ * | 409 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createTeamWithHttpInfo(TeamCreateRequest 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 createTeam");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/team";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.createTeam",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a team.
+ *
+ * See {@link #createTeamWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<TeamResponse>>
+ */
+ public CompletableFuture> createTeamWithHttpInfoAsync(
+ TeamCreateRequest 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 createTeam"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/team";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.createTeam",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "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 a team link.
+ *
+ * See {@link #createTeamLinkWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return TeamLinkResponse
+ * @throws ApiException if fails to make API call
+ */
+ public TeamLinkResponse createTeamLink(String teamId, TeamLinkCreateRequest body)
+ throws ApiException {
+ return createTeamLinkWithHttpInfo(teamId, body).getData();
+ }
+
+ /**
+ * Create a team link.
+ *
+ *
See {@link #createTeamLinkWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return CompletableFuture<TeamLinkResponse>
+ */
+ public CompletableFuture createTeamLinkAsync(
+ String teamId, TeamLinkCreateRequest body) {
+ return createTeamLinkWithHttpInfoAsync(teamId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Add a new link to a team.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return ApiResponse<TeamLinkResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 404 | API error response. | - |
+ * | 422 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createTeamLinkWithHttpInfo(
+ String teamId, TeamLinkCreateRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling createTeamLink");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createTeamLink");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/links"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.createTeamLink",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Create a team link.
+ *
+ * See {@link #createTeamLinkWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<TeamLinkResponse>>
+ */
+ public CompletableFuture> createTeamLinkWithHttpInfoAsync(
+ String teamId, TeamLinkCreateRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling createTeamLink"));
+ 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 createTeamLink"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/links"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.createTeamLink",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "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() {});
+ }
+
+ /**
+ * Add a user to a team.
+ *
+ * See {@link #createTeamMembershipWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return UserTeamResponse
+ * @throws ApiException if fails to make API call
+ */
+ public UserTeamResponse createTeamMembership(String teamId, UserTeamRequest body)
+ throws ApiException {
+ return createTeamMembershipWithHttpInfo(teamId, body).getData();
+ }
+
+ /**
+ * Add a user to a team.
+ *
+ *
See {@link #createTeamMembershipWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return CompletableFuture<UserTeamResponse>
+ */
+ public CompletableFuture createTeamMembershipAsync(
+ String teamId, UserTeamRequest body) {
+ return createTeamMembershipWithHttpInfoAsync(teamId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Add a user to a team.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return ApiResponse<UserTeamResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | Represents a user's association to a team | - |
+ * | 404 | API error response. | - |
+ * | 409 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createTeamMembershipWithHttpInfo(
+ String teamId, UserTeamRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling createTeamMembership");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createTeamMembership");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/memberships"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.createTeamMembership",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Add a user to a team.
+ *
+ * See {@link #createTeamMembershipWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<UserTeamResponse>>
+ */
+ public CompletableFuture> createTeamMembershipWithHttpInfoAsync(
+ String teamId, UserTeamRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling createTeamMembership"));
+ 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 createTeamMembership"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/memberships"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.createTeamMembership",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "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() {});
+ }
+
+ /** Manage optional parameters to getAllTeams. */
+ public static class GetAllTeamsOptionalParameters {
+ private Long pageNumber;
+ private Long pageSize;
+ private GetAllTeamsSort sort;
+ private List include;
+ private String filterKeyword;
+ private Boolean filterMe;
+
+ /**
+ * Set pageNumber.
+ *
+ * @param pageNumber Specific page number to return. (optional, default to 0)
+ * @return GetAllTeamsOptionalParameters
+ */
+ public GetAllTeamsOptionalParameters pageNumber(Long pageNumber) {
+ this.pageNumber = pageNumber;
+ return this;
+ }
+
+ /**
+ * Set pageSize.
+ *
+ * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default
+ * to 10)
+ * @return GetAllTeamsOptionalParameters
+ */
+ public GetAllTeamsOptionalParameters pageSize(Long pageSize) {
+ this.pageSize = pageSize;
+ return this;
+ }
+
+ /**
+ * Set sort.
+ *
+ * @param sort Specifies the order of the returned teams (optional)
+ * @return GetAllTeamsOptionalParameters
+ */
+ public GetAllTeamsOptionalParameters sort(GetAllTeamsSort sort) {
+ this.sort = sort;
+ return this;
+ }
+
+ /**
+ * Set include.
+ *
+ * @param include Included related resources optionally requested. Allowed enum values:
+ * team_links, user_team_permissions (optional)
+ * @return GetAllTeamsOptionalParameters
+ */
+ public GetAllTeamsOptionalParameters include(List include) {
+ this.include = include;
+ return this;
+ }
+
+ /**
+ * Set filterKeyword.
+ *
+ * @param filterKeyword Search query. Can be team name, team handle, or email of team member
+ * (optional)
+ * @return GetAllTeamsOptionalParameters
+ */
+ public GetAllTeamsOptionalParameters filterKeyword(String filterKeyword) {
+ this.filterKeyword = filterKeyword;
+ return this;
+ }
+
+ /**
+ * Set filterMe.
+ *
+ * @param filterMe When true, only returns teams the current user belongs to (optional)
+ * @return GetAllTeamsOptionalParameters
+ */
+ public GetAllTeamsOptionalParameters filterMe(Boolean filterMe) {
+ this.filterMe = filterMe;
+ return this;
+ }
+ }
+
+ /**
+ * Get all teams.
+ *
+ * See {@link #getAllTeamsWithHttpInfo}.
+ *
+ * @return TeamsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public TeamsResponse getAllTeams() throws ApiException {
+ return getAllTeamsWithHttpInfo(new GetAllTeamsOptionalParameters()).getData();
+ }
+
+ /**
+ * Get all teams.
+ *
+ *
See {@link #getAllTeamsWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<TeamsResponse>
+ */
+ public CompletableFuture getAllTeamsAsync() {
+ return getAllTeamsWithHttpInfoAsync(new GetAllTeamsOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get all teams.
+ *
+ * See {@link #getAllTeamsWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return TeamsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public TeamsResponse getAllTeams(GetAllTeamsOptionalParameters parameters) throws ApiException {
+ return getAllTeamsWithHttpInfo(parameters).getData();
+ }
+
+ /**
+ * Get all teams.
+ *
+ *
See {@link #getAllTeamsWithHttpInfoAsync}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<TeamsResponse>
+ */
+ public CompletableFuture getAllTeamsAsync(
+ GetAllTeamsOptionalParameters parameters) {
+ return getAllTeamsWithHttpInfoAsync(parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get all teams. Can be used to search for teams using the filter[keyword] and
+ * filter[me] query parameters.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<TeamsResponse>
+ * @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 getAllTeamsWithHttpInfo(
+ GetAllTeamsOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+ Long pageNumber = parameters.pageNumber;
+ Long pageSize = parameters.pageSize;
+ GetAllTeamsSort sort = parameters.sort;
+ List include = parameters.include;
+ String filterKeyword = parameters.filterKeyword;
+ Boolean filterMe = parameters.filterMe;
+ // create path and map variables
+ String localVarPath = "/api/v2/team";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "include", include));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[keyword]", filterKeyword));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[me]", filterMe));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getAllTeams",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get all teams.
+ *
+ * See {@link #getAllTeamsWithHttpInfo}.
+ *
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<TeamsResponse>>
+ */
+ public CompletableFuture> getAllTeamsWithHttpInfoAsync(
+ GetAllTeamsOptionalParameters parameters) {
+ Object localVarPostBody = null;
+ Long pageNumber = parameters.pageNumber;
+ Long pageSize = parameters.pageSize;
+ GetAllTeamsSort sort = parameters.sort;
+ List include = parameters.include;
+ String filterKeyword = parameters.filterKeyword;
+ Boolean filterMe = parameters.filterMe;
+ // create path and map variables
+ String localVarPath = "/api/v2/team";
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "include", include));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[keyword]", filterKeyword));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[me]", filterMe));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getAllTeams",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "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() {});
+ }
+
+ /**
+ * Get a team.
+ *
+ * See {@link #getTeamWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @return TeamResponse
+ * @throws ApiException if fails to make API call
+ */
+ public TeamResponse getTeam(String teamId) throws ApiException {
+ return getTeamWithHttpInfo(teamId).getData();
+ }
+
+ /**
+ * Get a team.
+ *
+ *
See {@link #getTeamWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @return CompletableFuture<TeamResponse>
+ */
+ public CompletableFuture getTeamAsync(String teamId) {
+ return getTeamWithHttpInfoAsync(teamId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a single team using the team's id.
+ *
+ * @param teamId None (required)
+ * @return ApiResponse<TeamResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 404 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getTeamWithHttpInfo(String teamId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ throw new ApiException(400, "Missing the required parameter 'teamId' when calling getTeam");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getTeam",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get a team.
+ *
+ * See {@link #getTeamWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @return CompletableFuture<ApiResponse<TeamResponse>>
+ */
+ public CompletableFuture> getTeamWithHttpInfoAsync(String teamId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(400, "Missing the required parameter 'teamId' when calling getTeam"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getTeam",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "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() {});
+ }
+
+ /**
+ * Get a team link.
+ *
+ * See {@link #getTeamLinkWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param linkId None (required)
+ * @return TeamLinkResponse
+ * @throws ApiException if fails to make API call
+ */
+ public TeamLinkResponse getTeamLink(String teamId, String linkId) throws ApiException {
+ return getTeamLinkWithHttpInfo(teamId, linkId).getData();
+ }
+
+ /**
+ * Get a team link.
+ *
+ *
See {@link #getTeamLinkWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @param linkId None (required)
+ * @return CompletableFuture<TeamLinkResponse>
+ */
+ public CompletableFuture getTeamLinkAsync(String teamId, String linkId) {
+ return getTeamLinkWithHttpInfoAsync(teamId, linkId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a single link for a team.
+ *
+ * @param teamId None (required)
+ * @param linkId None (required)
+ * @return ApiResponse<TeamLinkResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 404 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getTeamLinkWithHttpInfo(String teamId, String linkId)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling getTeamLink");
+ }
+
+ // verify the required parameter 'linkId' is set
+ if (linkId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'linkId' when calling getTeamLink");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/links/{link_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()))
+ .replaceAll("\\{" + "link_id" + "\\}", apiClient.escapeString(linkId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getTeamLink",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get a team link.
+ *
+ * See {@link #getTeamLinkWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param linkId None (required)
+ * @return CompletableFuture<ApiResponse<TeamLinkResponse>>
+ */
+ public CompletableFuture> getTeamLinkWithHttpInfoAsync(
+ String teamId, String linkId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling getTeamLink"));
+ return result;
+ }
+
+ // verify the required parameter 'linkId' is set
+ if (linkId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'linkId' when calling getTeamLink"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/links/{link_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()))
+ .replaceAll("\\{" + "link_id" + "\\}", apiClient.escapeString(linkId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getTeamLink",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "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() {});
+ }
+
+ /**
+ * Get links for a team.
+ *
+ * See {@link #getTeamLinksWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @return TeamLinksResponse
+ * @throws ApiException if fails to make API call
+ */
+ public TeamLinksResponse getTeamLinks(String teamId) throws ApiException {
+ return getTeamLinksWithHttpInfo(teamId).getData();
+ }
+
+ /**
+ * Get links for a team.
+ *
+ *
See {@link #getTeamLinksWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @return CompletableFuture<TeamLinksResponse>
+ */
+ public CompletableFuture getTeamLinksAsync(String teamId) {
+ return getTeamLinksWithHttpInfoAsync(teamId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get all links for a given team.
+ *
+ * @param teamId None (required)
+ * @return ApiResponse<TeamLinksResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 404 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getTeamLinksWithHttpInfo(String teamId)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling getTeamLinks");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/links"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getTeamLinks",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get links for a team.
+ *
+ * See {@link #getTeamLinksWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @return CompletableFuture<ApiResponse<TeamLinksResponse>>
+ */
+ public CompletableFuture> getTeamLinksWithHttpInfoAsync(
+ String teamId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling getTeamLinks"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/links"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getTeamLinks",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "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 getTeamMemberships. */
+ public static class GetTeamMembershipsOptionalParameters {
+ private Long pageSize;
+ private Long pageNumber;
+ private GetTeamMembershipsSort sort;
+ private String filterKeyword;
+
+ /**
+ * Set pageSize.
+ *
+ * @param pageSize Size for a given page. The maximum allowed value is 5000. (optional, default
+ * to 10)
+ * @return GetTeamMembershipsOptionalParameters
+ */
+ public GetTeamMembershipsOptionalParameters pageSize(Long pageSize) {
+ this.pageSize = pageSize;
+ return this;
+ }
+
+ /**
+ * Set pageNumber.
+ *
+ * @param pageNumber Specific page number to return. (optional, default to 0)
+ * @return GetTeamMembershipsOptionalParameters
+ */
+ public GetTeamMembershipsOptionalParameters pageNumber(Long pageNumber) {
+ this.pageNumber = pageNumber;
+ return this;
+ }
+
+ /**
+ * Set sort.
+ *
+ * @param sort Specifies the order of returned team memberships (optional)
+ * @return GetTeamMembershipsOptionalParameters
+ */
+ public GetTeamMembershipsOptionalParameters sort(GetTeamMembershipsSort sort) {
+ this.sort = sort;
+ return this;
+ }
+
+ /**
+ * Set filterKeyword.
+ *
+ * @param filterKeyword Search query, can be user email or name (optional)
+ * @return GetTeamMembershipsOptionalParameters
+ */
+ public GetTeamMembershipsOptionalParameters filterKeyword(String filterKeyword) {
+ this.filterKeyword = filterKeyword;
+ return this;
+ }
+ }
+
+ /**
+ * Get team memberships.
+ *
+ * See {@link #getTeamMembershipsWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @return UserTeamsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public UserTeamsResponse getTeamMemberships(String teamId) throws ApiException {
+ return getTeamMembershipsWithHttpInfo(teamId, new GetTeamMembershipsOptionalParameters())
+ .getData();
+ }
+
+ /**
+ * Get team memberships.
+ *
+ *
See {@link #getTeamMembershipsWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @return CompletableFuture<UserTeamsResponse>
+ */
+ public CompletableFuture getTeamMembershipsAsync(String teamId) {
+ return getTeamMembershipsWithHttpInfoAsync(teamId, new GetTeamMembershipsOptionalParameters())
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get team memberships.
+ *
+ * See {@link #getTeamMembershipsWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param parameters Optional parameters for the request.
+ * @return UserTeamsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public UserTeamsResponse getTeamMemberships(
+ String teamId, GetTeamMembershipsOptionalParameters parameters) throws ApiException {
+ return getTeamMembershipsWithHttpInfo(teamId, parameters).getData();
+ }
+
+ /**
+ * Get team memberships.
+ *
+ *
See {@link #getTeamMembershipsWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<UserTeamsResponse>
+ */
+ public CompletableFuture getTeamMembershipsAsync(
+ String teamId, GetTeamMembershipsOptionalParameters parameters) {
+ return getTeamMembershipsWithHttpInfoAsync(teamId, parameters)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a paginated list of members for a team
+ *
+ * @param teamId None (required)
+ * @param parameters Optional parameters for the request.
+ * @return ApiResponse<UserTeamsResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | Represents a user's association to a team | - |
+ * | 404 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getTeamMembershipsWithHttpInfo(
+ String teamId, GetTeamMembershipsOptionalParameters parameters) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling getTeamMemberships");
+ }
+ Long pageSize = parameters.pageSize;
+ Long pageNumber = parameters.pageNumber;
+ GetTeamMembershipsSort sort = parameters.sort;
+ String filterKeyword = parameters.filterKeyword;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/memberships"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[keyword]", filterKeyword));
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getTeamMemberships",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get team memberships.
+ *
+ * See {@link #getTeamMembershipsWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param parameters Optional parameters for the request.
+ * @return CompletableFuture<ApiResponse<UserTeamsResponse>>
+ */
+ public CompletableFuture> getTeamMembershipsWithHttpInfoAsync(
+ String teamId, GetTeamMembershipsOptionalParameters parameters) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling getTeamMemberships"));
+ return result;
+ }
+ Long pageSize = parameters.pageSize;
+ Long pageNumber = parameters.pageNumber;
+ GetTeamMembershipsSort sort = parameters.sort;
+ String filterKeyword = parameters.filterKeyword;
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/memberships"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
+ localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[keyword]", filterKeyword));
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getTeamMemberships",
+ localVarPath,
+ localVarQueryParams,
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "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() {});
+ }
+
+ /**
+ * Get permission settings for a team.
+ *
+ * See {@link #getTeamPermissionSettingsWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @return TeamPermissionSettingsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public TeamPermissionSettingsResponse getTeamPermissionSettings(String teamId)
+ throws ApiException {
+ return getTeamPermissionSettingsWithHttpInfo(teamId).getData();
+ }
+
+ /**
+ * Get permission settings for a team.
+ *
+ *
See {@link #getTeamPermissionSettingsWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @return CompletableFuture<TeamPermissionSettingsResponse>
+ */
+ public CompletableFuture getTeamPermissionSettingsAsync(
+ String teamId) {
+ return getTeamPermissionSettingsWithHttpInfoAsync(teamId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get all permission settings for a given team.
+ *
+ * @param teamId None (required)
+ * @return ApiResponse<TeamPermissionSettingsResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 404 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse getTeamPermissionSettingsWithHttpInfo(
+ String teamId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling getTeamPermissionSettings");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/permission-settings"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getTeamPermissionSettings",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "GET",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Get permission settings for a team.
+ *
+ * See {@link #getTeamPermissionSettingsWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @return CompletableFuture<ApiResponse<TeamPermissionSettingsResponse>>
+ */
+ public CompletableFuture>
+ getTeamPermissionSettingsWithHttpInfoAsync(String teamId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ CompletableFuture> result =
+ new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400,
+ "Missing the required parameter 'teamId' when calling getTeamPermissionSettings"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/permission-settings"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.getTeamPermissionSettings",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "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() {});
+ }
+
+ /**
+ * Remove a team.
+ *
+ * See {@link #removeTeamWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void removeTeam(String teamId) throws ApiException {
+ removeTeamWithHttpInfo(teamId);
+ }
+
+ /**
+ * Remove a team.
+ *
+ *
See {@link #removeTeamWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture removeTeamAsync(String teamId) {
+ return removeTeamWithHttpInfoAsync(teamId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Remove a team using the team's id.
+ *
+ * @param teamId None (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 404 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse removeTeamWithHttpInfo(String teamId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling removeTeam");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.removeTeam",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Remove a team.
+ *
+ * See {@link #removeTeamWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> removeTeamWithHttpInfoAsync(String teamId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(400, "Missing the required parameter 'teamId' when calling removeTeam"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.removeTeam",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"AuthZ", "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);
+ }
+
+ /**
+ * Remove a team link.
+ *
+ * See {@link #removeTeamLinkWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param linkId None (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void removeTeamLink(String teamId, String linkId) throws ApiException {
+ removeTeamLinkWithHttpInfo(teamId, linkId);
+ }
+
+ /**
+ * Remove a team link.
+ *
+ *
See {@link #removeTeamLinkWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @param linkId None (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture removeTeamLinkAsync(String teamId, String linkId) {
+ return removeTeamLinkWithHttpInfoAsync(teamId, linkId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Remove a link from a team.
+ *
+ * @param teamId None (required)
+ * @param linkId None (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 404 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse removeTeamLinkWithHttpInfo(String teamId, String linkId)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling removeTeamLink");
+ }
+
+ // verify the required parameter 'linkId' is set
+ if (linkId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'linkId' when calling removeTeamLink");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/links/{link_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()))
+ .replaceAll("\\{" + "link_id" + "\\}", apiClient.escapeString(linkId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.removeTeamLink",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Remove a team link.
+ *
+ * See {@link #removeTeamLinkWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param linkId None (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> removeTeamLinkWithHttpInfoAsync(
+ String teamId, String linkId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling removeTeamLink"));
+ return result;
+ }
+
+ // verify the required parameter 'linkId' is set
+ if (linkId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'linkId' when calling removeTeamLink"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/links/{link_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()))
+ .replaceAll("\\{" + "link_id" + "\\}", apiClient.escapeString(linkId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.removeTeamLink",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"AuthZ", "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);
+ }
+
+ /**
+ * Remove a user from a team.
+ *
+ * See {@link #removeTeamMembershipWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param userId None (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void removeTeamMembership(String teamId, String userId) throws ApiException {
+ removeTeamMembershipWithHttpInfo(teamId, userId);
+ }
+
+ /**
+ * Remove a user from a team.
+ *
+ *
See {@link #removeTeamMembershipWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @param userId None (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture removeTeamMembershipAsync(String teamId, String userId) {
+ return removeTeamMembershipWithHttpInfoAsync(teamId, userId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Remove a user from a team.
+ *
+ * @param teamId None (required)
+ * @param userId None (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 204 | No Content | - |
+ * | 404 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse removeTeamMembershipWithHttpInfo(String teamId, String userId)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling removeTeamMembership");
+ }
+
+ // verify the required parameter 'userId' is set
+ if (userId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'userId' when calling removeTeamMembership");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/memberships/{user_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()))
+ .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.removeTeamMembership",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "DELETE",
+ builder,
+ localVarHeaderParams,
+ new String[] {},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ null);
+ }
+
+ /**
+ * Remove a user from a team.
+ *
+ * See {@link #removeTeamMembershipWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param userId None (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> removeTeamMembershipWithHttpInfoAsync(
+ String teamId, String userId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling removeTeamMembership"));
+ return result;
+ }
+
+ // verify the required parameter 'userId' is set
+ if (userId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'userId' when calling removeTeamMembership"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}/memberships/{user_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()))
+ .replaceAll("\\{" + "user_id" + "\\}", apiClient.escapeString(userId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.removeTeamMembership",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"*/*"},
+ new String[] {"AuthZ", "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);
+ }
+
+ /**
+ * Update a team.
+ *
+ * See {@link #updateTeamWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return TeamResponse
+ * @throws ApiException if fails to make API call
+ */
+ public TeamResponse updateTeam(String teamId, TeamUpdateRequest body) throws ApiException {
+ return updateTeamWithHttpInfo(teamId, body).getData();
+ }
+
+ /**
+ * Update a team.
+ *
+ *
See {@link #updateTeamWithHttpInfoAsync}.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return CompletableFuture<TeamResponse>
+ */
+ public CompletableFuture updateTeamAsync(String teamId, TeamUpdateRequest body) {
+ return updateTeamWithHttpInfoAsync(teamId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update a team using the team's id. If the team_links relationship is
+ * present, the associated links are updated to be in the order they appear in the array, and any
+ * existing team links not present are removed.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return ApiResponse<TeamResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | API error response. | - |
+ * | 404 | API error response. | - |
+ * | 409 | API error response. | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateTeamWithHttpInfo(String teamId, TeamUpdateRequest body)
+ throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'teamId' when calling updateTeam");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(400, "Missing the required parameter 'body' when calling updateTeam");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.updateTeam",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "PATCH",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Update a team.
+ *
+ * See {@link #updateTeamWithHttpInfo}.
+ *
+ * @param teamId None (required)
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<TeamResponse>>
+ */
+ public CompletableFuture> updateTeamWithHttpInfoAsync(
+ String teamId, TeamUpdateRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'teamId' is set
+ if (teamId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(400, "Missing the required parameter 'teamId' when calling updateTeam"));
+ 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 updateTeam"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/team/{team_id}"
+ .replaceAll("\\{" + "team_id" + "\\}", apiClient.escapeString(teamId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.TeamsApi.updateTeam",
+ localVarPath,
+ new ArrayList