Jump to: navigation, search

_offline_code

Section: get
Default Value: 503
Valid Values: HTTP code
Changes Take Effect: Immediately


HTTP code to return when GMS is OFFLINE.

_online_code

Section: get
Default Value: 200
Valid Values: HTTP Code
Changes Take Effect: Immediately


HTTP code to return when GMS is ONLINE.

_type

Section: no category
Default Value:
Valid Values: builtin,ors
Changes Take Effect: Immediately

This option is mandatory.

  • For Genesys Mobile Services-based services: builtin
  • For Orchestration Server-based services: ors

_service

Section: no category
Default Value:
Valid Values: String
Changes Take Effect: Immediately

This option is mandatory.

  • For Genesys Mobile Services-based services: The name of the matching service.
  • For Orchestration Server-based services: The URL of the service's SCXML application.
  • Other SCXML Callback services: The URL of the service's SCXML callback application. In that case, you must set _service_type to callback.

Get and Basic Get

Type: builtin



This is a get service that returns node information. You can use the get service (with the associated Service Template) to isolate a GMS node based on GMS status. This service has the following characteristics:

  • It returns an HTTP response code of either 200 OK or 503 Service Unavailable, by default.
  • For 200 OK responses, it also returns all options specified in the configuration.

You can create a service of this type in your environment, and configure your load balancer to use the service as the health check. To take a node out of service (for load balancing purposes and based on your load balancer settings), simply configure the service to return the required HTTP code (503, 404, and so on).

Sequence Diagrams

[+] Show diagrams

Upload and Configure the Get Service

Using the Service Templates Interface, load the Get Service service template, and configure the Get service.

The Mobile Engagement UI provides the following attributes:

Option Description
_service = get
  • For Genesys Mobile Services-based services: The name of the matching service.
  • For Orchestration Server-based services: The URL of the service's SCXML application.
  • Other SCXML Callback services: The URL of the service's SCXML callback application. In that case, you must set _service_type to callback.

_type = builtin
  • For Genesys Mobile Services-based services: builtin
  • For Orchestration Server-based services: ors

_online_code HTTP code to return when GMS is ONLINE.

_offline_code HTTP code to return when GMS is OFFLINE.

You can also add any custom values as key-value pairs by clicking Add New in your Get service. These custom values will be returned in the service responses.

Warning
Do not use a leading underscore with the custom parameters (for example, _my_custom_key). Custom parameters with leading underscores will not be returned in responses from the service.

GMS-Get-AddCutomParams.png

Get API

Enable / Disable Node

Enables changing the GMS node status:

  • ONLINE: GMS is OK to process requests.
  • OFFLINE: GMS is running, accepts requests, but Load Balancer will be aware that it will need to remove this GMS from the active GMS list (for future maintenance). The Application in Solution Control Interface (SCI) will appear as Suspended.
  • SHUTDOWN: GMS shuts down.
Important
The following two URLs are protected by Basic Authentication:
  • POST http://127.0.0.1:8080/genesys/1/admin/node/changestatus/OFFLINE
  • POST http://127.0.0.1:8080/genesys/1/admin/node/changestatus/ONLINE

Operation

Method POST
URL /genesys/1/admin/node/changestatus/{status}
Parameter   Type   Mandatory Description
URI Parameters
status string mandatory ONLINE, OFFLINE, SHUTDOWN

Response

HTTP code 200
HTTP message OK

Get Node Status

Operation

Method GET
URL /genesys/1/service/{serviceName}
Parameter   Type   Mandatory Description
URI Parameters
serviceName string mandatory Name of the builtin "GET" service defined in Service Management UI.

Response

HTTP code 200
HTTP message OK
Body A JSON object with list of defined parameters

Example

To perform this request, you must first create a service of type Get in the Admin UI, called LoadBalancer-checker.

GET http://127.0.0.1:8080/genesys/1/service/LoadBalancer-checker HTTP/1.1
Accept-Encoding: gzip,deflate
gms_user: dd
Host: 127.0.0.1:8080
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Response in case of GMS being online:

HTTP/1.1 200 OK
Date: Tue, 12 Nov 2013 15:38:55 GMT
Pragma: no-cache
Cache-Control: no-cache
Cache-Control: no-store
Content-Type: application/json;charset=UTF-8
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
{"custom_parameter_1":"value1","custom_parameter_2":"value2"}

Basic Get Service

This is a basic_get service that returns service information. You can use the basic_get service to isolate a GMS service based on the Configuration Manager option. This service has the following characteristics:

  • It returns an HTTP response code based on the result option defined in Configuration Manager. If the result is 404, a 404 error will be thrown on the service response.
  • It returns a JSON list of values defined in Configuration Manager if the value of the result option is 200.

Example

The following table shows an example for the section service.basicget service in Configuration Manager:

Option Name Option Value Description
_service basic_get Service name.
_type builtin Genesys Mobile Services-based services.
error_code 404 Not Found HTTP error code.
result 404 HTTP response code.

Where:

Option name Option type Restriction on value Description
result String Mandatory

Valid values: 200,401,403,404,503, and so on.

A valid HTTP response code (See rfc2616). If result=200, the response body will contain a JSON list of options defined in Configuration Manager (options that do not have a leading underscore, for example, error_code or result).


Example of response:

[service.basic_get]
_service=basic_get
_type=builtin
error_code=200 OK
result=200
HTTP Response:
 
{
    "result": "200",
    "error_code": "200 OK"
}

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on April 11, 2018, at 10:34.