App
The App is the only one that can manage the Push API.
Without the Auth credentials it is not possible to use any Push API call, all of them are restricted and should be called by an agent that knows how to generate the Auth token.
Not implemented yet
There will be various security levels in order to manage diferent App types or platforms using the Push API.
Routes
/app
Creates a new app that can use the API.
Once the App is created, the return structure contains the secret that should be used to generate the Auth token.
| Param | Type | Required? | Description |
|---|---|---|---|
| name | string | true | Name of the app that will use the API. |
Response
{
"result": {
"name": "sample1",
"secret": "5417b18d88103f6e",
"id": 1
}
}
/app/:id
Gets the app information given the id.
No params expected.
Response
{
"result": {
"id": 1,
"name": "tviso",
"secret": "ed999e865f35e478"
}
}
/app/:id
Updates the app :id information with the given one.
| Params | Type | Required? | Description |
|---|---|---|---|
| name | string | true | New app name to update. |
Response
Updating name sample1 to test1.
{
"result": {
"id": 2,
"name": "test1",
"secret": "5417b18d88103f6e"
}
}
/app/:id
Deletes the app given its :id.
Response
Remember that if you delete the App you won't be able to use any Push API call.
{
"result": true
}
/apps
Retrives all the Apps stored of the database.
No params expected.
Response
{
"result": [
{
"id": 1,
"name": "sample1",
"secret": "ed299e465a378k7x"
},
{
"id": 2,
"name": "sample2",
"secret": "5417b18d88103f6e"
}
]
}
Updated less than a minute ago
