Skip to content

Access Management API (v3)

Download OpenAPI description
Languages
Servers
Sandbox URL
https://api-ext-sboxmeta.partners.spotnana.com
Spotnana mock server
https://developer.spotnana.com/_mock/openapi/rbacapi

User Groups

APIs to manage use groups.

Operations

List user groups for company

Request

This endpoint provides list of user groups of a company, with filtering, sorting, and pagination support.

Security
Bearer
Path
companyIdstring(uuid)required

Identifier of the company.

Example: 1234a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
searchTextstring

Query text to search user groups. The match would be case-insensitive.

Example: "Company Admins"
paginationobject(OffsetBasedPaginationRequestParams)required

Pagination information for request.

pagination.​offsetinteger(int32)>= 0

The starting index in the list from which results are returned. The value must be greater than or equal to 0.

Default 0
pagination.​limitinteger(int32)>= 1

Maximum number of results to be fetched.

Default 100
sortParamsobject(UserGroupSortParams)

Sorting related parameters.

filtersArray of objects(ListUserGroupFilter)

List of filters. User groups matching with any filter would be returned.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093947/user-groups/list \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchText": "Company Admins",
    "pagination": {
      "offset": 0,
      "limit": 100
    },
    "sortParams": {
      "sortBy": "NAME",
      "sortOrder": "DESC"
    },
    "filters": [
      {
        "userGroupIds": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
userGroupsArray of objects(RoleUserGroup)required

User groups matching with the request.

userGroups[].​idstring(uuid)required

User group identifier.

Example: "4974a66b-7493-4f41-908c-58ba81093947"
userGroups[].​namestringrequired

Name of the user group.

Example: "Company Admins"
userGroups[].​descriptionstringrequired

A description of the user group.

Example: "Group for managing the company settings."
userGroups[].​companyIdstring(uuid)required

Company ID of the user group.

Example: "1234a66b-7493-4f41-908c-58ba81093653"
userGroups[].​createdAtobject(DateTimeOffset)required

Date and time when the user group was created.

userGroups[].​createdAt.​iso8601string^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01...required
Example: "2017-07-21T17:32Z"
userGroups[].​updatedAtobject(DateTimeOffset)required

Date and time when the user group was last updated.

userGroups[].​updatedAt.​iso8601string^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01...required
Example: "2017-07-21T17:32Z"
userGroups[].​createdByobject(Reference)required

User who created the user group.

userGroups[].​createdBy.​idstring(uuid)required
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
userGroups[].​createdBy.​namestring
Example: "Name"
userGroups[].​updatedByobject(Reference)required

User who last updated the user group.

userGroups[].​updatedBy.​idstring(uuid)required
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
userGroups[].​updatedBy.​namestring
Example: "Name"
userGroups[].​isUnmodifiableboolean

Whether the group is not modifiable. This would be set true only for platform created groups. Only group name, description and assigned roles & scopes can not be modified but members can still be updated.

Default false
paginationobject(OffsetBasedPaginationResponseParams)required

Pagination information for response.

pagination.​totalNumResultsinteger(int32)required

Total number of results.

Response
application/json
{ "userGroups": [ {} ], "pagination": { "totalNumResults": 0 } }

Create user group

Request

This endpoint is used to create user groups.

Security
Bearer
Path
companyIdstring(uuid)required

Company ID of the user group.

Example: 1234a66b-7493-4f41-908c-58ba81093653
Bodyapplication/jsonrequired
namestringrequired

Name of the user group.

Example: "Company Admins"
descriptionstringrequired

A description of the user group.

Example: "Group for managing the company settings."
curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093653/user-groups \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Company Admins",
    "description": "Group for managing the company settings."
  }'

Responses

OK

Bodyapplication/json
idstring(uuid)required
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
Response
application/json
{ "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3" }

Read user group

Request

This endpoint returns user group information for given group ID.

Security
Bearer
Path
companyIdstring(uuid)required

Company ID of the user group.

Example: 1234a66b-7493-4f41-908c-58ba81093653
groupIdstring(uuid)required

Identifier for the user group.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X GET \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093653/user-groups/4974a66b-7493-4f41-908c-58ba81093947 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idstring(uuid)required

User group identifier.

Example: "4974a66b-7493-4f41-908c-58ba81093947"
namestringrequired

Name of the user group.

Example: "Company Admins"
descriptionstringrequired

A description of the user group.

Example: "Group for managing the company settings."
companyIdstring(uuid)required

Company ID of the user group.

Example: "1234a66b-7493-4f41-908c-58ba81093653"
createdAtobject(DateTimeOffset)required

Date and time when the user group was created.

createdAt.​iso8601string^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01...required
Example: "2017-07-21T17:32Z"
updatedAtobject(DateTimeOffset)required

Date and time when the user group was last updated.

updatedAt.​iso8601string^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01...required
Example: "2017-07-21T17:32Z"
createdByobject(Reference)required

User who created the user group.

createdBy.​idstring(uuid)required
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
createdBy.​namestring
Example: "Name"
updatedByobject(Reference)required

User who last updated the user group.

updatedBy.​idstring(uuid)required
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
updatedBy.​namestring
Example: "Name"
isUnmodifiableboolean

Whether the group is not modifiable. This would be set true only for platform created groups. Only group name, description and assigned roles & scopes can not be modified but members can still be updated.

Default false
Response
application/json
{ "id": "4974a66b-7493-4f41-908c-58ba81093947", "name": "Company Admins", "description": "Group for managing the company settings.", "companyId": "1234a66b-7493-4f41-908c-58ba81093653", "createdAt": { "iso8601": "2017-07-21T17:32Z" }, "updatedAt": { "iso8601": "2017-07-21T17:32Z" }, "createdBy": { "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3", "name": "Name" }, "updatedBy": { "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3", "name": "Name" }, "isUnmodifiable": false }

Delete user group

Request

This endpoint deletes a user group by ID.

Security
Bearer
Path
companyIdstring(uuid)required

Company ID of the user group.

Example: 1234a66b-7493-4f41-908c-58ba81093653
groupIdstring(uuid)required

Identifier for the user group.

Example: 4974a66b-7493-4f41-908c-58ba81093947
curl -i -X DELETE \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093653/user-groups/4974a66b-7493-4f41-908c-58ba81093947 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Response
No content

Update user group

Request

Security
Bearer
Path
companyIdstring(uuid)required

Company ID of the user group.

Example: 1234a66b-7493-4f41-908c-58ba81093653
groupIdstring(uuid)required

Identifier for the user group.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
namestringrequired

Name of the user group.

Example: "Company Admins"
descriptionstringrequired

A description of the user group.

Example: "Group for managing the company settings."
curl -i -X PUT \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093653/user-groups/4974a66b-7493-4f41-908c-58ba81093947 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Company Admins",
    "description": "Group for managing the company settings."
  }'

Responses

OK

Response
No content

List user group members

Request

This endpoint provides a list of members in a user group with filtering, sorting, and pagination support.

Security
Bearer
Path
companyIdstring(uuid)required

Company ID of the user group.

Example: 1234a66b-7493-4f41-908c-58ba81093653
groupIdstring(uuid)required

Identifier for the user group.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
paginationobject(OffsetBasedPaginationRequestParams)required

Pagination information for request.

pagination.​offsetinteger(int32)>= 0

The starting index in the list from which results are returned. The value must be greater than or equal to 0.

Default 0
pagination.​limitinteger(int32)>= 1

Maximum number of results to be fetched.

Default 100
sortParamsobject(UserGroupMemberSortParams)

Sorting related parameters.

filtersArray of objects(ListUserGroupMemberFilter)

List of filters. Members matching with any filter would be returned.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093653/user-groups/4974a66b-7493-4f41-908c-58ba81093947/members \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "pagination": {
      "offset": 0,
      "limit": 100
    },
    "sortParams": {
      "sortBy": "ADDED_AT",
      "sortOrder": "DESC"
    },
    "filters": [
      {
        "addedAfter": {
          "iso8601": "2017-07-21T17:32Z"
        },
        "addedBefore": {
          "iso8601": "2017-07-21T17:32Z"
        },
        "userIds": [
          "1234a66b-7493-4f41-908c-58ba81093947"
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
membersArray of objects(UserGroupMember)required

List of user group members with their details.

members[].​userIdstring(uuid)required

The ID of the user who is a member of the group.

Example: "1234a66b-7493-4f41-908c-58ba81093947"
members[].​addedAtobject(DateTimeOffset)required

The date and time when the user was added to the group.

members[].​addedAt.​iso8601string^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01...required
Example: "2017-07-21T17:32Z"
paginationobject(OffsetBasedPaginationResponseParams)required

Pagination information for response.

pagination.​totalNumResultsinteger(int32)required

Total number of results.

Response
application/json
{ "members": [ {} ], "pagination": { "totalNumResults": 0 } }

Update user group members

Request

This endpoint updates the members of a user group.

Security
Bearer
Path
companyIdstring(uuid)required

Company ID of the user group.

Example: 1234a66b-7493-4f41-908c-58ba81093653
groupIdstring(uuid)required

Identifier for the user group.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
userIdsToAddArray of strings(uuid)required

List of user ids to be added to the user group.

Example: ["1234a66b-7493-4f41-908c-58ba81093947"]
userIdsToRemoveArray of strings(uuid)required

List of user ids to be removed from the user group.

Example: ["4974a66b-7493-4f41-908c-58ba81093947"]
curl -i -X PATCH \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093653/user-groups/4974a66b-7493-4f41-908c-58ba81093947/members \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "userIdsToAdd": [
      "1234a66b-7493-4f41-908c-58ba81093947"
    ],
    "userIdsToRemove": [
      "4974a66b-7493-4f41-908c-58ba81093947"
    ]
  }'

Responses

Updated Successfully

Response
No content

List user groups for user

Request

This endpoint provides list of user groups of a user, with filtering, sorting, and pagination support.

Security
Bearer
Path
userIdstring(uuid)required

Identifier of the user.

Example: 1234a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
searchTextstring

Query text to search user groups. The match would be case-insensitive.

Example: "Company Admins"
paginationobject(OffsetBasedPaginationRequestParams)required

Pagination information for request.

pagination.​offsetinteger(int32)>= 0

The starting index in the list from which results are returned. The value must be greater than or equal to 0.

Default 0
pagination.​limitinteger(int32)>= 1

Maximum number of results to be fetched.

Default 100
sortParamsobject(UserGroupSortParams)

Sorting related parameters.

filtersArray of objects(ListUserGroupFilter)

List of filters. User groups matching with any filter would be returned.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/users/1234a66b-7493-4f41-908c-58ba81093947/user-groups \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchText": "Company Admins",
    "pagination": {
      "offset": 0,
      "limit": 100
    },
    "sortParams": {
      "sortBy": "NAME",
      "sortOrder": "DESC"
    },
    "filters": [
      {
        "userGroupIds": [
          "497f6eca-6276-4993-bfeb-53cbbbba6f08"
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
userGroupsArray of objects(RoleUserGroup)required

User groups matching with the request.

userGroups[].​idstring(uuid)required

User group identifier.

Example: "4974a66b-7493-4f41-908c-58ba81093947"
userGroups[].​namestringrequired

Name of the user group.

Example: "Company Admins"
userGroups[].​descriptionstringrequired

A description of the user group.

Example: "Group for managing the company settings."
userGroups[].​companyIdstring(uuid)required

Company ID of the user group.

Example: "1234a66b-7493-4f41-908c-58ba81093653"
userGroups[].​createdAtobject(DateTimeOffset)required

Date and time when the user group was created.

userGroups[].​createdAt.​iso8601string^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01...required
Example: "2017-07-21T17:32Z"
userGroups[].​updatedAtobject(DateTimeOffset)required

Date and time when the user group was last updated.

userGroups[].​updatedAt.​iso8601string^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01...required
Example: "2017-07-21T17:32Z"
userGroups[].​createdByobject(Reference)required

User who created the user group.

userGroups[].​createdBy.​idstring(uuid)required
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
userGroups[].​createdBy.​namestring
Example: "Name"
userGroups[].​updatedByobject(Reference)required

User who last updated the user group.

userGroups[].​updatedBy.​idstring(uuid)required
Example: "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3"
userGroups[].​updatedBy.​namestring
Example: "Name"
userGroups[].​isUnmodifiableboolean

Whether the group is not modifiable. This would be set true only for platform created groups. Only group name, description and assigned roles & scopes can not be modified but members can still be updated.

Default false
paginationobject(OffsetBasedPaginationResponseParams)required

Pagination information for response.

pagination.​totalNumResultsinteger(int32)required

Total number of results.

Response
application/json
{ "userGroups": [ {} ], "pagination": { "totalNumResults": 0 } }

Roles

APIs to manage roles.

Operations