APNS Credentials (PUT)
Sets Apple Push Notification Service (APNS) credentials of the application with the application ID, environment, version, password, certificate file name, and certificate.
Description
The payload is the form data in which password, certificate file name, and certificate are submitted.
Roles
Users in the following roles are authorized to perform this operation:
- worklightadmin
- worklightdeployer
- worklightmonitor
- worklightoperator
Method
PUT
Path
/management-apis/1.0/runtimes/runtime-name/notifications/applications/application-name/apnsConf/application-env/application-version/
Example
https://www.example.com/worklightadmin/management-apis/1.0/runtimes/myruntime/notifications/applications/myapplication/apnsConf/android/1.0/?locale=de_DE
Path Parameters
- runtime-name
- The name of the runtime. This is the context root of the runtime web application, without the leading slash.
- application-name
- The name of the application.
- application-env
- The application environment.
- application-version
- The application version number.
Query Parameters
Query parameters are optional.
- locale
- The locale used for error messages.
Consumes
multipart/form-data
Produces
application/json, application/xml, text/xml
Form-data Parameters
- certificateFileName
- (string) The certificate file name.
- password
- (string) The certificate password.
- certificate
- (File) The certificate file.
Response
The status of set APNS credentials.
JSON Example
{
"productVersion" : {
"productVersion" : "7.0.0",
},
"project" : {
"name" : "PushNotifications",
},
"status" : "Success",
"type" : "SET_APNS_CREDENTIALS",
}
XML Example
<?xml version="1.0" encoding="UTF-8"?>
<setAPNSCredentialsStatus
status="Success"
type="SET_APNS_CREDENTIALS">
<productVersion productVersion="7.0.0"/>
<project name="PushNotifications"/>
</setAPNSCredentialsStatus>
Response Properties
The response has the following properties:
- productVersion
- The exact product version.
- project
- Project name.
- status
- The APNS credentials are saved successfully.
- type
- Transaction type.
The productVersion has the following properties:
- productVersion
- The exact product version
The project has the following properties:
- name
- Name of the project
Errors
403The user is not authorized to call this service.
404 The corresponding runtime is not found or not running.
500 An internal error occurred.