Access Metadata

You can use the GET method to retrieve metadata about REST resources from their /describe endpoints. Each resource's metadata contains a comprehensive description, including the object resource URIs, attributes, supported actions, child resources, and list-of-value (LOV) resources. The metadata also includes attribute properties such as name, type, mandatory, updatable, queryable, and so on.

You must use the metadataMode query parameter to perform a describe operation, except when accessing metadata for a specific resource.

How You Retrieve All Resource URLs Without Other Metadata

If you want to retrieve only the URLs for all resources without including any metadata, set the value of metadataMode parameter to list in your GET request on the /describe endpoint. For example, here's a sample request URL using this parameter:

https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/<version>/describe?metadataMode=list

And here's the cURL command:

curl -X GET -u <username:password> https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/<version>/describe?metadataMode=list

The response would contain only the resource URLs and no resource metadata.

How You Retrieve Minimal Metadata for All Resources

To limit the amount of metadata retrieved for an application, use the metadataMode=minimal query parameter. Perform the GET operation using the following request URL:

https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/<version>/describe?metadataMode=minimal

You can use this cURL command to return only the resources:

curl -X GET -u <username:password> https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/<version>/describe?metadataMode=minimal

Note:

You can't use the metadataMode parameter to access the metadata for a specific resource.

How You Retrieve Metadata for a Specific Resource

Perform the GET operation on the resource using the following request URL syntax:

https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/<version>/<resource>/describe

Let's say you want to get the metadata for the announcements resource. Perform the GET operation using the following request URL:

https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/announcements/describe

You can use this cURL command to complete the operation:

curl -X GET -u <username:password> https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/announcements/describe

How You Retrieve Metadata in Your Preferred Language

If you want to retrieve the metadata in your preferred language, you can use the Accept-Language header in the GET request. Include the Accept-Language header in the cURL command and provide the language short code as its value. For example, to retrieve the metadata in Turkish, use tr as the Accept-Language header value.

Run the cURL command as shown here:

curl -X GET -u <username:password> https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/partnerTypesLOV/describe \  
  -H 'Accept-Language: tr' \

The response contains the translated metadata.

Response displaying the translated labels

You can see that the values for title and titlePlural appear translated in Turkish. In English, these would appear as Partner Type and Partner Types.

Note:

The translation applies only to the customer-facing labels such as title and titlePlural, and depends on the language settings of your application.

How You Retrieve Metadata in OpenAPI Format

Metadata in OpenAPI format is now supported for all REST APIs. In the GET request, set the Accept header to application/vnd.oracle.openapi3+json to retrieve metadata in that format. If you're using the cURL command, construct the GET request as:

curl  -u username:password \
-X GET https://servername.fa.us2.oraclecloud.com/fscmRestApi/resources/<version>/announcements/describe \
'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-H 'Accept: application/vnd.oracle.openapi3+json'

If you're using a REST client such as Postman, set the value for the Accept header as shown here:

Postman example showing the Accept header set to the value supporting openapi format

You get the response in the OpenAPI format as seen in the screenshot.

Metadata in v1 Resources

All v1 resources by default support OpenAPI format. When you send requests to retrieve the description of a resource, you can choose whether the response should contain the module-level description or the resource-level description. To get the description of all the resources within a module, send the request as:

GET https://<servername>/api/boss/data/objects/<module_segment>/v1/$openapi

To get the description for a particular resource, send the request as:

GET https://<servername>/api/boss/data/objects/<module_segment>/v1/$openapi/<resource>