Entity Filtering

Specify entity filters in the form of endpoint query parameters to restrict the contents of endpoint responses to objects that match particular criteria. For example, to ensure the /resource?type=resource endpoint only returns objects with a status of active, add a status==active query parameter to the requested endpoint: /resource?type=resource&filters=resourceStatus==active.

Note: Some API services do not support this functionality. See Service Feature Support for more information on the functionality supported by each API service.

The Oracle Prime Projects API supports several entity filtering options. The following table lists supported entity filter operations:

Note: Filtering is not supported for null fields. You cannot filter results based on null values. For example, the following filter is invalid: filters=description=null. If your request contains a null value filter, the response returned by the API will not honor the filter and may return unexpected data.

Name Operator Description URL Encoded Operator Examples
Equals == or = Excludes response objects that do not contain properties with values matching the value specified in the filter parameter. %3D%3D or %3D

Only return objects with a resourceId value of 1001:

filters=resourceId==1001

URL encoded form: filters=resourceId%3D%3D1001

or

filters=resourceId=1001

URL encoded form: filters=resourceId%3D1001

Does not Equal != Only includes response objects that contain properties with values that do not match the value specified in the filter parameter. !%3D

Only return resources with resourceId values that are not equal to 1001:

filters=resourceId!=1001

URL encoded form: filters=resourceId!%3D1001

Less than or Equal to <=

Include response objects that contain properties with values less than or equal to the value specified in the filter parameter.

This filter operation only supports numeric values.

%3C%3D

Only return resources with defaultUnitsPerHour values less than or equal to 8:

/workspace?filters=defaultUnitsPerHour<=8

URL encoded form: filters=defaultUnitsPerHour%3C%3D8

Greater than or Equal to >=

Include response objects that contain properties with values greater than or equal to the value specified in the filter parameter.

This filter operation only supports numeric values.

%3E%3D

Only return resources with defaultUnitsPerHour values greater than or equal to 8:

filters=parentWorkspace>=8

URL encoded form: filters=defaultUnitsPerHour%3E%3D8

Less than <

Include response objects that contain properties with values less than the value specified in the filter parameter.

This filter operation only supports numeric values.

%3C

Only return resources with defualtUnitsPerHour values less than 8:

filters=resourceId<8

URL encoded form: filters=defaultUnitsPerHour%3C8

Greater than >

Include response objects that contain properties with values greater than the value specified in the filter parameter.

This filter operation only supports numeric values.

%3E

Only return resources with defaultUnitsPerHour values greater than 8:

 

filters=defaultUnitsPerHour>8

URL encoded form: filters=defaultUnitsPerHour%3E8

Combining Filters

You can combine entity filters using logical operators. For example, the /resource?type=resource&filters=resourceName==John;resourceType=LABOR endpoint combines resouceName and resouceType value filters using a logical AND (;). The following table lists supported logical operators for combining entity filters.

Name Operator Description Examples
AND ; The logical AND operator restricts response objects to entities that match all specified filter values.

Only return objects with resourceId values of 1001 and calendar values of 12001:

filters=resourceId==1001;calendar==12001

URL encoded form: filters=resourceId%3D%3D1001;calendar%3D%3D12001

OR , The logical OR operator restricts response objects to entities that match one or more of the specified filter values.

Only return objects with resourceId values not equal to 1001 or with calendar values equal to 1201.

filters=resourceId!=1001,calendar==1201

URL encoded form: filters=resourceId!%3D1001,calendar%3D%3D1202

Use parentheses ( ) to combine logical operators and construct complex filters. For example, to match an object with a resource ID of 101 OR 102, AND a calendar ID of 1201, enclose the contents of the OR filter in parentheses, as in the following endpoint: /resource?type=resource&filters=(resourceId==1001,resourceId==1002);calendar==1201. Filter values enclosed in parentheses are applied first. When combining logical operators, the API will only return response objects that match all of the applied filters.

Wildcards

Use wildcard entity filters to limit response objects based on textual patterns. For example, the /resource?type=resource&filters=resourceName==jacob* endpoint returns resource objects containing a resourceName value of "jacob" followed by any string. The following table lists supported entity filter wildcards:

Name Operator Description Examples
Any String *

The Any String wildcard matches any string value of one or more characters.

This filter operation only supports string values.

Only return objects with resourceName values containing the string "smith" preceded by any number of alphanumeric characters:

filters=resourceName==*smith

URL encoded form: filters=resourceName%3D%3D*smith

Unsupported Filters

Some API object properties cannot be used as entity filters for particular endpoints. The following table lists parameter and endpoint combinations that are unsupported:

Parameter Corresponding Endpoints
spreads

assignment/code/{code}

assignment/activity/{id}/code/{code}

assignment/activityId/{id}

calendarWorkWeek

calendar/code/{code}

calendar/find-calendar/codes

calendar/resolveCalendar/workspace/{workspaceId}/calendar/{calendarCode}

isAssignableToProject
isAssignableToResource
comment

name/{name}

portfolio/{id}

review

capitalPlan/{capitalPlanId}

project/{projectId}

 

capitalPlanProjectPhaseFinancial
tableName

codeType/{name}

codeType/workspace/{id}

codeType/name/{name}-codeType/workspace/{id}

entityType
codeType
assignments
flexObject

field/tableName/{name}/columnLabel/{label}

field/workspaceId/{id}

flexType
udfType
withdrawApprovalDate commitment/code/{code}
reopenDate
approvedByUser
SOVApprovalDate
closeDate
approvalDate
sharedDataType

company/tenantOwner-company/list

company/code/{code}

company/name/{name}

companyCode
endDate strategyMeasureManualValue/dateSequenceRange/measure/{measureId}
startDate
startSequence
endSequence
location

project/filter

project/name/{name}

project/code/{code}

project/workspace/{id}

project/codeType/{typeId}/codeValue/{code}

project/nameLike/{name}

locationId
priorityNum
summarizedDataDate
projectCashFlows
actualForecastVar

project/filter

project/name/{name}

project/code/{code}

project/workspace/{id}

project/codeType/{typeId}/codeValue/{code}

project/nameLike/{name}

spreadDate
yearEndBudget
ytdActualCost
dataDate
scopeItemAssignmentCostPeriodCloseOut

periodCloseoutData/scopeAssignment/{scopeItemAssignmentId}

periodCloseoutData/periodItem/{periodItemId}

strategy

strategy/measureValue/workspace/{workspaceId}

strategy/measureValue/strategy/{strategyId}

measureValues
format
workspaceId
orientation
reportCode
includeDescendants
parentCode

wbs/find

wbs/codes

wbs/children/{id}

wbs/project/{id}

wbs/project/{id}/code/{code}

wbs/project/{id}/name/{name}

wbs/project/{id}/codeType/{typeId}/codeValue/{code}

wbs/getChildrenInHierarchy/{id}

wbs/{id}/childrenHierarchy

isDelete
favorite

workManagerTask/code/{code}

workManagerTask/project/{id}

workManagerTask/project/{projectId}/activity/{activityId}

actualForeCastVar

project/filter

project/name/{name}

project/code/{code}

project/workspace/{id}

project/codeType/{typeId}/codeValue/{code}

project/nameLike/{name}

sharedDataType All Endpoints (The SharedDataType property is not a valid entity filter for any endpoint).
budgetTransactions

/budgetChange/{id}

/budgetChange/projectBudget/{id}

/budgetChange/project/{id}

/budgetChange/projectBudget/{id}/code/{code}

/budgetChange/project/{id}/code/{code}"

/budgetChange/code/{code}

/budgetChange/projectBudget/{id}/configuredField/{viewColumnName}/{value}

/budgetChange/project/{id}/configuredField/{viewColumnName}/{value}

/budgetTransfer/{id}

/budgetTransfer/projectBudget/{id}

/budgetTransfer/project/{id}

/budgetTransfer/projectBudget/{id}/code/{code}

/budgetTransfer/project/{id}/code/{code}"

/budgetTransfer/code/{code}

/budgetTransfer/projectBudget/{id}/configuredField/{viewColumnName}/{value}

/budgetTransfer/project/{id}/configuredField/{viewColumnName}/{value}

appliesTo /reason/{id}
flexObject

/field/workspace/{id}

/field/tableName/{name}/columnLabel/{label}

All Fields strategy and strategyType endpoints do not support entity filtering.