Table of Contents |
---|
...
Property | Sub-property | Values | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
name | {category name} | name of the category. | |||||||||
pid | {parent category id} | under which parent category, this category should get created. | |||||||||
Context |
or
|
or
|
| ||||||||
enbaleGroups | true / false | If set true then, It will be used to create groups to add privileges to a certain set of user (according to our requirement) | |||||||||
groups (optional) |
|
|
| ||||||||
privileges |
| ||||||||||
copytoChildren | true/false |
| |||||||||
copyFromCategory | {category_id} |
| |||||||||
copytoChildren | true / false | If set, it will take the rules from the given category. | |||||||||
copyFromCategory | category_id, from where it should take the privileges. groups are optional when category_id mention here. It will copy the group & privileges from category_id | ||||||||||
subcategories | categories which is gonna be created under the parent category | ||||||||||
name | Example: “Announcement“, “General discussion“ | name of the subcategory | |||||||||
pid | parent category id under which the sub-category will be created | ||||||||||
description | description of the sub-category | ||||||||||
context |
|
| this is to communicate with the mapping table. | ||||||||
privileges | This is to override the privileges given at category level for group or user | ||||||||||
copyFromCategory | category_id, from where it should take the privileges. | ||||||||||
groups |
|
| It will be used to define certain set of privileges so that it can be used for the categories. this is optional. | ||||||||
users |
|
| the set of users, the privilges gonaa be set for. |
...
Code Block |
---|
{ "privileges": ["groups:topics:reply", "groups:topics:create"], "groups": ["guests", "Category Owner"] } |
List of privileges
Privilege | Value |
---|---|
| true/false |
| true/false |
| true/false |
| true/false |
| true/false |
| true/false |
| true/false |
| true/false |
| true/false |
| true/false |
| true/false |
| true/false |
| true/false |
| true/false |
| true/false |
Get groups List
To get list of groups, follow the below CURL
Code Block |
---|
curl --location --request GET 'https://staging.sunbirded.org/discussions/api/groups' \
--header 'Cookie: express.sid=s%3AqiNDVx5w84QRoUGABEkEdq1cqO7bXP_y.MMB8cjhTP19d9Zv%2B%2FxiBtqctd0M%2FY7eQk9Q0tQSLqqc' |
Add User into group
We can add user into a particular group manually, Followthis CURL
...