Organizationsedit
List organizationsedit
Fetch organizations available to the current user. Currently unavailable in self-hosted ECE.
Requestedit
GET /api/v1/organizations
Responsesedit
-
200
-
Organizations fetched successfully
-
401
-
User not found. (code:
user.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [user.not_found
]) - The error codes associated with the response
-
Request exampleedit
curl -XGET https://api.elastic-cloud.com/api/v1/organizations \ -H "Authorization: ApiKey $EC_API_KEY"
Get organization invitationedit
Gets a single invitation to an organization by token. Currently unavailable in self-hosted ECE.
Requestedit
GET /api/v1/organizations/invitations/{invitation_token}
Path parametersedit
Name | Type | Required | Description |
---|---|---|---|
|
|
Y |
Organization invitation token |
Responsesedit
-
200
-
Organization invitation fetched successfully
-
404
-
Invitation not found. (code:
organization.invitation_not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.invitation_not_found
]) - The error codes associated with the response
-
Request exampleedit
curl -XGET https://api.elastic-cloud.com/api/v1/organizations/invitations/{invitation_token} \ -H "Authorization: ApiKey $EC_API_KEY"
Accept an organization invitationedit
Accepts an organization invitation. Currently unavailable in self-hosted ECE.
Requestedit
POST /api/v1/organizations/invitations/{invitation_token}/_accept
Path parametersedit
Name | Type | Required | Description |
---|---|---|---|
|
|
Y |
Organization invitation token |
Responsesedit
-
200
-
Organization invitation accepted successfully
-
400
-
User already belongs to organization. (code:
organization.user_organization_already_belongs
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.user_organization_already_belongs
]) - The error codes associated with the response
-
-
403
-
The current user authentication is not valid. (code:
root.invalid_authentication
)Headers
-
x-cloud-error-codes
(string
; allowed values: [root.invalid_authentication
]) - The error codes associated with the response
-
-
404
-
-
Organization not found. (code:
organization.not_found
) -
User not found. (code:
user.not_found
) -
Invitation not found. (code:
organization.invitation_not_found
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
,user.not_found
,organization.invitation_not_found
]) - The error codes associated with the response
-
Organization not found. (code:
Request exampleedit
curl -XPOST https://api.elastic-cloud.com/api/v1/organizations/invitations/{invitation_token}/_accept \ -H "Authorization: ApiKey $EC_API_KEY"
Fetch organization informationedit
Fetch a single organization by id. Currently unavailable in self-hosted ECE.
Requestedit
GET /api/v1/organizations/{organization_id}
Path parametersedit
Name | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Organization |
Responsesedit
-
200
-
Organization fetched successfully
-
401
-
User not found. (code:
user.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [user.not_found
]) - The error codes associated with the response
-
-
403
-
The current user does not have access to the requested organization. (code:
organization.invalid_access
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.invalid_access
]) - The error codes associated with the response
-
-
404
-
Organization not found. (code:
organization.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
]) - The error codes associated with the response
-
Request exampleedit
curl -XGET https://api.elastic-cloud.com/api/v1/organizations/{organization_id} \ -H "Authorization: ApiKey $EC_API_KEY"
Update organizationedit
This endpoint is deprecated and scheduled to be removed in the next major version.
Updates an existing organization. Currently unavailable in self-hosted ECE.
Requestedit
PUT /api/v1/organizations/{organization_id}
Path parametersedit
Name | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Organization |
Request bodyedit
(OrganizationRequest
) (required) The organization to update
Responsesedit
-
200
-
Organization updated successfully
-
400
-
-
Name must be between 2 and 30 characters. (code:
organization.invalid_name
) -
User already has an organization. (code:
organization.user_organization_already_exists
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.invalid_name
,organization.user_organization_already_exists
]) - The error codes associated with the response
-
Name must be between 2 and 30 characters. (code:
-
401
-
You are not authorized to perform this action
-
403
-
The current user does not have access to the requested organization. (code:
organization.invalid_access
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.invalid_access
]) - The error codes associated with the response
-
-
404
-
Organization not found. (code:
organization.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
]) - The error codes associated with the response
-
Request exampleedit
curl -XPUT https://api.elastic-cloud.com/api/v1/organizations/{organization_id} \ -H "Authorization: ApiKey $EC_API_KEY" \ -H 'Content-Type: application/json' \ -d ' { "default_disk_usage_alerts_enabled" : true, "name" : "string", "notifications_allowed_email_domains" : [ "string" ] } '
List organization invitationsedit
Fetch open invitations to the selected organization. Currently unavailable in self-hosted ECE.
Requestedit
GET /api/v1/organizations/{organization_id}/invitations
Path parametersedit
Name | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Organization |
Responsesedit
-
200
-
Organization invitations fetched successfully
-
404
-
Organization not found. (code:
organization.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
]) - The error codes associated with the response
-
Request exampleedit
curl -XGET https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/invitations \ -H "Authorization: ApiKey $EC_API_KEY"
Create organization invitationsedit
Creates or refreshes organization invitations. Currently unavailable in self-hosted ECE.
Requestedit
POST /api/v1/organizations/{organization_id}/invitations
Path parametersedit
Name | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Organization |
Request bodyedit
(OrganizationInvitationRequest
) (required) The organization invitations to create or refresh
Responsesedit
-
201
-
Organization invitations created successfully
-
400
-
-
Invitation email was not valid. (code:
organization.invitation_invalid_email
) -
Invitation already sent. (code:
organization.invitation_already_exists
) -
User already belongs to organization. (code:
organization.user_organization_already_belongs
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.invitation_invalid_email
,organization.invitation_already_exists
,organization.user_organization_already_belongs
]) - The error codes associated with the response
-
Invitation email was not valid. (code:
-
403
-
The current user authentication is not valid. (code:
root.invalid_authentication
)Headers
-
x-cloud-error-codes
(string
; allowed values: [root.invalid_authentication
]) - The error codes associated with the response
-
-
404
-
-
Organization not found. (code:
organization.not_found
) -
User not found. (code:
user.not_found
) -
Invitation sender does not belong to organization. (code:
organization.user_organization_does_not_belong
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
,user.not_found
,organization.user_organization_does_not_belong
]) - The error codes associated with the response
-
Organization not found. (code:
-
429
-
Request exceeds organization invitation creation rate limits. (code:
organization.invitations_rate_limit_exceeded
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.invitations_rate_limit_exceeded
]) - The error codes associated with the response
-
Request exampleedit
curl -XPOST https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/invitations \ -H "Authorization: ApiKey $EC_API_KEY" \ -H 'Content-Type: application/json' \ -d ' { "emails" : [ "string" ], "expires_in" : "string" } '
Delete organization invitationsedit
Deletes one or more organization invitations. Currently unavailable in self-hosted ECE.
Requestedit
DELETE /api/v1/organizations/{organization_id}/invitations/{invitation_tokens}
Path parametersedit
Name | Type | Required | Description |
---|---|---|---|
|
|
Y |
CSV list of Invitation tokens |
|
|
Y |
Identifier for the Organization |
Responsesedit
-
200
-
Organization invitations deleted successfully
-
400
-
No valid invitation token was supplied. (code:
root.invalid_data
)Headers
-
x-cloud-error-codes
(string
; allowed values: [root.invalid_data
]) - The error codes associated with the response
-
-
404
-
-
Organization not found. (code:
organization.not_found
) -
Invitation not found. (code:
organization.invitation_not_found
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
,organization.invitation_not_found
]) - The error codes associated with the response
-
Organization not found. (code:
Request exampleedit
curl -XDELETE https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/invitations/{invitation_tokens} \ -H "Authorization: ApiKey $EC_API_KEY"
List organization membersedit
Fetch users belonging to the selected organization. Currently unavailable in self-hosted ECE.
Requestedit
GET /api/v1/organizations/{organization_id}/members
Path parametersedit
Name | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Organization |
Responsesedit
-
200
-
Organization members fetched successfully
-
404
-
Organization not found. (code:
organization.not_found
)Headers
-
x-cloud-error-codes
(string
; allowed values: [organization.not_found
]) - The error codes associated with the response
-
Request exampleedit
curl -XGET https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/members \ -H "Authorization: ApiKey $EC_API_KEY"
Delete organization membershipsedit
Deletes one or more organization memberships. Currently unavailable in self-hosted ECE.
Requestedit
DELETE /api/v1/organizations/{organization_id}/members/{user_ids}
Path parametersedit
Name | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Organization |
|
|
Y |
CSV list of User identifiers |
Query parametersedit
Name | Type | Required | Description |
---|---|---|---|
|
|
N |
Whether or not to force the removal of Org memberships (effective only for Platform Admins) |
Responsesedit
-
200
-
Organization membership deleted successfully
-
404
-
-
User not found. (code:
user.not_found
) -
Organization not found. (code:
organization.not_found
) -
Organization membership not found. (code:
organization.membership_not_found
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [user.not_found
,organization.not_found
,organization.membership_not_found
]) - The error codes associated with the response
-
User not found. (code:
Request exampleedit
curl -XDELETE https://api.elastic-cloud.com/api/v1/organizations/{organization_id}/members/{user_ids} \ -H "Authorization: ApiKey $EC_API_KEY"