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:
1Maximum Length:40The 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:
objectThe 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:
arrayAn 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:
objectTitle:
Show Source
Property Enumeration-
active:
boolean
Title:
ActiveContains 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:
LabelMinimum Length:1Maximum Length:255The 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:
TranslationsAn array containing the translations of the enumeration item in different languages.
Nested Schema : Translations
Type:
arrayTitle:
TranslationsAn array containing the translations of the enumeration item in different languages.
Show Source
Nested Schema : Translation
Type:
Show Source
object-
language(required):
string
The language code of the translated text. The code in the response is two characters long (for example, 'en', 'es').
See Supported Language Codes to view the values that are supported.
-
languageISO:
string
The ISO language code (for example, 'en-US').
-
name(required):
string
The specified name of the property translated to the language code available in the system.
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
objectError response
Show Source
-
detail:
string
The detailed information about the error.
-
status:
string
The HTTP status code.
-
title:
string
The summary of the error message.
-
type:
string
The URL of the page containing the error details.
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"
}
]
}