This section describes the REST API in detail.
To utilise Nokia Notifications REST API in your service, you need to know following:
HTTP Method |
Resource |
Description |
id |
to-app |
payload |
title |
expires-at |
alert |
ctype |
enc |
details |
---|---|---|---|---|---|---|---|---|---|---|---|
POST |
/nnapi/1.0/nid/{NID} |
x |
x |
x |
x |
x |
x |
x |
|||
POST |
/nnapi/1.0/bulk/nid |
x |
x |
x |
x |
x |
x |
x |
x |
||
PUT |
/nnapi/1.0/nid{NID} |
||||||||||
POST |
/nnapi/1.0/publish |
x |
x |
x |
x |
x |
x |
x |
|||
GET |
/nnapi/1.0/ping |
||||||||||
GET |
/nnapi/1.0/ping/nid{NID} |
||||||||||
GET |
/nnapi/version |
||||||||||
GET |
/nnapi/1.0/limits |
||||||||||
GET |
/nnapi/1.0/users |
Parameter |
Necessity |
Value |
Description |
---|---|---|---|
id |
Required |
Limited to 1024kb in production, 10kb in sandbox environment |
List of recipients, provided in a comma-separated list of NIDs. The parameter size is limited to 1024kb in production and 10kb in sandbox environment. |
to-app |
Required |
ID of the target application. |
|
payload |
Optional |
Max 1536 bytes |
Notification content. Payload can be max 1536 bytes long. System never touches this part (except for doing compression on the server side and decompression on the client side). |
title |
Optional |
Max length 140 bytes |
Notification title. Maximum length is 140 bytes. |
expires-at |
Optional |
Max value 1209600 seconds (14 days) |
If the recipient is not available this parameter defines the time in seconds the notification will be stored for the recipient. Maximum value is 1209600 seconds (14 days). |
alert |
Optional |
true or false (default false) |
Defines if an alert is to be triggered when notification is received. Valid values are true or false. Default value is false. |
ctype |
Optional |
Max length 255 bytes |
Specifies the content type of payload as a mime-type (e.g., application/xml, text/plain). Maximum length is 255 bytes. |
enc |
Optional |
Max length 32 bytes |
Defines the message content encoding (e.g., Base 64). Maximum length is 32 bytes. |