Skip to content

Common Service

Service Id: Common To All Services

Note

Common action triggered by the use of header: platform6.request.common.action

1. Get Service Item Names Using Given App Key

Header key Description Value
platform6.request.common.action The common action to perform (required) list.names
appKey Select by given appKey (required)

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value JSON List Names

2. Get All Service Item Ids

Header key Description Value
platform6.request.common.action The common action to perform (required) list.all

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value JSON List Ids

3. Get Service Item State (AppKey & Name) Given Their Ids

Header key Description Value
platform6.request.common.action The common action to perform (required) state.get
ids JSON List Service Item Ids (required)

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value JSON List Service Item States

4. Upsert Service Item Using Given States and Ids

Header key Description Value
platform6.request.common.action The common action to perform (required) state.restore
state JSON List (required)
ids JSON List Service Item Ids (required)

A valid response will be:

Header key Description
platform6.response.status OK

5. Get Service Status

Header key Description Value
platform6.request.common.action The common action to perform (required) getservicestatus

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value Status Name
Status Names
SERVICE_STATE_INIT
SERVICE_STATE_STARTED
SERVICE_STATE_STARTED_RESTART
SERVICE_STATE_STOPPED
SERVICE_STATE_DESTROYED

6. List Service Item Headers Given Their App Key

Header key Description Value
platform6.request.common.action The common action to perform (required) listitems
appkey Service Item AppKey (required)

A valid response will be:

Header key Description
platform6.response.status OK
name.[index] Service Item Name
name.[description] Service Item Description [Language \uffff Text]
modifiedby.[index] Service Item Last Modified By [user email]
modifiedmillis.[index] Service Item Last Modified Time In Millis

Note

[index] is an integer starting from one

7. Count Service Items Given Their App Key

Header key Description Value
platform6.request.common.action The common action to perform (required) countitems
appkey Service Item AppKey (required)

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value Service Item Count

8. Add A Service Item Given App Key, Name and JSON Content

Header key Description Value
platform6.request.common.action The common action to perform (required) additem
appkey Service Item AppKey (required)
name Service Item Name (required)
json Service Item Content (required)

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value Service Item Count

9. Remove A Service Item Given App Key and Name

Header key Description Value
platform6.request.common.action The common action to perform (required) additem
appkey Service Item AppKey (required)
name Service Item Name (required)
ignoremissing Do not error if not exist (optional)

A valid response will be:

Header key Description
platform6.response.status true

10. Get A Service Item Given App Key and Name

Header key Description Value
platform6.request.common.action The common action to perform (required) getitem
appkey Service Item AppKey (required)
name Service Item Name (required)
contentmodeoverride Value of ContentModeOverride in response JSON (optional)

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value Service Item JSON Content
lastmodifiedby Service Item Last Modified By [user email]
lastmodifiedmillis Service Item Last Modified Time In Millis

11. Check If A Service Item Exists Given App Key and Name

Header key Description Value
platform6.request.common.action The common action to perform (required) existitem
appkey Service Item AppKey (required)
name Service Item Name (required)

A valid response will be:

Header key Description
platform6.response.status true