Skip to main content
You're reading Identity & Access Management 7.0.0. The newest release is 7.3.0, and Cloud has the newest features. Go to the newest release

Organization management API

Download OpenAPI (YAML)Version v1

Base URL: https://localhost:9443/t/carbon.super/api/server/v1

The Organization Management API Definition (version v1).

Download the OpenAPI definition (YAML)

Security schemes​

BasicAuth: HTTP basic

OAuth2: oauth2

authorizationCode flow, token URL https://localhost:9443/oauth2/token, authorization URL https://localhost:9443/oauth2/authorize

Organization​

Retrieve organizations created for this tenant which matches the defined search criteria, if any.​

GET /organizations

This API is used to search and retrieve organizations created for this tenant.

Organizations can be filtered by id, name, description, created, lastModified, status, and parentId attributes.

Supported operators: "eq"(equals), "co"(contains), "sw"(starts with), "ew"(ends with), "ge"(greater than or equals), "le"(less than or equals), "gt"(greater than), "lt"(less than)

example: filter=name+eq+ABC Builders

Scope(Permission) required: internal_organization_view

Parameters

NameInTypeRequiredDescription
filterquerystring

Condition to filter the retrieval of records.

limitqueryinteger (int32)

Maximum number of records to be returned. (Should be greater than 0)

afterquerystring

Points to the next range of data to be returned.

beforequerystring

Points to the previous range of data that can be retrieved.

recursivequeryboolean

Determines whether a recursive search should happen.

Default: false

Responses

CodeDescriptionSchema
200

Successful response

OrganizationsResponse
400

Invalid input in the request.

Error
401

Authentication information is missing or invalid.

403

Access forbidden.

500

Internal server error.

Error
501

Not Implemented.

Error

Create a new organization.​

POST /organizations

This API is used to create the organization defined in the user input.

Scope(Permission) required: internal_organization_create

Request body (required): application/json

This represents the organization to be added.

Schema: OrganizationPOSTRequest

4 properties
NameTypeRequiredDescription
namestringYes
descriptionstring
parentIdstring

The parent organization id should be the organization where the request is invoked. If a value is not specified it will be resolved internally.

attributesarray of Attribute

Responses

CodeDescriptionSchema
201

Successful response

OrganizationResponse
400

Invalid input in the request.

Error
401

Authentication information is missing or invalid.

403

Access forbidden.

500

Internal server error.

Error

Check organization with given name exist among the organizations hierarchy.​

POST /organizations/check-name

This API is used to check whether organization with particular name exist or not.

If the organization name is available for use, the response will be "available": true, else it will be "available": false.

Scope(Permission) required: internal_organization_view

Request body (required): application/json

OrganizationNameCheckPOSTRequest object containing the organization name.

Schema: OrganizationNameCheckPOSTRequest

1 property
NameTypeRequiredDescription
namestring

Responses

CodeDescriptionSchema
200

Successful response

OrganizationNameCheckPOSTResponse
400

Invalid input in the request.

Error
401

Authentication information is missing or invalid.

403

Access forbidden.

404

Requested resource is not found.

Error
500

Internal server error.

Error

Get an existing organization, identified by the organization ID.​

GET /organizations/{organization-id}

This API is used to get an existing organization identified by the organization ID.

Scope(Permission) required: internal_organization_view

Parameters

NameInTypeRequiredDescription
organization-idpathstringYes

ID of the organization.

includePermissionsqueryboolean

Returns the organization details along with permissions assigned for the requested user in this organization.

Default: false

Responses

CodeDescriptionSchema
200

Successful response

GetOrganizationResponse
400

Invalid input in the request.

Error
401

Authentication information is missing or invalid.

403

Access forbidden.

404

Requested resource is not found.

Error
500

Internal server error.

Error

Update an organization by ID.​

PUT /organizations/{organization-id}

This API provides the capability to update an organization by its id.

Scope(Permission) required: internal_organization_update

Parameters

NameInTypeRequiredDescription
organization-idpathstringYes

ID of the organization to be updated.

Request body (required): application/json

Schema: OrganizationPUTRequest

4 properties
NameTypeRequiredDescription
namestringYes
descriptionstring
statusstringYes

Allowed values: ACTIVE, DISABLED

attributesarray of Attribute

Responses

CodeDescriptionSchema
200

Successful response

OrganizationResponse
400

Invalid input in the request.

Error
401

Authentication information is missing or invalid.

403

Access forbidden.

404

Requested resource is not found.

Error
500

Internal server error.

Error

Delete an organization by using the organization's ID.​

DEL /organizations/{organization-id}

This API provides the capability to delete an organization by giving its ID.

Scope(Permission) required: internal_organization_delete

Parameters

NameInTypeRequiredDescription
organization-idpathstringYes

ID of the organization to be deleted.

Responses

CodeDescriptionSchema
204

Successfully deleted

400

Invalid input in the request.

Error
401

Authentication information is missing or invalid.

403

Access forbidden.

404

Requested resource is not found.

Error
500

Internal server error.

Error

Patch an organization property by ID. Patch is supported only for key-value pairs.​

PATCH /organizations/{organization-id}

This API provides the capability to update an organization property using patch request. Organization patch is supported only for key-value pairs.

Scope(Permission) required: internal_organization_update

Parameters

NameInTypeRequiredDescription
organization-idpathstringYes

ID of the organization to be patched.

Request body (required): application/json

Schema: OrganizationPatchRequest

Responses

CodeDescriptionSchema
200

Successful response

OrganizationResponse
400

Invalid input in the request.

Error
401

Authentication information is missing or invalid.

403

Access forbidden.

404

Requested resource is not found.

Error
500

Internal server error.

Error

Organization Metadata​

Get metadata of the logged in organization.​

GET /organizations/metadata

This API facilitates the retrieval of metadata including discovery attributes of the logged in organization.

Scope(Permission) required: internal_organization_view

Responses

CodeDescriptionSchema
200

Successful response

OrganizationMetadata
401

Authentication information is missing or invalid.

403

Access forbidden.

500

Internal server error.

Error

Schemas​

Error​

Type: object

4 properties
NameTypeRequiredDescription
codestringYes

An error code.

messagestringYes

An error message.

descriptionstring

An error description.

traceIdstring

An error trace identifier.

OrganizationPOSTRequest​

Type: object

4 properties
NameTypeRequiredDescription
namestringYes
descriptionstring
parentIdstring

The parent organization id should be the organization where the request is invoked. If a value is not specified it will be resolved internally.

attributesarray of Attribute

OrganizationPUTRequest​

Type: object

4 properties
NameTypeRequiredDescription
namestringYes
descriptionstring
statusstringYes

Allowed values: ACTIVE, DISABLED

attributesarray of Attribute

OrganizationNameCheckPOSTRequest​

Type: object

1 property
NameTypeRequiredDescription
namestring

OrganizationNameCheckPOSTResponse​

Type: object

1 property
NameTypeRequiredDescription
availableboolean

Attribute​

Type: object

2 properties
NameTypeRequiredDescription
keystringYes
valuestringYes

OrganizationsResponse​

Type: object

2 properties
NameTypeRequiredDescription
linksarray of Link
organizationsarray of BasicOrganizationResponse

Type: object

2 properties
NameTypeRequiredDescription
hrefstring (uri)

Endpoint that will return the next or previous page of data.

relstring

Describes whether the provided link is to access the next or previous page of data.

BasicOrganizationResponse​

Type: object

4 properties
NameTypeRequiredDescription
idstringYes
namestringYes
statusstringYes

Allowed values: ACTIVE, DISABLED

refstringYes

OrganizationResponse​

Type: object

9 properties
NameTypeRequiredDescription
idstringYes
namestringYes
descriptionstring
statusstringYes

Allowed values: ACTIVE, DISABLED

createdstringYes
lastModifiedstringYes
typestringYes

Allowed values: TENANT

parentParentOrganization
attributesarray of Attribute

GetOrganizationResponse​

Type: object

10 properties
NameTypeRequiredDescription
idstringYes
namestringYes
descriptionstring
statusstringYes

Allowed values: ACTIVE, DISABLED

createdstringYes
lastModifiedstringYes
typestringYes

Allowed values: TENANT

parentParentOrganization
attributesarray of Attribute
permissionsarray of string

ParentOrganization​

Type: object

2 properties
NameTypeRequiredDescription
idstringYes
refstringYes

OrganizationPatchRequest​

Type: array of OrganizationPatchRequestItem

OrganizationPatchRequestItem​

Type: object

A JSONPatch as defined by RFC 6902. Patch operation is supported only for root level attributes of an organization.

3 properties
NameTypeRequiredDescription
operationstringYes

The operation to be performed.

Allowed values: ADD, REMOVE, REPLACE

pathstringYes

A JSON-Pointer

valuestring

The value to be used within the operations.

DiscoveryAttribute​

Type: object

2 properties
NameTypeRequiredDescription
typestringYes
valuesarray of string

OrganizationMetadata​

Type: object

11 properties
NameTypeRequiredDescription
idstringYes
namestringYes
descriptionstring
statusstringYes

Allowed values: ACTIVE, DISABLED

createdstringYes
lastModifiedstringYes
typestringYes

Allowed values: TENANT

parentParentOrganization
attributesarray of Attribute
permissionsarray of string
discoveryAttributesarray of DiscoveryAttribute

Was this page helpful?