G Endpoints

REST APIs support a variety of business object tasks that you can perform using standard HTTP methods in combination with an endpoint that provides details about the resource that you want to return.

GET Method Endpoints

REST APIs support the following operations using a GET method with the URI as shown.

  • Describe the resource collection, resource item, or resource catalog (when collection and item are omitted).

    <base_path>/[{resourceCollectionPath}|{resourceItemPath}]/describe
    
  • Retrieve the resource collection, optionally using a query string parameter.

    <base_path>/{resourceCollectionPath}[?{queryStringParam}[&{queryStringParam}]]
    
  • Retrieve the resource item, optionally using a query string parameter.

    <base_path>/{resourceItemPath}[?{queryStringParam}[&{queryStringParam}]]
    

Request Parameters

  • The GET method supports query string parameters to query, filter, page, and sort the resource collection. The supported parameters are listed in the following table. All GET method URI parameters can be combined with any other parameter in the table, except where noted on the expand and field parameters. Note that query string parameters can only be used on resource media types. They cannot, for example, be used when describing the resource.

Note:

The results of the GET method or the query syntax may vary depending on the REST API framework version used for a client request. The following tables specify where the framework version is important to note when using query string parameters. For additional information about framework versions, see Working with REST API Framework Versions.

Table G-1 Supported GET Method Query String Parameters Used Only in Resource Collections

GET URI Parameter Value Description

q

Starting in REST API framework version 2, q supports complex rowmatch expressions.

In framework version 1, the query parameter is used in the WHERE clause and contains one or more query by example-type expressions, separated by a semi-colon.

Format: <exp1>;<exp2>

Example: ?q=Deptno>=10 and <= 30;Loc!=NY

Starting in framework version 2, the query parameter accepts expressions that identify the specific rows to retrieve from the resource. The filter can be as simple as a single expression, or you can create more complex filters by combining expressions using the and and or conjunctions with matching sets of parentheses for grouping.

For example, the following expression uses conjunction to query the resource using three different fields:

(AssignedToId is null) or ( (Priority <= 2) and (RecordName like 'TT-99%'))

If a query parameter value has a special character (like ‘;’, ‘,’, ‘=’ or similar), then the value (in the expression) should be enclosed in quotes to define a literal value. If the literal value contains quotes, then, in addition, the quotes need to be escaped, as defined by the framework version, to be viable:

  • Version 1 syntax encloses the literal value in double quotes (") and requires a backslash (\) to escape double quote characters contained in the value: ?q=NickName="\"Billy the Kid\""
  • Version 2, or later, syntax encloses the literal value in single quotes (') and requires a single quote to escape a single quote character contained in the value (used as an apostrophe): ?q=ListName='Bill''s list'

Additionally, in version 1, if the query parameter value contains a reserved word (such as AND or OR), then the value needs to be enclosed in single quotes (') and there must be a space before and after the quoted string. For example, the string matching filter ’Accounting and Finance’ in the following query parameter expression contains the reserved word AND, and therefore requires a space before and after the single quotation marks to be viable in version 1 syntax:

?q=DepartmentName= 'Accounting and Finance' &fields=DepartmentName

Note that starting in framework version 2, the use of a space character is no longer required to delimit a string matching filter that contains a reserved word.

For version 1, if the value contains both a special character and a reserved word, then the value needs to be enclosed in single quotes ('), and then enclosed again in double quotes (") , along with escaping the double quotes contained within the value with a backslash (\), and there needs to be a space before and after the twice-quoted string. For example:

?q=DepartmentName= "'\"Accounting\" and Finance'" &fields=DepartmentName

For a complete explanation of the expression format, see Understanding Framework Support for Query Syntax.

The resource collection will be queried using the provided expressions.

Supported operators in framework version 1 and later:

  • = (Equal to)

  • > (Greater than)

  • < (Less than)

  • >= (Greater than or equal to)

  • <= (Less than or equal to)

  • != (Not equal to) framework version 1 only

  • AND (And)

  • OR (Or)

  • NOT (Not)

  • LIKE (Like)

Supported operators in framework version 2 and later also include:

  • <> (Not equal to)

  • BETWEEN (Between)

  • NOT BETWEEN (Not between)

  • IN (In)

  • NOT IN (Not in)

  • IS NULL (Null)

  • IS NOT NULL (Not Null)

Allowed special characters in framework version 1:

  • " (double quotation mark) to define a literal value for use where special characters appear in the value

  • ' (single quotation mark) to define a literal value for use where reserved words appear in the value

  • \ (backslash) to define an escape character to escape a double quotation mark (") or single quotation mark/apostrophe (') character used within a literal value

  • * (asterisk) to define a wildcard character

Allowed special characters in framework version 2 and later:

  • ' (single quotation mark) to define a literal value or to define an escape character to escape a single quotation mark/apostrophe (') character used within a literal value

  • % (percent) to define a wildcard character

For examples, see Filtering a Business Object with a Query Parameter and Understanding Framework Support for Query Syntax.

Framework version 9 allows the use a \ (backslash) character to escape wildcard characters % (percent), * (asterisk), _ (underscore), and ? (question mark) and also for the \ (backslash) character when a query that involves the LIKE operator contains one of these characters. For examples, see Understanding Framework Support for Query Syntax.

totalResults

boolean

Default: false

The resource collection will include the estimated row count when totalResults=true.

For an example, see Returning the Estimated Count of Business Object Items.

limit

integer

This parameter restricts the number of resource items returned inside the resource collection. If limit exceeds the resource item total result, then the framework will return the available resources.

For an example, see Paging a Business Object.

offset

integer

Default: 0 (the first position)

Used to define the starting position of the resource collection. If offset exceeds the resource count, then no resources are returned.

For an example, see Paging a Business Object.

Table G-2 Supported GET Method Query String Parameters Used in Resource Collections and Resource Items

GET URI Parameter Value Value

fields

Starting in REST API framework version 3 and later, fields will return children resource items as a resource collection to support pagination of the collection.

A simple comma-separated list of resource item attributes.

Format: <attr1>,<attr2>

Example: ?fields=Dname,DLoc

May be used on child resources.

Format: <accessor>:<att1>,<att2>

Example: ?fields=Employee:FirstName,LastName

May be used on nested resources using accessor dot notation.

Format: <accessor1>.<accessor2>:<Attr1>,<Attr2>

Example: ?fields=Employee.JobHistory:JobId

Or on both resources in the nested resource.

Format: <accessor1>:<Attr1>,<Attr2>;<accessor1>.<accessor2>:<Attr1>,<Attr2>

Example: ?fields=Name,Location;Employee:FirstName,LastName

This parameter filters the resource item attributes. Only the specified attributes are returned.

Note that if a nested resource is queried using the accessor dot notation (Employee.JobHistory), then attributes may be specified on both resources. A resource in the accessor dot notation without a specified attribute will return no resource item attributes.

Note this parameter cannot be combined with the expand parameter. If both parameters are provided, only fields will be considered.

For examples, see Fetching a Business Object with a Subset of Items.

onlyData

boolean

Default: false

This parameter filters the resource response in order to contain only data (no links objects, for example).

For an example, see Fetching Data Only for a Business Object.

expand

Starting in REST API framework version 3 and later, expand will return children resource items as a resource collection to support pagination of the collection.

Display all children. Format: all

Display one or more child resource using a comma-separated list of accessors.

Format: <accessor1>,<accessor2>

Example: ?expand=Employee,Localization

Display nested resources using the accessor dot notation.

Format: <accessor1>.<accessor2>

Example: ?expand=Employee.JobHistory

When this parameter is provided, the specified children are included in the resource response (instead of the link).

Note the expand parameter cannot be combined with the fields parameter. If both parameters are provided, only fields will be considered.

Note that if a nested resource is queried using the accessor dot notation (Employee.JobHistory), then the missing children will be processed implicitly. For example, ?expand=Employee.JobHistory is the same as ?expand=Employee,Employee.JobHistory (which will expand Employee and JobHistory).

For examples, see Fetching a Child Business Object.

dependency

A set of dependency attributes.

Format: <attr1>=<val1>,<attr2>=<value2>

Example: dependency=ProductId=2

The dependencies are attributes that are set before and rolled back after generating the response. The dependencies attributes are always set in the resource item in question.

When a child resource collection is requested and the dependency parameter is set, the attributes will be set in the parent resource item before generating the resource collection response.

orderBy

A comma-separated list of order-by attributes with a sort flag to specify ascending or descending order.

Format: <orderBy_attr1_name>[:<(asc/desc)>], <orderBy_attr2_name>[:<(asc/desc)>]

Example: ?orderBy=DName:desc,DLoc

Default: ORDERBY attributes defined on the business object query will be applied.

Sorts a resource collection based on its attributes. If the asc/desc are not provided (or an invalid value is provided), asc will be used as default.

By default, the fetched collection will be sorted in a case insensitive way.

For an example, see Sorting a Business Object.

links

A comma separated list of <rel_name>, where <rel_name> is a string representing the relation type of a link.

Example: self, parent

When a resource item or a resource collection is requested and the links query parameter is used, then only those links with relation types ("rel") matching the values in the comma-separated parameter value will be shown in the response.

Note the links parameter cannot be combined with onlyData when onlyData has a value of true, as there will be no links section displayed in the response.

Table G-3 Supported GET Method Query String Parameters Used in Resource Catalog Describe

GET URI Parameter Value Value

metadataMode

minimal

list

Use to retrieve the resource catalog describe. The URL parameter ?metadataMode=minimal is required to retrieve the describe. It returns the titles and links of parent resources (but does not include children resources).

If you do not want any metadata in the response but only self links, you can append ?metadataMode=list to the describe request.

Optionally, additional parameters may be appended to the minimal describe request, to include children resources and / or resource annotations, as explained for the query parameters showAnnotations and includeChildren. For example, you can append ?metadataMode=minimal&includeChildren=true to retrieve a minimal catalog describe with all children resources included.

For an example, see Retrieving the Resource Catalog Describe.

includeChildren

true, false (default)

Use to include all available children resources nested within a parent resource describe. You can append includeChildren=true on the describe request.

For a resource catalog describe example, see Retrieving the Resource Catalog Describe.

showAnnotations

true, false (default)

To include resource annotations in the catalog describe, you can append showAnnotations=true on the describe request.

Note that annotations must be defined by the web application developer and may not be present on the resource.

You cannot use this parameter with ?metadataMode=list.

Query String Operators Supported by REST API Data Types

The following table shows the REST API data types and the valid operators that may be used in query strings with the query (q) parameter.

Note that the operators BETWEEN, NOT BETWEEN, IN, NOT IN, and the wildcard character % are available only starting in REST API framework version 2.

Table G-4 Operators Supported by Data Types in Query (q) String Parameter

REST API Data Type Supported Operator

integer

  • = (Equal to)

    .../Department?q=Deptno = 20

  • <> (Not equal to)

    .../Department?q=Deptno <> 20

  • < (Less than)

    .../Department?q=Deptno < 20

  • <= (Less than or equal to)

    .../Department?q=Deptno <= 20

  • > (Greater than)

    .../Department?q=Deptno > 30

  • >= (Greater than or equal to)

    .../Department?q=Deptno >= 30

  • BETWEEN (Between)

    .../Department?q=Deptno BETWEEN 10 AND 30

  • NOT BETWEEN (Not between)

    .../Department?q=Deptno NOT BETWEEN 10 and 30

  • IN (In)

    .../Department?q=Deptno IN (10, 30)

  • NOT IN (Not in)

    .../Department?q=Deptno NOT IN (10, 30)

  • IS NULL (Is null)

    .../Department?q=Deptno IS NULL

  • NOT NULL (Not null)

    .../Department?q=Deptno NOT NULL

number

  • = (Equal to)

    .../Department?q=Salary = 3120.99

  • <> (Not equal to)

    .../Department?q=Salary <> 3120.99

  • < (Less than)

    .../Department?q=Salary < 3120.99

  • <= (Less than or equal to)

    .../Department?q=Salary <= 3120.99

  • > (Greater than)

    .../Department?q=Salary > 3120.99

  • >= (Greater than or equal to)

    .../Department?q=Salary >= 3120.99

  • BETWEEN (Between)

    .../Department?q=Salary BETWEEN 2000 AND 3120.99

  • NOT BETWEEN (Not between)

    .../Department?q=Salary NOT BETWEEN 2000 and 3120.99

  • IN (In)

    .../Department?q=Salary IN (800, 3120.99)

  • NOT IN (Not in)

    .../Department?q=Salary NOT IN (800, 3120.99)

  • IS NULL (Is null)

    .../Department?q=Salary IS NULL

  • NOT NULL (Not null)

    .../Department?q=Salary NOT NULL

string

  • = (Equal to)

    .../Department?q=DeptName = ’SALES’

  • <> (Not equal to)

    .../Department?q=DeptName <> ’SALES’

  • LIKE (Like)

    .../Department?q=DeptName LIKE ’SA%’

    .../Department?q=DeptName LIKE ’%ES’

    .../Department?q=UPPER(DeptName) LIKE UPPER('%e%')

  • NOT LIKE (Not like)

    .../Departments?q=UPPER(DeptName) NOT LIKE UPPER('%c%')

  • IN (In)

    .../Departments?q=DeptName IN ('SALES', 'RESEARCH')

  • NOT IN (Not in)

    .../Departments?q=DeptName NOT IN ('SALES', 'RESEARCH')

  • IS NULL (Is null)

    .../Department?q=DeptName IS NULL

  • IS NOT NULL (Is not null)

    .../Department?q=DeptName IS NOT NULL

date

  • = (Equal to)

    .../Employee?q=HireDate = ’1999-01-01’

  • <> (Not equal to)

    .../Employee?q=HireDate <> ’1999-01-01’

  • < (Less than)

    .../Employee?q=HireDate < ’1999-01-01’

  • <= (Less than or equal to)

    .../Employee?q=HireDate <= ’1999-01-01’

  • > (Greater than)

    .../Employee?q=HireDate > ’1999-01-01’

  • >= (Greater than or equal to)

    .../Employee?q=HireDate >= ’1999-01-01’

  • BETWEEN (Between)

    .../Employee?q=HireDate BETWEEN ’1999-01-01’ AND ’2010-01-01’

  • NOT BETWEEN (Not between)

    .../Employee?q=HireDate NOT BETWEEN ’1999-01-01’ AND ’2010-01-01’

  • IS NULL (Is null)

    .../Employee?q=HireDate IS NULL

  • NOT NULL (Not null)

    .../Employee?q=HireDate NOT NULL

time

  • = (Equal to)

    .../Employee?q=HireTime = '08:30:40'

  • <> (Not equal to)

    .../Employee?q=HireTime <> ’08:30:40’

  • < (Less than)

    .../Employee?q=HireTime < ’08:30:40’

  • <= (Less than or equal to)

    .../Employee?q=HireTime <= ’08:30:40’

  • > (Greater than)

    .../Employee?q=HireTime > ’08:30:40’

  • >= (Greater than or equal to)

    .../Employee?q=HireTime >= ’08:30:40’

  • BETWEEN (Between)

    .../Employee?q=HireTime BETWEEN ’04:30:00’ AND '08:30:40'

  • NOT BETWEEN (Not between)

    .../Employee?q=HireTime NOT BETWEEN ’04:30:00’ AND '08:30:40'

  • IS NULL (Is null)

    .../Employee?q=HireTime IS NULL

  • NOT NULL (Not null)

    .../Employee?q=HireTime NOT NULL

datetime

Note: Both UTC and local datetime formats are supported. The value returned is determined by the time zone configured for the VM.

  • = (Equal to)

    .../Employee?q=HireDateTime = '1999-01-01T08:30:40Z'

  • <> (Not equal to)

    .../Employee?q=HireDateTime <> ’1999-01-01T08:30:40Z’

  • < (Less than)

    .../Employee?q=HireDateTime < ’1999-01-01T08:30:40Z’

  • <= (Less than or equal to)

    .../Employee?q=HireDateTime <= ’1999-01-01T08:30:40Z’

  • > (Greater than)

    .../Employee?q=HireDateTime > ’1999-01-01T08:30:40Z’

  • >= (Greater than or equal to)

    .../Employee?q=HireDateTime >= ’1999-01-01T08:30:40Z’

  • BETWEEN (Between)

    .../Employee?q=HireDateTime BETWEEN ’1999-01-01T08:30:40Z’ AND ’1999-12-01T08:30:40Z’

  • NOT BETWEEN (Not between)

    .../Employee?q=HireDateTime NOT BETWEEN ’1999-01-01T08:30:40Z’ AND ’1999-12-01T08:30:40Z’

  • IS NULL (Is null)

    .../Employee?q=HireDateTime IS NULL

  • NOT NULL (Not null)

    .../Employee?q=HireDateTime NOT NULL

boolean

  • = ’true’ (true)

    .../Employees?q=Active = ’true’

  • = ’false’ (false)

    .../Employees?q=Active = ’false’

  • IS NULL (Is null)

    .../Employees?q=Active IS NULL

  • NOT NULL (Not null)

    .../Employees?q=Active NOT NULL

Media Types Supported

  • Request

    • None

  • Response

    • application/vnd.oracle.adf.resourcecollection+json: When retrieving a resource collection.

    • application/vnd.oracle.adf.resourceitem+json: When retrieving a resource item.

    • application/vnd.oracle.adf.description+json: When describing a resource.

Describe Topics

Task Topics

REST API Framework Version Topics

POST Method Endpoints

REST APIs support the following tasks using a POST method with the URL as shown.

  • Create a resource item.

    <base_path>/{resourceCollectionPath}
  • Create a parent resource item and create the nested child resource collection in one roundtrip.

    <base_path>/{resourceCollectionPath}
  • Update or create a resource item resource item in an existing resource using the Upsert-Mode header.
    <base_path>/{resourceCollectionPath}
  • Execute an a batch request.

    <base_path>/{version}
    

Request Parameters

  • none

Media Types Supported

  • Request

    • application/vnd.oracle.adf.resourceitem+json: When creating a resource item.

    • application/vnd.oracle.adf.resourceitem+json: When updating or creating a resource item using Upsert.

    • application/vnd.oracle.adf.batch+json: When executing a batch request.

  • Response

    • application/vnd.oracle.adf.resourceitem+json: When creating a resource item.

    • application/vnd.oracle.adf.resourceitem+json: When updating or creating a resource item using Upsert.

    • application/vnd.oracle.adf.batch+json: When executing an batch request.

Task Topics

PATCH Method Endpoints

REST APIs support the following operation using a PATCH method with the URL as shown.

  • Updating a resource item.

    <base_path>/{resourceItemPath}
    

Request Parameters

  • none

Media Types Supported

  • Request

    • application/vnd.oracle.adf.resourceitem+json: The resource item to be updated.

  • Response

    • application/vnd.oracle.adf.resourceitem+json: The updated resource item.

Tasks Topics

DELETE Method Endpoints

REST APIs support the following operation using a DELETE method with the URL as shown.

  • Deleting a resource item.

    <base_path>/{resourceItemPath}
    

Request Parameters

  • none

Media Types Supported

  • Request

    • none

  • Response

    • none

Task Topics