services.json

Version added 09-Oct-2016| Modified 15-Oct-2018

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

Schema

{
    "id": string,
    "description": string,
    "services":   [{
        "name"	        : string,
        "description"   : string
    }]
}

Properties

Property

Required

Type

Description

id

Required

string

ID of the service array.

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

description

Optional

string

Description of the service array.

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.

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",
   "services":[
      {
         "name":"com.test.testacct.test.service",
         "description":"Test Contact"
      }
   ]
}
Except as noted, this content is licensed under Creative Commons Attribution 4.0 and sample code is licensed under Apache License 2.0.