Jump to: navigation, search

Query Service Extension Schema

ApiRef2.png GET /metadata/services/extensions
Available since: 8.0.200.00

Description

Queries an extension schema used for service resources. Your application must create a schema which defines the state extension before this extension can be used. For instance, if your application needs to fill in feedback data in some state, the first step is to create the corresponding schema which details the lists of attributes that compose this extension. See Extension for further details.

Operation

ID CV.WS.SRV.META.2
Method GET
URL
  • all: /metadata/services/extensions
  • /metadata/services/extensions/${extension-name}
Name   Type   Mandatory Description
URI Parameter
${extension-name} string no The unique name of the extension. If you do not specify the name, all the service schema are returned.


Information.png The name is not case-sensitive.

<references />

Response

The Context Management Service API answers with HTTP codes for every request. The following table shows the correct response for a successful request. See HTTP Response Codes and Errors for further details on the possible codes that this operation can return.

Response
HTTP code 200
HTTP message OK
Body
Extension Schema or Extension Schema[]

Example

Retrieve all the service extension schemas

Operation

 GET /metadata/services/

Result

  200 OK
 [
{
  "attributes": [
    {
      "default": "no discount",
      "encrypt": false,
      "length": 100,
      "mandatory": false,
      "name": "coupon",
      "type": "string",
      "unique": false
    },
    {
      "default": 5,
      "encrypt": false,
      "length": 0,
      "mandatory": true,
      "name": "amount",
      "type": "integer",
      "unique": false
    }      
  ],
  "name": "couponExtension",
  "type": "single-valued"
 },
{
"name" : "relatedOffers",
"attributes" : [ {
  "unique" : false,
  "encrypt" : false,
  "mandatory" : true,
  "name" : "offer_name",
  "length" : 50,
  "type" : "string"
}, {
  "unique" : false,
  "encrypt" : false,
  "mandatory" : false,
  "name" : "type",
  "length" : 50,
  "type" : "string"
}, {
  "unique" : false,
  "encrypt" : false,
  "mandatory" : false,
  "name" : "comments",
  "length" : 1024,
  "type" : "string"
} ],
"type" : "multi-valued"
}
]

Retrieve a single schema

Operation
Retrieve the couponExtension schema.

 GET /metadata/services/couponExtension

Result

 200 OK
{
  "attributes": [
    {
      "default": "no discount",
      "encrypt": false,
      "length": 100,
      "mandatory": false,
      "name": "coupon",
      "type": "string",
      "unique": false
    },
    {
      "default": 5,
      "encrypt": false,
      "length": 0,
      "mandatory": true,
      "name": "amount",
      "type": "integer",
      "unique": false
    }      
  ],
  "name": "couponExtension",
  "type": "single-valued"
 }
This page was last edited on November 23, 2017, at 14:24.
Comments or questions about this documentation? Contact us for support!