Skip to content
watzenare edited this page Dec 22, 2014 · 20 revisions

PushApi Documentation

Welcome to the PushApi wiki, here you will learn the basis of the PushApi project in which you are interested to.

Note: The API documentation is in the writing process and it is not fully documented at all yet.

Content

Introduction

Back to index

How does API work

Back to index

API calls

App

Call Method Params Description
/app POST name (string) Creates a new app that can use the API
/app/:id GET - Get the app $id information
/app/:id PUT name (string) Updates app information with the given one
/app/:id DELETE - Deletes the app $idApp
/apps GET - Retrives all the apps registered in the API

User

Call Method Params Description
/user POST email (string) Creates a new user or retrives the user if it was created before
/user/:id GET - Gets the given user
/user/:id PUT email (string), android_id (string), ios_id (string) Updates the user with the given information
/user/:id DELETE - Deletes the given user
/users GET - Retrives all the users registered
/users POST emails (emails sorted in a list separated by coma) Creates new users given its emails (only valid mails)
/user/:id/subscribe/:idchannel POST - Subscribes a user into a channel
/user/:id/subscribed/:idchannel GET - Gets the subscription of the user if it is subscribed before
/user/:id/subscribed/:idchannel DELETE - Deletes a user subscription
/user/:id/subscribed GET - Retrives all the subscriptions that user has subscribed
/user/:id/preference/:idtheme POST option (0, 1, 2, 3) Creates the preference that user wants to have set with a given theme
/user/:id/preference/:idtheme GET Gets the preference of the user if it has set it
/user/:id/preference/:idtheme PUT option (0, 1, 2, 3) Updates user preference with the given value
/user/:id/preference/:idtheme DELETE - Deletes a user preference
/user/:id/preferences GET Retrives all the preferences that user has set

Channel

Call Method Params Description
/channel POST name (string) Creates a new channel or retrives the channel if it was created before
/channel/:id GET - Get the given channel information
/channel/:id PUT name (string) Updates the channel information with the given one
/channel/:id DELETE - Deletes the given channel
/channels GET - Retrives all the channels registered

Theme

Call Method Params Description
/theme POST range (unicast, multicast, broadcast) Creates a new theme or retrives the theme if it was created before
/theme/:id GET - Gets the given theme information
/theme/:id PUT range (unicast, multicast, broadcast) Updates the theme information with the given one
/theme/:id DELETE - Deletes the given theme
/themes GET - Retrives all the themes registered
/theme/range/:range GET - Retrives all the themes registered with the given :range

Subject

Call Method Params Description
/subject POST theme_name (string), description (string) Creates a new subjector retrives the subjectif it was created before
/subject/:id GET - Get the given subject information
/subject/:id PUT theme_name (string), description (string) Updates the subjectinformation with the given one
/subject/:id DELETE - Deletes the given subject
/subjects GET - Retrives all the subjects registered

Send

Call Method Params Description
/send POST message (required), theme (required), user_id (optional), channel (optional) Sends the notification to the target given its params

Back to index

More

Back to index

Thank you!