RAD Server Installations Resource

From RAD Studio
Jump to: navigation, search

Go Up to RAD Server Administrative API


The RAD Server database stores data about registered devices of an RAD Server Push Notifications application. You can access this information by using the registered Installations Resource.

You can send RAD Server Push Notifications to the RAD Server Installations (registered devices) by using the RAD Server Management Console Application.

Note: Use the TEMSClientAPI and the TCustomPushEvents components to register a new device (RAD Server Installation) and get data from the RAD Server Installations Resource.

Installations Resource Endpoints

Installations Resource exposes the following RAD Server Resource Endpoints:

Endpoint Method Name Resource Suffix HTTP Request Type Use

GetInstallations

--

HTTP GET

To retrieve all data from Installations Resource.

GetChannels

channels

HTTP GET

To retrieve the available channels to which the device is subscribed.

GetInstallationFields

fields

HTTP GET

To retrieve the field names of all RAD Server Installations.

GetInstallation

{id}

HTTP GET

To retrieve all data from a specific installation (registered device).
id is the unique RAD Server Installation identifier in the RAD Server database.

AddInstallation

--

HTTP POST

To add a new RAD Server Installation to the RAD Server database.

UpdateInstallation

{id}

HTTP PUT

To update the RAD Server Installation fields in the RAD Server database.
id is the unique RAD Server Installation identifier in the RAD Server database.

DeleteInstallation

{id}

HTTP DELETE

To delete an Installation from the RAD Server database.
id is the unique RAD Server Installation identifier in the RAD Server database.

GetInstallations Endpoint

Returns a list of RAD Server Installation data.

Use the QueryInstallations method to retrieve the list of RAD Server Installations.

If successful, the response from the RAD Server Engine provides a list of all RAD Server Installations with details about each one of them.

  • _id
  • deviceToken
  • deviceType
  • _meta (creator, created and updated fields)
  • channels
  • Custom fields (optional)

Example Response

This is an example response:

[  
   {  
      "_id":"384234D0-7CEC-4C29-8363-2CED46ACAD39",
      "deviceToken":"APA91bEIMc7Q8mhbGW8hJM44y5oOU3x-zAlJ37W_NThA1HOZeZY9AmMkziY-Ri-REh1m-Qa8Dw2paBDTwXXZNrY1qa8nAFQGjXYaiS_5hiJ3cZDL7OB1zkcya4JoJCpUccmvm49yXHmcqBKC32rk23PKib8ZYyBmX_wgZhwM_vBozhKJ821wXDI",
      "deviceType":"android",
      "_meta":{  
         "creator":"00000000-0000-0000-0000-000000000000",
         "created":"2015-02-06T10:05:01.000Z",
         "updated":"2015-02-06T10:06:34.000Z"
      },
      "description":"Nexus 7 device.",
      "channels":[  
         "News"
      ]
   },
   {  
      "_id":"92690E39-889C-4CC1-9B54-404ABB0604A3",
      "deviceToken":"APA91bG5a4a4HMACivEP2hH-x_7PUIW8GT4lvdHQWGfnh0KB7lRTwDMyS-2cHqw4gJGj_kSTXHt6DRiuA5Zr_26d1la83nlUfBuPUPXfq_8IAuQBH7thf22_X9RWCJbbcj27OEkUx0u5ylno-RTOFR1rTicxkBai6sYqPLzmvJeySwyDdyQnk9o",
      "deviceType":"android",
      "_meta":{  
         "creator":"00000000-0000-0000-0000-000000000000",
         "created":"2015-02-06T10:55:03.000Z"
      },
      "channels":[  

      ]
   }
]

GetChannels Endpoint

Returns a list the available channels to which the device is subscribed.

Use the RetrieveInstallationsChannelNames method to retrieve the list of available channels.

If successful, the response from the RAD Server Engine provides a list of all available channels.

Example Response

This is an example response:

[  
   "News",
   "Weather"
]

GetFields Endpoint

Retrieves the field names of all RAD Server Installations from the RAD Server database.

Use the RetrieveInstallationsFields method to retrieve the field names of all RAD Server Installations.

If successful, the response from the RAD Server Engine provides all the field names of the RAD Server Installation.

  • _id
  • deviceToken
  • deviceType
  • _meta (creator, created and updated fields)
  • channels
  • Custom fields (optional)

Example Response

This is an example response:

[  
   {  
      "name":"_id"
   },
   {  
      "name":"deviceToken"
   },
   {  
      "name":"deviceType"
   },
   {  
      "name":"_meta",
      "fields":[  
         {  
            "name":"creator"
         },
         {  
            "name":"created"
         },
         {  
            "name":"updated"
         }
      ]
   },
   {  
      "name":"channels"
   },
   {  
      "name":"description",
      "custom":true
   }
]

GetInstallation Endpoint

Retrieves all data from a given RAD Server Installation (identified by the id).

Your request must provide at least the following field:

  • _id

Use the RetrieveInstallations method to retrieve the fields of a RAD Server Installations.

If successful, the response from the RAD Server Engine provides all the field names of the RAD Server Installation.

  • _id
  • deviceToken
  • deviceType
  • _meta (creator, created and updated fields)
  • channels
  • Custom fields (optional)

Example Response

This is an example response for the RAD Server Installation id "384234D0-7CEC-4C29-8363-2CED46ACAD39"

{  
   "_id":"384234D0-7CEC-4C29-8363-2CED46ACAD39",
   "deviceToken":"APA91bEIMc7Q8mhbGW8hJM44y5oOU3x-zAlJ37W_NThA1HOZeZY9AmMkziY-Ri-REh1m-Qa8Dw2paBDTwXXZNrY1qa8nAFQGjXYaiS_5hiJ3cZDL7OB1zkcya4JoJCpUccmvm49yXHmcqBKC32rk23PKib8ZYyBmX_wgZhwM_vBozhKJ821wXDI",
   "deviceType":"android",
   "_meta":{  
      "creator":"00000000-0000-0000-0000-000000000000",
      "created":"2015-02-06T10:05:01.000Z",
      "updated":"2015-02-06T11:58:57.000Z"
   },
   "description":"Nexus 7 device",
   "channels":[  
      "News",
      "Weather"
   ]
}

AddInstallation Endpoint

Adds a new installation (registered device) to the RAD Server database.

Use the RegisterDevice method to register a new RAD Server Installation.

UpdateInstallation Endpoint

Updates the data of an existing RAD Server Installation that is stored in the RAD Server database.

Your request must provide at least the following field:

  • _id

Use the UpdateInstallation method to update the data of an existing RAD Server Installation.

DeleteInstallation Endpoint

Deletes an existing RAD Server Installation from the RAD Server database.

Your request must provide the following field:

  • _id

Use the DeleteInstallation method to delete an existing RAD Server Group.

RAD Server Installations Fields

Installations resource in RAD Server request and responses may include any combination of the following fields:

Item Example Description
"_id"
"384234D0-7CEC-4C29-8363-2CED46ACAD39"

Unique RAD Server Installation identifier in the RAD Server database.

"deviceToken"
"APA91bEIMc7Q8mhbGW8hJM44y5oOU3x-zAlJ37W[...]vBozhKJ821wXDI"

Unique RAD Server Installation identifier in the RAD Server database.

"deviceType"
"android"

Type of the device (ios, android, winrt, winphone, dotnet).

"_meta"
{
    "creator":"00000000-0000-0000-0000-000000000000",
    "created":"2015-02-06T10:05:01.000Z",
    "updated":"2015-02-06T10:06:34.000Z"
}
  • creator: RAD Server Installation creator in the RAD Server database.
  • created: Creation time of the RAD Server Installation.
  • updated: Time when the RAD Server Installation has been updated.
"channels"
[
    "News",
    "Weather"
]

List of available channels to which the device is subscribed.

Custom fields

"myCustomField": "My Custom Field description"

Additional stored information for the RAD Server Installation.

See Also