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
-
label(required): string
Minimum Length:
1
Maximum Length:40
The label of the property.
Query Parameters
-
language: string
The translation language code. Based on the value of this parameter, the translation for the name of the activity type is returned in the 'name' field.
- If the value is specified, then the translated value is returned in the 'name' field and the 'translations' field is not returned in the response.
- If translation for the specified language does not exist, then the value in the 'name' field is returned in English.
- If the value is not specified, then the 'translations' field is returned in the response and contains the translations to every language in the system.
For the list of supported language codes, see Supported Language Codes.
-
limit: integer
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.
-
offset: integer
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.
Response
Supported Media Types
- application/json
- application/schema+json
200 Response
This section describes the 200 status response for this operation.
Root Schema : PropertyEnumerations
Type:
object
The collection of enumeration values of a property.
Show Source
-
items:
array items
An array of enumeration values.
Note: At least one item in the array should be active.
-
limit:
integer
The limit value specified in the request.
-
offset:
integer
The offset value specified in the request.
-
totalResults:
integer
The total number of enumeration values retrieved.
Nested Schema : items
Type:
array
An array of enumeration values.
Show Source
Note: At least one item in the array should be active.
-
Array of:
object Property Enumeration
Title:
Property Enumeration
Nested Schema : Property Enumeration
Type:
object
Title:
Show Source
Property Enumeration
-
active:
boolean
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. -
label(required):
string
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(required):
array 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:
Show Source
object
-
language(required):
string
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.
-
languageISO:
string
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)
-
name(required):
string
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object
-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
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>.fs.ocs.oraclecloud.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>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/properties/someEnumPropertyLabel/enumerationList" }, { "rel":"describedby", "href":"https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/properties" } ] }