Get a list of forms

get

/rest/ofscMetadata/v1/forms

This operation retrieves a list of forms in the Oracle Field Service application.

Request

Query Parameters
  • 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.

  • Minimum Value: 1
    Maximum Value: 100
    The number of form records to be returned 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.
  • Minimum Value: 0
    The record number from which the retrieval starts. The default value is zero. If no value is 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 : Forms
Type: object
Title: Forms
The collection of forms. It is not returned for an empty collection.
Show Source
  • Title: Has More
    Contains one of the following values: true or false.

    If true, then there are more results that can be retrieved with successive paging requests.

    If false or if the value is not present, then there are no more results or this is the final page. The default value is true.

  • Items
    Title: Items
    The collection of forms.
  • Title: Limit
    The limit value specified in the request. If the value is not specified in the request or if the specified value is not accepted, then it defaults to 100.
  • Title: Offset
    The offset value specified in the request.
  • Title: Total Results
    The total number of form records in the collection.
Nested Schema : Items
Type: array
Title: Items
The collection of forms.
Show Source
Nested Schema : Form
Type: object
Title: Form
The form entity in the Oracle Field Service application.
Show Source
  • Title: Label
    Minimum Length: 1
    Maximum Length: 40
    The label of the form.
  • Title: Name
    Minimum Length: 1
    Maximum Length: 255
    The translation of the name of the form to the specified language.
  • Translations
    Title: Translations
    The 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.
Nested Schema : Translations
Type: array
Title: Translations
The 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.
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
Show Source
Back to Top

Examples

Example 1

The following example shows how to obtain a list of forms 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/?limit=2&offset=2'

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.

{
    "hasMore": true,
    "totalResults": 5,
    "limit": 2,
    "offset": 2,
    "items": [
        {
            "label": "mob_inv",
            "name": "Mob Inv",
            "translations": [
                {
                    "language": "en",
                    "name": "Mob Inv",
                    "languageISO": "en-US"
                },
                {
                    "language": "es",
                    "name": "Mob EQ",
                    "languageISO": "es-ES"
                }
            ],
            "links": [
                {
                    "rel": "canonical",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms/mob_inv"
                },
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/forms"
                }
            ]
        },
        {
            "label": "hi_inv",
            "name": "Hi Inv",
            "translations": [
                {
                    "language": "en",
                    "name": "Hi Inv",
                    "languageISO": "en-US"
                },
                {
                    "language": "es",
                    "name": "Hi EQ",
                    "languageISO": "es-ES"
                }
            ],
            "links": [
                {
                    "rel": "canonical",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms/hi_inv"
                },
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/forms"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms?limit=2&offset=2"
        },
        {
            "rel": "prev",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms?limit=2&offset=0"
        },
        {
            "rel": "next",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms?limit=2&offset=4"
        },
        {
            "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

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/?language=en-US&limit=2&offset=2'

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.

{
    "hasMore": true,
    "totalResults": 5,
    "limit": 2,
    "offset": 2,
    "items": [
        {
            "label": "mob_inv",
            "name": "Mob Inv",
            "links": [
                {
                    "rel": "canonical",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms/mob_inv"
                },
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/forms"
                }
            ]
        },
        {
            "label": "hi_inv",
            "name": "Hi Inv",
            "links": [
                {
                    "rel": "canonical",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms/hi_inv"
                },
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/forms"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms?limit=2&offset=2"
        },
        {
            "rel": "prev",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms?limit=2&offset=0"
        },
        {
            "rel": "next",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/forms?limit=2&offset=4"
        },
        {
            "rel": "describedby",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/forms"
        }
    ]
}
Back to Top