Jump to: navigation, search

Query Profile Extension Schema

Important
Prerequisites: You need to enable profiles in UCS.
GET /metadata/profiles/extensions

Description

Queries the schemas of the given profile extension.

Operation

Prerequisites: The Profile Extension Schema resource exists.
Important
To create the profile extension schema, use the Create Profile Extension Schema operation.
Query Profile Extensions Schema
ID CV.WS.PROF.META.3
Method GET
URL
  • All: /metadata/profiles/extensions
  • /metadata/profiles/extensions/${extension-name}
Name   Type   Mandatory Description
URI Parameter
${extension-name} string no The extension name, if a specific extension should be returned.
Important
This name is not case-sensitive.

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 /metadata/profiles/extensions
Returns an array of the following fields:
  • name: the unique extension name.
  • type: "single-valued" or "multi-valued".
  • required: true or false
  • attributes: Attribute Schema[].
/metadata/profiles/extensions/${extension-name}
Extension Schema or Extension Schema[]

Example

Get all extension schemas

Operation

 GET /metadata/profiles/extensions

Result

200 OK
[
{
   "name":"Phone",
   "type":"multi-valued",    
   "attributes": [
       {"name":"PhoneType","type":"integer","default":0,"mandatory":"true"},
       {"name":"prefix","type":"string","length":"3","default":"555",},
       {"name":"PhoneNumber","type":"integer","length":15,"mandatory":"true"},
       {"name":"description","type":"string","length":32,"mandatory":"true"},
       {"name":"start_availabilty","type":"datetime"},
       {"name":"end_availabilty","type":"datetime", "mandatory":"false"}
       ]
},
{
   "name":"Address",
   "type":"single-valued",    
   "attributes": [
       {"name":"AddressType","type":"integer","default":0},
       {"name":"Address","type":"string","length":256},
       {"name":"City","type":"string","length":32},
       {"name":"County","type":"string","length":32},
       {"name":"PostCode","type":"string", "length":10},
       {"name":"Country","type":"string","length":32}
       ]
} ]

Get a single extension schema

Operation

 GET /metadata/profiles/extensions/Phone

Result

200 OK
{
   "name":"Phone",
   "type":"multi-valued",
   "attributes": [
       {"name":"PhoneType","type":"integer","default":0,"mandatory":"true"},
       {"name":"prefix","type":"string","length":"3","default":"555",},
       {"name":"PhoneNumber","type":"integer","length":15,"mandatory":"true"},
       {"name":"description","type":"string","length":32,"mandatory":"true"},
       {"name":"start_availabilty","type":"datetime"},
       {"name":"end_availabilty","type":"datetime", "mandatory":"false"}
   ]
}

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on 7 September 2018, at 03:35.