Get languages

get

/rest/ofscMetadata/v1/languages

This operation retrieves a collection of languages.

The response contains the translations of the user's language in the translation structure and in the entity fields.

Request

Query Parameters
  • The number of languages 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.
  • 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 : Languages
Type: object
The collection of languages.
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : Languages
Type: object
Title: Languages
Show Source
  • Title: Active
    Contains one of the following values: true or false.
    • If true, then the activity type is listed as a possible value in the 'Activity Type' drop-down list in the Manage or Mobility apps while creating an activity.
    • If false, then the activity type is not listed as a value in the drop-down list.

    The default value is true.

  • Title: Label
    The unique label assigned to the language code. For example, en.
  • Title: Name
    Minimum Length: 1
    Maximum Length: 40
    The translation for the language name. If the language parameter is specified, then the name is provided in that language.

    If the language parameter is not specified, then the name is provided in English, unless the request is performed using an Oracle Field Service Cloud user account which is linked to an API application (in this case, the name is provided in the language of the user making the request).

  • Translations
    Title: Translations
    The array of associated translations.
Nested Schema : Translations
Type: array
Title: Translations
The array of associated translations.
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 update a property by submitting a PATCH request on the REST resource.

Example of Request Header

The following shows an example of the request header.

GET /rest/ofscMetadata/v1/languages?limit=20&offset=1 HTTP/1.1
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.3
Date: Wed, 16 Sep 2015 15:32:19 GMT
Content-Type: application/json; charset=utf-8
Connection: close

Example of Response Body

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

{
    "totalResults":18,
    "limit":20,
    "offset":1,
    "items":[
        {
            "label":"el",
            "name":"Greek",
            "active":"true"
            },
            "translations":[
                {
                    "language":"en",
                    "name":"Greek"
                },
                {..}
            ]
        },
        {
            "label":"en",
            "name":"English",
            "active":"true"
            },
            "translations":[
                {
                    "language":"en",
                    "name":"English"
                },
                {..}
            ]
        },
       {...}
    ]
}
Back to Top