App Rest API
App requests are responsible for operations with the application. They allow you to create, update, and delete the application.
There are 4 requests in total:
app/create
Request for creating a new application.
Request
Request Method | Content Type | Request URL |
---|---|---|
POST |
Form Data |
https://gudhub.com/GudHub/api/app/create |
It contains user token and app object that in turn contains information about the application in a text format.
Property | Type | Description |
---|---|---|
app | object |
application object, which is created |
token | string |
using for getting access |
Example:
token:opkqqgo_lbvugkfu_cibljwozbsxishsentbyhrr
app:{
"app_name":"Template New",
"icon":{
"icon_id":"box",
"icon_color":"ffffff",
"gradient_up":"00CCF8",
"gradient_down":"00F8B2"
},
"views_list":[...],
"view_list":[...],
"items_list":[...],
"field_list":[...]
}
Response
In result you will get created application object.
{
"app_id":3751,
"app_name":"Test views",
"icon":{
"id":3689,
"icon_id":"box",
"icon_color":"ffffff",
"gradient_up":"00CCF8",
"gradient_down":"00F8B2"
},
"group_id":3761,
"trash":false,
"last_update":1502266215410,
"view_init":6876,
"privacy":1,
"views_list":[...],
"view_list":[...],
"items_list":[...],
"field_list":[...],
"file_list":[]
}
Status Code
Name | Description |
---|---|
200 Ok | application is created |
710 | user does not have rights to create application |
app/get
Request for updating and saving changes of the application and its data.
Request
Request Method | Content Type | Request URL |
---|---|---|
GET |
Query String Parameters |
https://gudhub.com/GudHub_Test/api/app/get |
It contains user token and app object.
Property | Type | Description |
---|---|---|
app_id | object |
application object, which is created |
token | string |
using for getting access |
Example:
token:opkqqgo_lbvugkfu_cibljwozbsxishsentbyhrr
client: browser
app_id:3751
Response
In reply will be existing application object.
{
"app_id":3751,
"app_name":"Test views",
"icon":{
"id":3689,
"icon_id":"box",
"icon_color":"ffffff",
"gradient_up":"00CCF8",
"gradient_down":"00F8B2"
},
"group_id":3761,
"trash":false,
"last_update":1502266215410,
"view_init":6876,
"privacy":1,
"views_list":[...],
"view_list":[...],
"items_list":[...],
"field_list":[...],
"file_list":[],
"keys_list":[
{
"key_id": 32,
"keychain_id": 123,
"parent_key": 125,
"fields":[{...}],
"filter_list": [{...}],
"rules": 1111
}
]
Status Code
Name | Description |
---|---|
200 Ok | application received |
710 | user does not have rights to preview application |
app/update
Request getting the application. That means it gives a possibility to display and edit the application.
Request
Request Method | Content Type | Request URL |
---|---|---|
POST |
Form Data |
https://gudhub.com/GudHub/api/app/update |
It contains in the body user token and app object.
Property | Type | Description |
---|---|---|
app | object |
application object, which is created |
token | string |
using for getting access |
Example:
token:opkqqgo_lbvugkfu_cibljwozbsxishsentbyhrr
app:{
"app_id":3751,
"app_name":"Test views",
"icon":{
"id":3689,
"icon_id":"box",
"icon_color":"ffffff",
"gradient_up":"00CCF8",
"gradient_down":"00F8B2"
},
"group_id":3761,
"trash":false,
"last_update":1502266215410,
"view_init":6876,
"privacy":1,
"views_list":[...],
"view_list":[...],
"items_list":[...],
"field_list":[...],
"file_list":[]
}
Response
As a result it returns updated application object.
{
"app_id":3751,
"app_name":"Test",
"icon":{
"id":3689,
"icon_id":"box",
"icon_color":"ffffff",
"gradient_up":"00CCF8",
"gradient_down":"00F8B2"
},
"group_id":3761,
"trash":false,
"last_update":1502266215410,
"view_init":6876,
"privacy":1,
"views_list":[...],
"view_list":[...],
"items_list":[...],
"field_list":[...],
"file_list":[]
}
Status Code
Name | Description |
---|---|
200 Ok | application update |
710 | user does not have rights to update application |
app/delete
Request for deleting an application. Actually, this data cannot be deleted, it just gets status trash:true.
Request
Request Method | Content Type | Request URL |
---|---|---|
POST |
Form Data |
https://gudhub.com/GudHub_Test/api/app/delete |
The request contains the user token and app object.
Property | Type | Description |
---|---|---|
app | object |
application object, which is created |
token | string |
using for getting access |
Example:
token:opkqqgo_lbvugkfu_cibljwozbsxishsentbyhrr
app_id:3751
Response
In reply will be a message about successful deleting of an application.
delete application with id=3751
Status Code
Name | Description |
---|---|
200 Ok | application is removed |
710 | user does not have rights to delete application |