Get form details
/rest/ofscMetadata/v1/forms/{label}
Request
-
label(required): string
The label of the form.
-
language: string
The translation language code. Based on the value of this parameter, the translation for the name of the form 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.
Response
- application/json
- application/schema+json
200 Response
objectForm Details-
object
Form
Title:
FormThe form entity in the Oracle Field Service application. -
object
Form Content
Title:
Form ContentThe specified form content in JSON string format.
objectForm-
label(required):
string
Title:
LabelMinimum Length:1Maximum Length:40The label of the form. -
name(required):
string
Title:
NameMinimum Length:1Maximum Length:255The translation of the name of the form to the specified language. -
translations:
array Translations
Title:
TranslationsThe list of associated translations that is returned for the name of the form. The list is only returned if the language parameter is not specified in the request.
objectForm Content-
content(required):
string
Title:
ContentThe JSON string that describes the form content.
arrayTranslationsobject-
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
object-
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
Example 1
The following example shows how to obtain form attributes with the GET request on the REST resource using cURL.
cURL command Example
The following shows an example of the cURL command.
curl -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' -H 'Accept: application/json' 'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms/hit_inv'
Response Header Example
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx Date: Wed, 24 Jan 2018 12:28:18 GMT Content-Type: application/json; charset=utf-8 Connection: close
Response Body Example
The following shows an example of the response body in JSON format.
{
"label": "hit_inv",
"name": "Hit Inv",
"translations": [
{
"language": "en",
"name": "Hit Inv",
"languageISO": "en-US"
},
{
"language": "es",
"name": "Hit EQ",
"languageISO": "es-ES"
}
],
"content": "{\"submit\":{\"visibility\":[]},\"items\":[{\"type\":\"section\",\"defaultVisibility\":\"readWrite\",\"items\":[{\"type\":\"field\",\"dataBinding\":\"serviceRequestField\",\"label\":\"srtype\",\"name\":{\"en\":\"Request type\",\"es\":\"Tipo de solicitud\",\"fr\":\"Type de demande\",\"de\":\"Anforderungstyp\",\"br\":\"Tipo de Solicita\\u00e7\\u00e3o\",\"ja\":\"\\u8981\\u6c42\\u30bf\\u30a4\\u30d7\"},\"defaultVisibility\":\"mandatory\",\"valueVisibility\":[{\"values\":[\"1\",\"1\"]}]},{\"type\":\"field\",\"dataBinding\":\"serviceRequestField\",\"label\":\"hit_type\",\"name\":{\"en\":\"Hit Type\",\"es\":\"Hit Type\",\"fr\":\"Hit Type\",\"de\":\"Hit Type\",\"br\":\"Hit Tipo\",\"ja\":\"Hit Type\"},\"defaultVisibility\":\"mandatory\",\"valueVisibility\":[{\"values\":\"*\"}]},{\"type\":\"section\",\"defaultVisibility\":\"readWrite\",\"items\":[{\"type\":\"field\",\"dataBinding\":\"activityField\",\"label\":\"access_hours\",\"defaultVisibility\":\"readWrite\",\"defaultValue\":\"v1#\",\"valueValidation\":{\"rule\":\"v1#\",\"errorMessage\":[]}},{\"type\":\"section\",\"defaultVisibility\":\"readWrite\",\"items\":[{\"type\":\"field\",\"dataBinding\":\"activityField\",\"label\":\"end_time\",\"defaultVisibility\":\"readWrite\",\"defaultValue\":\"v1#\",\"valueValidation\":{\"rule\":\"v1#\",\"errorMessage\":[]}}]}]}]}]}",
"links": [
{
"rel": "canonical",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms/hit_inv"
},
{
"rel": "describedby",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/forms"
}
]
}
Example 2
The following example shows how to obtain form attributes by using the language parameter with the GET request on the REST resource using cURL.
cURL command Example
Use the cURL command with the following syntax.
curl -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' -H 'Accept: application/json' 'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms/hit_inv?language=en-US'
Response Header Example
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx Date: Wed, 24 Jan 2018 12:28:18 GMT Content-Type: application/json; charset=utf-8 Connection: close
Response Body Example
The following shows an example of the response body in JSON format.
{
"label": "hit_inv",
"name": "Hit Inv",
"content": "{\"submit\":{\"visibility\":[]},\"items\":[{\"type\":\"section\",\"defaultVisibility\":\"readWrite\",\"items\":[{\"type\":\"field\",\"dataBinding\":\"serviceRequestField\",\"label\":\"srtype\",\"name\":{\"en\":\"Request type\",\"es\":\"Tipo de solicitud\",\"fr\":\"Type de demande\",\"de\":\"Anforderungstyp\",\"br\":\"Tipo de Solicita\\u00e7\\u00e3o\",\"ja\":\"\\u8981\\u6c42\\u30bf\\u30a4\\u30d7\"},\"defaultVisibility\":\"mandatory\",\"valueVisibility\":[{\"values\":[\"1\",\"1\"]}]},{\"type\":\"field\",\"dataBinding\":\"serviceRequestField\",\"label\":\"hit_type\",\"name\":{\"en\":\"Hit Type\",\"es\":\"Hit Type\",\"fr\":\"Hit Type\",\"de\":\"Hit Type\",\"br\":\"Hit Tipo\",\"ja\":\"Hit Type\"},\"defaultVisibility\":\"mandatory\",\"valueVisibility\":[{\"values\":\"*\"}]},{\"type\":\"section\",\"defaultVisibility\":\"readWrite\",\"items\":[{\"type\":\"field\",\"dataBinding\":\"activityField\",\"label\":\"access_hours\",\"defaultVisibility\":\"readWrite\",\"defaultValue\":\"v1#\",\"valueValidation\":{\"rule\":\"v1#\",\"errorMessage\":[]}},{\"type\":\"section\",\"defaultVisibility\":\"readWrite\",\"items\":[{\"type\":\"field\",\"dataBinding\":\"activityField\",\"label\":\"end_time\",\"defaultVisibility\":\"readWrite\",\"defaultValue\":\"v1#\",\"valueValidation\":{\"rule\":\"v1#\",\"errorMessage\":[]}}]}]}]}]}",
"links": [
{
"rel": "canonical",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms/hit_inv"
},
{
"rel": "describedby",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/forms"
}
]
}