For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Push Application (POST)
Creates a new server application for the push service.
Description
The applicationId is an unique application ID for this application. Application is a parent resource for devices, subscriptions, tags and messages. The application must be created before accessing any of the child resources. If the application is deleted, all the children are deleted. The application holds the configurations, such as the Apple Push Notification Service (APNS) and Google Cloud Message (GCM) configuration, which is required by the push service to send messages. The API first creates the application and then sets the APNS and GCM settings.
Method
POST
Path
/apps/
Example
https://example.com:443/imfpush/v1/apps/
Header Parameters
Some header parameters are optional.
- Accept-Language
- (Optional) The preferred language to use for error messages. Default:en-US
- Authorization
- The token with the scope "apps.write" and "push.application.<applicationId>" obtained using the confidential client in the format Bearer token.. This parameter has to be mandatorily set.
- Content-Type
- Specify the JSON content type. For example: application/json. This parameter has to be mandatorily set.
Produces
application/json
Payload
The details of the application.
JSON Example
{ "applicationId" : "testApp", "enabled" : "true", }
Payload Properties
The payload has the following properties:
- applicationId
- The application Id.
- enabled
- Optinal. The status of the applicaton. Default is true
Response
The details of the application.
JSON Example
{ "applicationId" : "testApp", "enabled" : "true", }
Response Properties
The response has the following properties:
- applicationId
- The application Id.
- enabled
- The status of the application.
Errors
400Bad Request - The request was not understood by the push server. An invalid JSON could result in this error code.401
Unauthorized - The caller is either not authenticated or not authorized to make this request.405
Unsupported Content type - The content type specified in Content-Type header is not application/json.406
Unsupported Accept type - The content type specified in Accept header is not application/json.500
An internal error occurred.
Parent topic: REST API for the MobileFirst Server push service