Groups
This endpoint is for updating/modifying the user details of a given user id
Query
GET /api/1.0/groups
| No parameters |
|---|
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Output example:
{
"list":[
{
"id":889,
"groupName":"Default"
},
{
"id":890,
"groupName":"group1"
},
{
"id":891,
"groupName":"group2"
}
]
}
|
| 400 BAD_REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"https://www.knowi.com/api/1.0/groups/
User Groups
This endpoint returns a listing the groups of a specific user of a given user id
Query
GET /api/1.0/users/<user_id>/groups
| Parameter | Comments |
|---|---|
| user_id | User id of User to get Groups |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Output example:
{
"list":[
{
"id":889,
"groupName":"Default"
},
{
"id":890,
"groupName":"group1"
},
{
"id":891,
"groupName":"group2"
}
]
}
|
| 400 BAD_REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"https://www.knowi.com/api/1.0/users/10001/groups/
Group Details
This endpoint returns all the groups of a given group id
Query
GET /api/1.0/groups/<group_id>
| Parameter | Comments |
|---|---|
| group_id | Group id of Group to get |
| withSharing | Optional query parameter, value (boolean) true/false. The default value is false. If true, then output will contain list of assets shared into group, and also autoShareUsers field with list of Users which autoShared into this group |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Output example:
|
| 400 BAD_REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"https://www.knowi.com/1.0/groups/10001?withSharing=true
User Groups
This endpoint returns listing of all the groups which are assigned to a specific user
Query
GET /api/1.0/users/<user_id>/groups/<group_id>
| Parameter | Comments |
|---|---|
| user_id | User id of User to get specified Group in it |
| group_id | Group id of Group to get info about inside specified User |
| withSharing | Optional query parameter, value (boolean) true/false. The default value is false. If true, then output will contain list of assets shared into group, and also autoShareUsers field with list of Users which autoShared into this group |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Output example:
|
| 400 BAD_REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"https://www.knowi.com/api/1.0/users/10001/groups/90002?withSharing=true
Creating Group
This endpoint is for creating a new group
Query
POST /api/1.0/groups/
| Parameter | Comments |
|---|---|
| groupName | Group name of new group |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Return created group json info (same as "Get group" command). Output example:
{
"id":890,
"groupName":"group1"
}
|
| 400 BAD_REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -d "groupname=newGroupName1"https://www.knowi.com/api/1.0/groups
Create a Group with User
This endpoint is for creating a group with a user of a given user id
Query
POST /api/1.0/users/<user_id>/groups/
| Parameter | Comments |
|---|---|
| user_id | The user id of User to create Group in it |
| groupName | Group name of new group |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Return created group json info (same as "Get group" command). Output example:
{
"id":890,
"groupName":"group1"
}
|
| 400 BAD_REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -d "groupname=newGroupName1"https://www.knowi.com/api/1.0/users/10001/groups
Deleting Group
This endpoint is for deleting a specific group of a given group id
Query
DELETE /api/1.0/groups/<group_id>
| Parameter | Comments |
|---|---|
| group_id | Group id of Group to delete |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | No response body |
| 400 BAD_REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X DELETEhttps://www.knowi.com/api/1.0/groups/895
Delete Group of specified User
This endpoint is for deleting a group that is assigned to a user
Query
DELETE /api/1.0/users/<user_id>/groups/<group_id>
| Parameter | Comments |
|---|---|
| user_id | The user id of User to delete Group in it |
| group_id | Group id of Group to delete |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | No response body |
| 400 BAD_REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X DELETEhttps://www.knowi.com/api/1.0/users/10001/groups/895
Edit Group
This endpoint is for deleting a group of a given group id
Query
PUT /api/1.0/groups/<group_id>
| Parameter | Comments |
|---|---|
| group_id | Group id of Group to edit |
| groupName | New group name of Group |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Return updated group json info (same as "Get group" command). Output example:
{
"id":890,
"groupName":"group1"
}
|
| 400 BAD_REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X PUT -d "groupName=updatedGroupName1"https://www.knowi.com/api/1.0/groups/897
Edit Group of selected User
This endpoint is for upading/modifying a group of the selected user of a given group id
Query
PUT /api/1.0/users/<user_id>/groups/<group_id>
| Parameter | Comments |
|---|---|
| user_id | User id where edit the Group |
| group_id | Group id of Group to edit |
| groupName | New group name of Group |
Response
| HTTP Status | Response |
|---|---|
| 200 OK | Return updated group json info (same as "Get group" command). Output example:
{
"id":890,
"groupName":"group1"
}
|
| 400 BAD_REQUEST |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 401 UNAUTHORIZED |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Common error details:
|
| 403 FORBIDDEN |
{ "message": <Error details>, "documentation_url": <Documentation link> }
Error details:
|
Example
curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X PUT -d "groupName=updatedGroupName1"https://www.knowi.com/api/1.0/users/10001/groups/897