GCM Credentials (GET)

Retrieves Google Cloud Messaging (GCM) credentials of the application with the application ID, environment, and version.

Roles

Users in the following roles are authorized to perform this operation:

  • worklightadmin
  • worklightdeployer
  • worklightmonitor
  • worklightoperator

Method

GET

Path

/management-apis/1.0/runtimes/runtime-name/notifications/applications/application-name/gcmConf/application-env/application-version/

Example

https://www.example.com/worklightadmin/management-apis/1.0/runtimes/myruntime/notifications/applications/myapplication/gcmConf/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.

Produces

application/json, application/xml, text/xml

Response

The GCM Credentials of the application with the application ID, environment, and version.

JSON Example

{
  "apiKey" : "AIzaSyDSJrULbNZZzzZZzzxyX7ZTmnoRLkwiU",
  "productVersion" : "7.0.0",
  "senderId" : "9999999999999",
}

XML Example

<?xml version="1.0" encoding="UTF-8"?>
<gcmCredentials
  apiKey="AIzaSyDSJrULbNZZzzZZzzxyX7ZTmnoRLkwiU"
  productVersion="7.0.0"
  senderId="9999999999999"/>

Response Properties

The response has the following properties:

apiKey
The key value received from GCM.
productVersion
The exact product version.
senderId
The project ID received from GCM.

Errors

403
The user is not authorized to call this service.
404
The corresponding runtime is not found or not running.
500
An internal error occurred.