Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Replace Group Membership Expiration Policy

PUT/api/v2/admin/groups/{groupId}/membershipExpirationPolicy
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Replace the GroupMembershipExpirationPolicy.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:admin-write.

Path parameters

groupId
string

The ID of a Foundry Group or User.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

ReplaceGroupMembershipExpirationPolicyRequest
object
Hide child attributes

Hide child attributes

maximumDuration
string
optional

Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added.

maximumValue
string
optional

Members in this group must be added with expiration times that occur before this value.

Response body

GroupMembershipExpirationPolicy
object

The replaced GroupMembershipExpirationPolicy

Hide child attributes

Hide child attributes

maximumValue
string
optional

Members in this group must be added with expiration times that occur before this value.

maximumDuration
string
optional

Members in this group must be added with expirations that are less than this duration in seconds into the future from the time they are added.

Examples

Request

Copied!
1 2 3 4 5 curl -X PUT \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/admin/groups/f05f8da4-b84c-4fca-9c77-8af0b13d11de/membershipExpirationPolicy?preview=true" \ -d '{"maximumDuration":30,"maximumValue":"2026-01-31T00:00:00.000Z"}'

Response

Copied!
1 2 3 4 { "maximumDuration": 30, "maximumValue": "2026-01-31T00:00:00.000Z" }

Error responses

Error Name
ReplaceGroupMembershipExpirationPolicyPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not replace the GroupMembershipExpirationPolicy.
ParametersgroupId
GroupNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Group could not be found.
ParametersgroupId