services.json

services.json file resides in a service’s root directory and describes how the service is constructed and operates.

Schema

{
    "id"                    : string,
    "description"           : string,
    "engine"                : string,
    "executable"            : string,
    "services": [           : object array,
        {
            "name"          : string,
            "description"   : string
        }
    ]
}

Properties

Property

Required

Type

Description

id

Required

string

ID of the service array.

Note
Typically, the value will be the name of the first service in services object array.

description

Optional

string

Description of the service array.

engine

Optional

string

Service type. This property is required when you develop an external native service.

executable

Optional

string

Name of an executable file. This property is required when you develop an external native service.

services

Required

object array

Services the app provides.

Typically, an app provides only one service. However, there may be reasons to provide multiple services within the same app.

-name

Required

string

Name of service on the webOS Luna Bus.

Note

The service name must begin with the app name. For example,

  • App name: com.example.myapplication

  • Service name: com.example.myapplication.myservice

-description

Optional

string

Description of the service.

Example

{
    "id": "com.test.testacct.test.service",
    "description": "Test Service",
    "engine": "native",
    "executable": "test_service",
    "services": [
        {
            "name": "com.test.testacct.test.service",
            "description": "Test Contact"
        }
    ]
}

Contents