Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Get Current Enrollment

GET/api/v2/admin/enrollments/getCurrent
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.

Returns the Enrollment associated with the current User's primary organization.

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

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Response body

Enrollment
object
Hide child attributes

Hide child attributes

rid
string
name
string
createdTime
string
optional

The time at which the resource was created.

Examples

Request

Copied!
1 2 3 curl \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/admin/enrollments/getCurrent?preview=true"

Response

Copied!
1 2 3 4 5 { "name": "Example Enrollment", "createdTime": "2003-05-06T12:34:56.789Z", "rid": "ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6" }

Error responses

Error Name
GetCurrentEnrollmentPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not getCurrent the Enrollment.
Parameters
EnrollmentNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Enrollment could not be found.
ParametersenrollmentRid