Add reader group
  • 02 Feb 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Add reader group

  • Dark
    Light

POST /readers/groups

Adds a reader group to the project.


Header

ParameterTypeDescription
api_tokenstringYou can get the REST API from Settings > Advanced > API tokens.

Body Parameters

ParameterRequiredTypeDescription
titleYesstringThe name of the reader group.
access_scope
Yes
object
Access scope of this reader group.
descriptionNostringDescription of the reader group.
associated_readersNostring[]List of reader IDs to be associated with this reader group.
associated_invited_sso_users
Nostring[]List of invitation IDs to be associated with this reader group. Applicable only for SSO readers.

Body Parameters > access_scope

ParameterRequiredTypeDescription
access_levelYesnumberThe access level for the reader. 0-None, 1-Category, 2-Version, 3-Project, 4-Language
categoriesConditionallyobject[]List of category scope objects. The field is required when access_level is set to 1-Category
project_versionsConditionally
string[]List of project version IDs the reader has access to. Mandatory when access_level is set to 2-Version.
languagesConditionally
object[]List of language scope objects. The field is required when access_level is set to 4-Language.

Body Parameters > access_scope > categories

ParameterRequiredTypeDescription
category_idYesstringThe category id to which the user should be given access.
project_version_idYesstringThe project version id to which the category belongs.
language_codeYesstringThe language to which the user should be given access.

Body Parameters > access_scope > languages

ParameterRequiredTypeDescription
project_version_idYesstringThe project version id to which the user should be given access.
language_codeYesstringThe language to which the user should be given access.

Sample Request

Providing access to particular categories.

{
	"title": "Students",
	"description": "Reader group for students",
	"associated_readers": [
		"9951f2e4-4fe3-47b9-b099-1aab99e1de76",
		"d7c9a42c-a1c8-40ed-bcaa-02110227b758"
	],
	"access_scope": {
		"access_level": 1,
		"categories": [
			"31dde13b-b944-4e3e-a325-2d004636bf5f",
			"e5f38015-bf19-413d-b76c-133388b9c3de"
		]
	}
}

Sample Response

{
	"data": {
		"id": "4c311d36-ca1e-43d4-a78b-82a3f7687a97"
	},
	"extension_data": null,
	"context": null,
	"success": true,
	"errors": [],
	"warnings": [],
	"information": []
}

Response Data

ParameterTypeDescription
idstringThe ID of the newly added reader group.

Was this article helpful?