Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Add Organizations

POST/api/v2/filesystem/projects/{projectRid}/addOrganizations
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.

Adds a list of Organizations to a Project.

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

Path parameters

projectRid
string

The unique resource identifier (RID) of a Project.

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

AddOrganizationsRequest
object
Hide child attributes

Hide child attributes

organizationRids
list<OrganizationRid>
optional
Show child attributes

Show child attributes

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/filesystem/projects/ri.compass.main.folder.01a79a9d-e293-48db-a585-9ffe221536e8/addOrganizations?preview=true" \ -d '{"organizationRids":["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"]}'

Error responses

Error Name
OrganizationsNotFoundError CodeNOT_FOUND
Status Code404
DescriptionAt least one organization RID could not be found.
ParametersorganizationRids
InvalidOrganizationHierarchyError CodeINVALID_ARGUMENT
Status Code400
DescriptionOrganizations on a project must also exist on the parent space. This error is thrown if the configuration of a project's organizations (on creation or subsequently) results in the project being marked with either no organizations in a marked space, or with an organization that is not present on the parent space.
ParametersorganizationRids
AddOrganizationsPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not addOrganizations the Project.
ParametersprojectRid
ProjectNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given Project could not be found.
ParametersprojectRid