Skip to main content

User store management API

Download OpenAPI (YAML)Version v1

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

The UserStore Management Rest API (version v1).

Download the OpenAPI definition (YAML)

Security schemes​

BasicAuth: HTTP basic

OAuth2: oauth2

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

3 scopes
ScopeDescription
readGrants read access
writeGrants write access
adminGrants read and write access to administrative information

User Store​

Retrieve the list of secondary user stores​

GET /userstores

This API provides the capability to list the configured secondary user stores.

Scope(Permission) required: internal_userstore_view

Parameters

NameInTypeRequiredDescription
limitqueryinteger (int32)

maximum number of records to return

offsetqueryinteger (int32)

number of records to skip for pagination

filterquerystring

Condition to filter the retrieval of records.

sortquerystring

Define the order of how the retrieved records should be sorted.

requiredAttributesquerystring

Define set of user store attributes (as comma separated) to be returned.

Responses

CodeDescriptionSchema
200

Successful response.

array of UserStoreListResponse
401

Unauthorized.

404

The specified resource is not found.

Error
500

Internal Server Error.

Error
501

Not Implemented.

Error

Add a secondary user store.​

POST /userstores

This API provides the capability to add a secondary user store.

NOTE:

To retrieve the available user store classes/types, use the api/server/v1/userstores/meta/types API.

When creating a user store, it will be disabled by default. To enable the user store, include the disabled property set to false in the properties of the payload.

Scope(Permission) required: internal_userstore_create

Request body: application/json

Secondary user store to add.

Schema: UserStoreReq

5 properties
NameTypeRequiredDescription
typeIdstringYes

The id of the user store manager class type.

descriptionstringYes

Description of the user store.

namestringYes

This is a unique name that identifies the user store.

propertiesarray of PropertyYes

Various properties related to the user store such as connection URL, connection password etc.

claimAttributeMappingsarray of ClaimAttributeMapping

Claim attribute mappings.

Responses

CodeDescriptionSchema
201

Successful response

UserStoreResponse
400

Invalid input request.

Error
401

Unauthorized.

403

Resource Forbidden.

409

Element Already Exists.

Error
500

Internal Server Error.

Error

Import a secondary user store from a file​

POST /userstores/import

This API provides the capability to import a user store from the configurations provided as a YAML, JSON or XML file.

Scope(Permission) required: internal_userstore_create

Request body: multipart/form-data

This represents the user store to be created.

Schema: FileUpload

1 property
NameTypeRequiredDescription
filestring (binary)

File uploaded during import.

Responses

CodeDescriptionSchema
201

Successful response

400

Invalid input request.

Error
401

Unauthorized.

403

Resource Forbidden.

409

Element Already Exists.

Error
500

Internal Server Error.

Error

Retrieve the configurations of primary user store​

GET /userstores/primary

This API provides the capability to retrieve the configurations of the primary user store.

Scope(Permission) required: internal_userstore_view

Responses

CodeDescriptionSchema
200

Successful response.

UserStoreConfigurationsRes
401

Unauthorized.

404

The specified resource is not found.

Error
500

Internal Server Error.

Error

Retrieve the configurations of secondary user store based on its domain id​

GET /userstores/{userstore-domain-id}

This API provides the capability to retrieve the configurations of a secondary user store based on its domain id.

Scope(Permission) required: internal_userstore_view

Parameters

NameInTypeRequiredDescription
userstore-domain-idpathstringYes

The unique name of the user store domain

Responses

CodeDescriptionSchema
200

Successful response.

UserStoreConfigurationsRes
401

Unauthorized.

404

The specified resource is not found.

Error
500

Internal Server Error.

Error

Update a user store by its domain id​

PUT /userstores/{userstore-domain-id}

This API provides the capability to edit a user store based on its domain id

Scope(Permission) required: internal_userstore_update

Parameters

NameInTypeRequiredDescription
userstore-domain-idpathstringYes

Current domain id of the user store

Request body: application/json

The secondary user store values which are needed to be edited for a given domain id.

Schema: UserStoreReq

5 properties
NameTypeRequiredDescription
typeIdstringYes

The id of the user store manager class type.

descriptionstringYes

Description of the user store.

namestringYes

This is a unique name that identifies the user store.

propertiesarray of PropertyYes

Various properties related to the user store such as connection URL, connection password etc.

claimAttributeMappingsarray of ClaimAttributeMapping

Claim attribute mappings.

Responses

CodeDescriptionSchema
200

Successful response.

UserStoreResponse
400

Invalid input request.

Error
401

Unauthorized.

403

Resource Forbidden.

404

The specified resource is not found.

Error
500

Internal Server Error.

Error

Delete a secondary user store​

DEL /userstores/{userstore-domain-id}

This API provides the capability to delete a secondary user store based on matching to the given user store domain id.

Scope(Permission) required: internal_userstore_delete

Parameters

NameInTypeRequiredDescription
userstore-domain-idpathstringYes

The unique name of the user store domain

Responses

CodeDescriptionSchema
204

No Content.

401

Unauthorized.

403

Resource Forbidden.

500

Internal Server Error.

Error

Patch the secondary user store by it's domain id​

PATCH /userstores/{userstore-domain-id}

This API provides the capability to update the secondary user store's property using patch request by using its domain id.

Scope(Permission) required: internal_userstore_update

Parameters

NameInTypeRequiredDescription
userstore-domain-idpathstringYes

The unique name of the user store domain

Request body (required): application/json

Schema: PatchRequest

Responses

CodeDescriptionSchema
200

Successful response.

UserStoreResponse
400

Invalid input request.

Error
401

Unauthorized.

403

Resource Forbidden.

404

The specified resource is not found.

Error
500

Internal Server Error.

Error

Export a secondary user store by its domain id​

GET /userstores/{userstore-domain-id}/export

This API provides the capability to retrieve the configurations of a secondary user store based on its domain id as an XML, YAML, or JSON file.

Scope(Permission) required: internal_userstore_view

Parameters

NameInTypeRequiredDescription
userstore-domain-idpathstringYes

ID of the user store domain.

Acceptheaderstring

Content type of the file.

Allowed values: application/json, application/xml, application/yaml, application/x-yaml, text/yaml, text/xml, text/json. Default: application/yaml

Responses

CodeDescriptionSchema
200

Successful response.

string
400

Invalid input request.

Error
401

Unauthorized.

403

Resource Forbidden.

404

The specified resource is not found.

Error
409

Element Already Exists.

Error
500

Internal Server Error.

Error

Update an existing user store by importing configs from a file​

PUT /userstores/{userstore-domain-id}/import

This API provides the capability to update an existing user store by importing user store configurations provided as a YAML, JSON or XML file.

Scope(Permission) required: internal_userstore_update

Parameters

NameInTypeRequiredDescription
userstore-domain-idpathstringYes

ID of the user store.

Request body: multipart/form-data

This represents the user store to be updated.

Schema: FileUpload

1 property
NameTypeRequiredDescription
filestring (binary)

File uploaded during import.

Responses

CodeDescriptionSchema
200

Successfully Updated.

400

Invalid input request.

Error
401

Unauthorized.

403

Resource Forbidden.

404

The specified resource is not found.

Error
500

Internal Server Error.

Error

Update the secondary user store attribute mappings by it's domain id.​

PATCH /userstores/{userstore-domain-id}/attribute-mappings

This API provides the capability to update the secondary user store's attribute mappings using patch request by using its domain id.

Scope(Permission) required: internal_userstore_update

Parameters

NameInTypeRequiredDescription
userstore-domain-idpathstringYes

The unique name of the user store domain

Request body (required): application/json

Schema: AttributeMappingsReq

Responses

CodeDescriptionSchema
200

OK.

400

Invalid input request.

Error
401

Unauthorized.

403

Resource Forbidden.

404

The specified resource is not found.

Error
500

Internal Server Error.

Error

Test the connection to the datasource used by a JDBC user store manager.​

POST /userstores/test-connection

This API provides the capability to test the connection to the datasource used by a JDBC user store manager.

Scope(Permission) required: internal_userstore_view

Request body: application/json

RDBMS connection properties used to connect to the datasource used by a JDBC user store manager.

Schema: RDBMSConnectionReq

5 properties
NameTypeRequiredDescription
domainstring

User store domain name.

driverNamestringYes

Driver Name.

connectionURLstringYes

The Connection URL.

usernamestringYes

The username.

connectionPasswordstringYes

The password.

Responses

CodeDescriptionSchema
200

Successful response.

ConnectionEstablishedResponse
400

Invalid input request.

Error
401

Unauthorized.

500

Internal Server Error.

Error

Meta​

Retrieve the available user store classes/types​

GET /userstores/meta/types

This API provides the capability to retrieve the available user store types

Scope(Permission) required: internal_userstore_view

Responses

CodeDescriptionSchema
200

Successful Response.

array of AvailableUserStoreClassesRes
401

Unauthorized.

500

Internal Server Error.

Error

Retrieve the properties of secondary user store of a given user store type​

GET /userstores/meta/types/{type-id}

This API provides the capability to retrieve the properties of secondary user store of a given class name.

Scope(Permission) required: internal_userstore_view

Parameters

NameInTypeRequiredDescription
type-idpathstringYes

Id of the user store type

Responses

CodeDescriptionSchema
200

Successful response.

MetaUserStoreType
400

Invalid input request.

Error
401

Unauthorized.

404

The specified resource is not found.

Error
500

Internal Server Error.

Error
501

Not Implemented.

Error

Retrieve the meta attributes of a user store of a given user store type.​

GET /userstores/meta/types/{type-id}/attributes

This API provides the capability to retrieve the attribute mappings of a given user store type.

Scope(Permission) required: internal_userstore_view

Parameters

NameInTypeRequiredDescription
type-idpathstringYes

Id of the user store type

includeIdentityClaimMappingsqueryboolean

Whether to include the identity claim mappings with user store attributes.

Responses

CodeDescriptionSchema
200

Successful Response.

UserStoreAttributeMappingResponse
400

Invalid input request.

Error
401

Unauthorized.

403

Resource Forbidden.

404

The specified resource is not found.

Error
500

Internal Server Error.

Error

Schemas​

UserStoreReq​

Type: object

Secondary user store request.

5 properties
NameTypeRequiredDescription
typeIdstringYes

The id of the user store manager class type.

descriptionstringYes

Description of the user store.

namestringYes

This is a unique name that identifies the user store.

propertiesarray of PropertyYes

Various properties related to the user store such as connection URL, connection password etc.

claimAttributeMappingsarray of ClaimAttributeMapping

Claim attribute mappings.

PatchRequest​

Type: array of PatchDocument

ConnectionEstablishedResponse​

Type: object

1 property
NameTypeRequiredDescription
connectionboolean

PatchDocument​

Type: object

A JSONPatch document as defined by RFC 6902

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

RDBMSConnectionReq​

Type: object

RDBMS Connection Request.

5 properties
NameTypeRequiredDescription
domainstring

User store domain name.

driverNamestringYes

Driver Name.

connectionURLstringYes

The Connection URL.

usernamestringYes

The username.

connectionPasswordstringYes

The password.

ClaimAttributeMapping​

Type: object

2 properties
NameTypeRequiredDescription
claimURIstringYes

A unique URI specific to the claim.

mappedAttributestringYes

Userstore attribute to be mapped to.

AttributeMappingsReq​

Type: array of ClaimAttributeMapping

Array of ClaimURI attribute mappings.

Error​

Type: object

3 properties
NameTypeRequiredDescription
codestringYes
messagestringYes
descriptionstring

Property​

Type: object

2 properties
NameTypeRequiredDescription
namestringYes
valuestringYes

UserStoreListResponse​

Type: object

8 properties
NameTypeRequiredDescription
idstring

base64 url encoded value of domain name

namestring

Domain name of the secondary user store.

enabledboolean

Enabled status of the userstore.

descriptionstring
isLocalboolean

Whether the user store is local or not.

selfstring

Location of the created/updated resource.

typeNamestring

User store type name.

propertiesarray of AddUserStorePropertiesRes

Requested configured user store property for the set

MetaUserStoreType​

Type: object

5 properties
NameTypeRequiredDescription
typeNamestring
typeIdstring
classNamestring
isLocalboolean

Whether the user store is local or not.

propertiesUserStorePropertiesRes

UserStoreResponse​

Type: object

7 properties
NameTypeRequiredDescription
idstring

base64 url encoded value of domain name

namestring

domain name of the secondary user store

typeNamestring
typeIdstring
descriptionstring
propertiesarray of AddUserStorePropertiesRes

Configured user store proper for the set.

claimAttributeMappingsarray of ClaimAttributeMapping

Configured user store claim attribute mappings

AvailableUserStoreClassesRes​

Type: object

Available User Store Classes Response.

5 properties
NameTypeRequiredDescription
typeIdstring
typeNamestring
classNamestring
isLocalboolean

Whether the user store is local or not.

selfstring

UserStoreConfigurationsRes​

Type: object

Available User Store Configurations Response.

8 properties
NameTypeRequiredDescription
typeNamestring
typeIdstring
namestring
descriptionstring
classNamestring
isLocalboolean

Whether the user store is local or not.

propertiesarray of AddUserStorePropertiesRes

Configured user store property for the set

claimAttributeMappingsarray of ClaimAttributeMapping

Requested configured user store claim attribute mappings.

AddUserStorePropertiesRes​

Type: object

Available User Store Properties.

2 properties
NameTypeRequiredDescription
namestringYes
valuestringYes

UserStorePropertiesRes​

Type: object

3 properties
NameTypeRequiredDescription
Mandatoryarray of PropertiesRes
Optionalarray of PropertiesRes
Advancedarray of PropertiesRes

PropertiesRes​

Type: object

4 properties
NameTypeRequiredDescription
namestring
defaultValuestring
descriptionstring
attributesarray of Attribute

Attribute​

Type: object

2 properties
NameTypeRequiredDescription
namestring
valuestring

UserStoreAttributeMappingResponse​

Type: object

4 properties
NameTypeRequiredDescription
typeNamestring

Type name of the user store.

typeIdstring

Type id of the user store.

isLocalboolean

Whether the user store is local or not.

attributeMappingsarray of UserStoreAttributeResponse

User store attribute mappings.

UserStoreAttributeResponse​

Type: object

4 properties
NameTypeRequiredDescription
claimIdstring

Claim id of the attribute.

claimURIstring

Claim URI of the attribute.

mappedAttributestring

Mapped attribute name.

displayNamestring

Display name of the attribute.

FileUpload​

Type: object

1 property
NameTypeRequiredDescription
filestring (binary)

File uploaded during import.

Was this page helpful?