Get enumeration values of a property

get

/rest/ofscMetadata/v1/properties/{label}/enumerationList

This operation retrieves a list of enumeration values for the specified property.

The operation is applicable only for properties of the type enumeration.

Request

Path Parameters
  • Minimum Length: 1
    Maximum Length: 40
    The label of the property.
Query Parameters
  • The number of enumeration values to be retrieved in the response. The minimum value that can be specified is 1 and the maximum value that can be specified is 100. If the specified value is greater than 100, zero, or if no value is specified, then it defaults to 100.
  • The number enumeration values to be skipped. The default value is zero. If the value is not specified, then it defaults to zero. The value zero indicates that the retrieval will start from the beginning of the collection.
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : PropertyEnumerations
Type: object
The collection of enumeration values of a property.
Show Source
Nested Schema : items
Type: array
An array of enumeration values.

Note: At least one item in the array should be active.

Show Source
Nested Schema : Property Enumeration
Type: object
Title: Property Enumeration
Show Source
  • Title: Active
    Contains one of the following values: true or false. If true, then the enumeration item is active. If false, then then the enumeration item is inactive.
  • Title: Label
    Minimum Length: 1
    Maximum Length: 255
    The code of the enumeration item. This code is unique only to the specified property. The values '0' and '-1' are reserved for internal purposes and cannot be used. The values cannot be changed or deleted.
  • Translations
    Title: Translations
    An array containing the translations of the enumeration item in different languages.
Nested Schema : Translations
Type: array
Title: Translations
An array containing the translations of the enumeration item in different languages.
Show Source
Nested Schema : Translation
Type: object
Show Source
  • This field contains language code of a text translation, it conatains two characters length code in responses (e.g. 'en', 'es') but can be used in requests as extended ISO code (e.g. 'en-US') as well as old two character format.
  • This field is used only in responses and returns ISO language code (e.g. 'en-US'). This field is ignored in the requests (use 'language' instead)

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Error response
Show Source
Back to Top

Examples

The following example shows how to get a property's enumeration by submitting a GET request on the REST resource.

Example of Request Header

The following shows an example of the request header.

GET /rest/ofscMetadata/v1/properties/someEnumPropertyLabel/enumerationList HTTP/1.0
Host: <instance_name>.etadirect.com 
Authorization: Basic c29hcEBwZXRyb2xpYXNoZXZ5Y2gucmVzdDox 
Accept: */*

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Fri, 24 Jul 2015 08:54:08 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive

Example of Response Body

The following example shows the contents of the response body in JSON format.

{ 
 "items": [
  {
   "label": "code1",
   "active": true,
   "translations": [
    {
     "language":"en",
     "name":"Code 1"
    }
   ]
  },
  {
   "label": "code2",
   "active": true,
   "translations": [
    {
     "language":"en",
     "name":"Code 2"
    }
   ]
  }
 },
    "links":[ 
        { 
            "rel":"canonical",
            "href":"https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/properties/someEnumPropertyLabel/enumerationList"
        },
        { 
            "rel":"describedby",
            "href":"https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/properties"
        }
    ]
}
Back to Top