UnifiedPush RESTful Endpoint 1.0.3

Path: / registry / device / importer

API for uploading JSON file to allow massive device registration (aka import). The Endpoint is protected using HTTP Basic (credentials VariantID:secret).
 curl -u "variantID:secret"
   -v -H "Accept: application/json" -H "Content-type: multipart/form-data"
   -F "file=@/path/to/my-devices-for-import.json"
   -X POST
   https://SERVER:PORT/context/rest/registry/device/importer
 
The format of the JSON file is an array, containing several objects that follow the same syntax used on the /rest/registry/device endpoint.

Here is an example:

 [
   {
     "deviceToken" : "someTokenString",
     "deviceType" : "iPad",
     "operatingSystem" : "iOS",
     "osVersion" : "6.1.2",
     "alias" : "someUsername or email adress...",
     "categories" : ["football", "sport"]
   },
   {
     "deviceToken" : "someOtherTokenString",
     ...
   },
   ...
 ]
 


Method Summary
ResourceDescription
POST /registry/device/importerAPI for uploading JSON file to allow massive device registration (aka import).

Method Detail

API for uploading JSON file to allow massive device registration (aka import). The Endpoint is protected using HTTP Basic (credentials VariantID:secret).

 curl -u "variantID:secret"
   -v -H "Accept: application/json" -H "Content-type: multipart/form-data"
   -F "file=@/path/to/my-devices-for-import.json"
   -X POST
   https://SERVER:PORT/context/rest/registry/device/importer
 
The format of the JSON file is an array, containing several objects that follow the same syntax used on the /rest/registry/device endpoint.

Here is an example:

 [
   {
     "deviceToken" : "someTokenString",
     "deviceType" : "iPad",
     "operatingSystem" : "iOS",
     "osVersion" : "6.1.2",
     "alias" : "someUsername or email adress...",
     "categories" : ["football", "sport"]
   },
   {
     "deviceToken" : "someOtherTokenString",
     ...
   },
   ...
 ]
 

Input:
org.jboss.aerogear.unifiedpush.rest.registry.installations.ImporterForm
Output:
javax.ws.rs.core.Response
Consumes:
multipart/form-data
HTTP return codes:
200 - (OK) Successful submission of import job.
400 - (Bad Request) The format of the client request was incorrect.
401 - (Unauthorized) The request requires authentication.
404 - (Not Found) The requested Variant resource does not exist.

UnifiedPush RESTful Endpoint 1.0.3