Sharing
The sharing requests allows not only share the application with other users. Due to them you can literally manage accesses to the application.
There are only two sharing requests:
sharing/add
Due to this request, you can expand an application with other users. It contains token, user ID, application ID, and a number of sharing permission.
Request
Request Method | Content Type | Request URL |
---|---|---|
POST | Form Data | https://gudhub.com/GudHub/sharing/add |
It contains token, user ID, application ID, and a number of sharing permission.
Property | Type | Description |
---|---|---|
token | string |
using for getting access |
app_id | object |
application object, which is created |
user_id | number |
personal user ID |
sharing_permision | number |
rights to application which are granted to user |
Example:
app_id: 178
sharing_permission: 0
token: bbcvqhzgr.swms-_-.oj_vdia_bert.gkanyfww_cg
user_id: 28
Response
In response will be data about user and his permission.
{"user_id":28,"app_id":178,"permission":0}
Status Code
Name | Description |
---|---|
200 Ok | user has accessed the application |
710 | user have no rights for sharing |
sharing/update
This is the request that allows to update the user permission.
Request
Request Method | Content Type | Request URL |
---|---|---|
POST | Form Data | https://gudhub.com/GudHub/sharing/update |
This request contains all the same token, user ID, application ID, and a number of the new user permission.
Property | Type | Description |
---|---|---|
app_id | number |
contains ID of the application |
sharing_permission | number |
contains number of the permission |
token | string |
contains working token |
user_id | number |
contains ID of user whose access will be update |
Example:
app_id: 28753
sharing_permission: 3
token: lrxvzikg-mij-_szdgipxtjeybd.-v._amkdbdsxjk
user_id: 1571
Response
In response will be updated data about user and his new permission.
{"user_id":1571,"app_id":28753,"permission":3}
Status Code
Name | Description |
---|---|
200 Ok | user has accessed the application |
710 | user have no rights for updating |
Description of sharing_permision Value
Value | Meaning | Description |
---|---|---|
0 | Block | ban on having any rights to the certain application(it will not be displayed in this user`s app_list) |
1 | Read | rigth only to read data of a certain application |
2 | Read&Write | right to read and write in a certain application |
3 | Admin | right to add, delete, and update fields in application |
4 | Owner | defualt permission for application creating; is given to user that create this application; can all what can admin, delete and share application |