Get all resource users
get
/crmRestApi/resources/11.13.18.05/resourceUsers
Request
Query Parameters
-
expand: string
When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". More than one child can be specified using comma as a separator. Example: ?expand=Employees,Localizations. Nested children can also be provided following the format "Child.NestedChild" (Example: ?expand=Employees.Managers). If a nested child is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers" (which will expand Employees and Managers).
-
fields: string
This parameter filters the resource fields. Only the specified fields are returned, which means that if no fields are specified, no fields are returned (useful to get only the links). If an indirect child resource is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?fields=Employees.Managers:Empname" is the same as "?fields=;Employees:;Employees.Managers:Empname" (which will only return the "Empname" field for Managers). the value of this query parameter is a list of resource fields. The attribute can be a direct (Example: Employees) or indirect (Example: Employees.Managers) child. It cannot be combined with expand query parameter. If both are provided, only fields will be considered.
Format: ?fields=Attribute1,Attribute2
Format for fields in child resource: ?fields=Accessor1:Attribute1,Attribute2 -
finder: string
Used as a predefined finder to search the collection.
Format: ?finder=<finderName>;<variableName>=<variableValue>,<variableName2>=<variableValue2>
The following are the available finder names and corresponding finder variables:- PartyIdRF: Finds a resource user with the specified party identifier.
Finder Variables:- BindPartyId; integer; The unique primary key identifier of the party associated with the resource.
- PartyNumberRF: Finds a resource user with the specified party number.
Finder Variables:- ResourcePartyNumber; string; The unique identifier of the party associated with the resource.
- PrimaryKey: Finds a resource user with the specified primary key.
Finder Variables:- ResourceProfileId; integer; The unique identifier of the profile of the resource.
- PartyIdRF: Finds a resource user with the specified party identifier.
-
limit: integer
This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
-
links: string
This parameter can be used to show only certain links while accessing a singular resource or a resource collection. The parameter value format is a comma-separated list of : <link_relation>
Example:
self,canonical -
offset: integer
Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
-
onlyData: boolean
The resource item payload will be filtered in order to contain only data (no links section, for example).
-
orderBy: string
This parameter orders a resource collection based on the specified fields. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and "asc" or "desc". Specify "asc" for ascending and "desc" for descending. The default value is "asc". For example, ?orderBy=field1:asc,field2:desc
-
q: string
This query parameter defines the where clause. The resource collection will be queried using the provided expressions. The value of this query parameter is one or more expressions. Example: ?q=Deptno>=10 and <= 30;Loc!=NY
Format: ?q=expression1;expression2
You can use these queryable attributes to filter this collection resource using the q query parameter:- CreatedBy; string; The user who created the record.
- CreationDate; string; The date and time when the record was created.
- FaxCountryCode; string; The country code of the fax.
- IndividualRoleCode; string; The special individual role of the user.
- LastName; string; The last name of the resource.
- LastUpdateDate; string; The date when the record was last updated.
- LastUpdatedBy; string; The user who last updated the record.
- MobilePhoneCountryCode; string; The country code associated with the mobile phone.
- PartyName; string; The name of the person.
- PersonNumber; string; The person number identifier of the worker record of the resource.
- ResourceEmail; string; The email address of the resource.
- ResourceEndDate; string; The date up to which the resource is active.
- ResourceManagerFirstName; string; The first name of the reporting manager of the resource.
- ResourceManagerLastName; string; The last name of the reporting manager of the resource.
- ResourceManagerName; string; The name of the manager of the resource.
- ResourceOrgManagerEmail; string; The email address of the reporting manager of the resource.
- ResourceOrgMemRoleStartDate; string; The date when the resource becomes a member of the organization.
- ResourceOrgRoleCode; string; The code indicating the role of the resource in association with organization membership. For example, SALES_REPRESENTATIVE or SALES_MANAGER.
- ResourceOrgRoleName; string; The role that defines the function of the resource in an organization or hierarchy.
- ResourceOrganizationName; string; The name of the resource organization associated to the resource in managerial role.
- ResourceOrganizationUsage; string; The usage type of the resource organization. For example, Sales or Marketing.
- ResourceParentOrganizationName; string; The name of the organization to which the manager of the resource is associated.
- ResourcePartyId; integer; The unique identifier of the party associated with the resource.
- ResourcePartyNumber; string; The unique identifier of the party associated with the resource.
- ResourceProfileId; integer; The unique identifier of the profile of the resource.
- ResourceStartDate; string; The date when the resource becomes active.
- UserStatus; string; Indicates the the status of the user account for the resource. The supported values are A for active and S for suspended. The status is set to A for new accounts.
- Username; string; The user name or account name, used for login, of the resource user.
- WorkPhoneCountryCode; string; The country code associated with the work phone.
-
totalResults: boolean
The resource collection representation will include the "estimated row count" when "?totalResults=true", otherwise the count is not included. The default value is "false".
Header Parameters
-
Metadata-Context: string
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version: string
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Root Schema : resourceUsers
Type:
Show Source
object-
count(required): integer
The number of resource instances returned in the current range.
-
hasMore(required): boolean
Indicates whether more resources are available on the server than the subset returned in the response. If the value is true, then there are more resources to retrieve from the server. The default value is false.
-
items: array
Items
Title:
ItemsThe items in the collection. -
limit(required): integer
The actual paging size used by the server.
-
links(required): array
Links
Title:
LinksThe link relations associated with the resource instance. -
offset(required): integer
The offset value used in the current page.
-
totalResults: integer
The estimated row count when "?totalResults=true", otherwise the count is not included.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Nested Schema : resourceUsers-item-response
Type:
Show Source
object-
AddressLine1: string
Title:
Address Line 1Maximum Length:240The first line of the address of the resource. -
AddressLine2: string
Title:
Address Line 2Maximum Length:240The second line of the address of the resource. -
BusinessUnit: string
Title:
Business UnitThe name of the business unit associated with the resource. -
City: string
Title:
CityRead Only:trueMaximum Length:60The name of the city provided in the resource's address. -
Country: string
Title:
CountryRead Only:trueMaximum Length:2The name of the country provided in the resource's address. -
County: string
Title:
CountyMaximum Length:60The name of the county provided in the resource's address. -
CreatedBy: string
Title:
Created ByRead Only:trueMaximum Length:64The user who created the record. -
CreateUserAccountFlag: boolean
Title:
Create User AccountIndicates whether a user account can be created for the resource. The default value is true. -
CreationDate: string
(date-time)
Title:
Creation DateRead Only:trueThe date and time when the record was created. -
DeleteFlag: boolean
Read Only:
trueIndicates if the user can delete the resource. -
FaxCountryCode: string
Title:
Phone Country CodeMaximum Length:10The country code of the fax. -
FirstName: string
Title:
First NameMaximum Length:150The first name of the resource. -
FormattedAddress: string
Title:
AddressRead Only:trueMaximum Length:255The primary formatted address of the resource. -
HireDate: string
(date)
Title:
Hire DateThe date when the resource was hired. -
HRManagerEmailAddress: string
Title:
HR Manager EmailThe email address of the human resource manager of the resource. -
IndividualRoleCode: string
Title:
Individual Role CodeMaximum Length:255The special individual role of the user. -
IndividualRoleEndDate: string
(date)
Title:
Individual Role End DateThe date when the individual role ends. -
IndividualRoleStartDate: string
(date)
Title:
Individual Role Start DateThe date when the individual role starts. -
JobCode: string
Title:
Job CodeThe job code assigned to the resource. -
JobTitle: string
Title:
Job TitleRead Only:trueThe title of the job assigned to the resource. -
LastName: string
Title:
Last NameMaximum Length:150The last name of the resource. -
LastUpdateDate: string
(date-time)
Title:
Last Update DateRead Only:trueThe date when the record was last updated. -
LastUpdatedBy: string
Title:
Last Updated ByRead Only:trueMaximum Length:64The user who last updated the record. -
LegalEntity: string
Title:
Legal EntityThe name of the legal entity of associated with the resource. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
MiddleName: string
Title:
Middle NameMaximum Length:60The middle name of the resource. -
MobilePhoneCountryCode: string
Title:
Phone Country CodeMaximum Length:10The country code associated with the mobile phone. -
PartyName: string
Title:
Resource NameRead Only:trueMaximum Length:360The name of the person. -
PersonNumber: string
Title:
Person NumberRead Only:trueThe person number identifier of the worker record of the resource. -
PersonType: string
Title:
Person TypeThe type of the work relationship of a worker associated with the resource. For exampe, Employee, Contingent, or Worker. -
PostalCode: string
Title:
Postal CodeRead Only:trueMaximum Length:60The postal code for the address of resource. -
Province: string
Title:
ProvinceMaximum Length:60The name of the province provided in the resource's address. -
RawFaxNumber: string
Title:
FaxMaximum Length:60The fax number of the resource in raw format. -
RawMobilePhoneNumber: string
Title:
Mobile PhoneMaximum Length:60The mobile phone number of the resource. -
RawWorkPhoneNumber: string
Title:
Work PhoneMaximum Length:60The resource's work phone number in raw format. -
ResourceEmail: string
Title:
EmailMaximum Length:320The email address of the resource. -
ResourceEndDate: string
(date)
Title:
To DateThe date up to which the resource is active. -
ResourceManagerFirstName: string
Title:
Manager First NameMaximum Length:255The first name of the reporting manager of the resource. -
ResourceManagerLastName: string
Title:
Manager Last NameMaximum Length:255The last name of the reporting manager of the resource. -
ResourceManagerName: string
Title:
Manager NameMaximum Length:255The name of the manager of the resource. -
ResourceManagerPartyId: integer
Title:
Manager Party IDRead Only:trueThe unique identifier of the reporting manager of the resource. -
ResourceManagerPartyNumber: string
Title:
Manager Party NumberRead Only:trueMaximum Length:255The unique public identifier of the reporting manager of the resource. -
ResourceOrganizationName: string
Title:
OrganizationMaximum Length:255The name of the resource organization associated to the resource in managerial role. -
ResourceOrganizationUsage: string
Title:
Organization UsageRead Only:trueMaximum Length:255The usage type of the resource organization. For example, Sales or Marketing. -
ResourceOrgManagerEmail: string
Title:
Manager EmailMaximum Length:255The email address of the reporting manager of the resource. -
ResourceOrgMemRoleEndDate: string
(date)
Title:
Membership Role End DateThe date when the membership of the resource ends. -
ResourceOrgMemRoleStartDate: string
(date)
Title:
Organization Membership Role Start DateThe date when the resource becomes a member of the organization. -
ResourceOrgRoleCode: string
Title:
Organization Role CodeMaximum Length:255The code indicating the role of the resource in association with organization membership. For example, SALES_REPRESENTATIVE or SALES_MANAGER. -
ResourceOrgRoleName: string
Read Only:
trueMaximum Length:255The role that defines the function of the resource in an organization or hierarchy. -
ResourceParentOrganizationName: string
Title:
Parent OrganizationMaximum Length:255The name of the organization to which the manager of the resource is associated. -
ResourcePartyId: integer
(int64)
Title:
Party IDThe unique identifier of the party associated with the resource. -
ResourcePartyNumber: string
Title:
Party NumberMaximum Length:30The unique identifier of the party associated with the resource. -
ResourceProfileId: integer
(int64)
Title:
Profile IDRead Only:trueThe unique identifier of the profile of the resource. -
ResourceRoleAssign: array
Resource Role Assignments
Title:
Resource Role AssignmentsThe resource role assignments resource is used to view the role assigned to a resource, such as implementer, reseller, and so on. -
ResourceStartDate: string
(date)
Title:
Resource Start DateThe date when the resource becomes active. -
ResourceType: string
Title:
UsageThe type of the resource. -
State: string
Title:
StateMaximum Length:60The name of the state provided in the resource's address. -
TimezoneCode: string
Title:
Time Zone CodeMaximum Length:64The code for the time zone of the resource. -
Title: string
Title:
TitleMaximum Length:60The title preceding the name of the resource. -
TopResourceFlag: boolean
Title:
Root ResourceDefault Value:falseIndicates whether the resource is top user in hierarchy. -
UpdateFlag: boolean
Title:
Update AccessRead Only:trueIndicates if the user can update the resource. -
Username: string
Title:
User NameRead Only:trueThe user name or account name, used for login, of the resource user. -
UserStatus: string
Title:
User Account StatusMaximum Length:255Indicates the the status of the user account for the resource. The supported values are A for active and S for suspended. The status is set to A for new accounts. -
WorkPhoneCountryCode: string
Title:
Phone Country CodeMaximum Length:10The country code associated with the work phone.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Nested Schema : Resource Role Assignments
Type:
arrayTitle:
Resource Role AssignmentsThe resource role assignments resource is used to view the role assigned to a resource, such as implementer, reseller, and so on.
Show Source
Nested Schema : link
Type:
Show Source
object-
href: string
Title:
hyperlink referenceThe URI to the related resource. -
kind: string
Title:
kindAllowed Values:[ "collection", "item", "describe", "other" ]The kind of the related resource. -
name: string
Title:
nameThe name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relationAllowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Nested Schema : resourceUsers-ResourceRoleAssign-item-response
Type:
Show Source
object-
EndDateActive: string
(date)
Title:
To DateThe date when the resource role becomes inactive. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
PartyName: string
Title:
ResourceMaximum Length:360The name of the party. -
RoleCode: string
Read Only:
trueMaximum Length:30The value of the code for the role assigned to the resource. -
RoleId: integer
Title:
RoleThe unique identifier of the role. -
RoleRelateId: integer
Read Only:
trueRole Relation identifier (PK) -
RoleResourceId: integer
The unique identifier of the resource role.
-
StartDateActive: string
(date)
Title:
From DateThe date when the resource role become active.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Examples
The following example shows how to get all resource users by submitting a GET request on the REST resource using cURL.
cURL Command
curl -u
<username:password> \ -X GET
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/resourceUsers
Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"items": [
{
"ResourceProfileId": 100000001163506,
"PartyName": "Ian Maddox",
"LastUpdateDate": "2004-10-26T00:00:00+00:00",
"LastUpdatedBy": "1001530",
"CreationDate": "2000-10-03T10:35:48+00:00",
"CreatedBy": "1000200",
"ResourceType": "INDIVIDUAL",
"FormattedAddress": null,
"TimezoneCode": null,
"Username": null,
"City": null,
"Country": null,
"PostalCode": null,
"UpdateFlag": "true",
"DeleteFlag": "false",
"FirstName": "Ian",
"LastName": "Maddox",
"MiddleName": "John",
"Title": null,
"ResourcePartyNumber": "5017",
"State": null,
"ResourceEmail": "sendmail-test-discard@oracle.com",
"RawWorkPhoneNumber": null,
"RawMobilePhoneNumber": null,
"RawFaxNumber": null,
"AddressLine1": null,
"AddressLine2": null,
"ResourceStartDate": "1998-01-26",
"ResourceEndDate": "4712-12-31",
"ResourcePartyId": 6623,
"ResourceOrganizationName": null,
"ResourceOrganizationUsage": null,
"ResourceOrgMemRoleEndDate": null,
"ResourceOrgRoleCode": null,
"ResourceParentOrganizationName": null,
"ResourceOrgManagerEmail": null,
"ResourceManagerName": null,
"ResourceManagerFirstName": null,
"ResourceManagerLastName": null,
"HRManagerEmailAddress": null,
"HireDate": null,
"ResourceOrgMemRoleStartDate": null,
"IndividualRoleCode": null,
"IndividualRoleStartDate": null,
"IndividualRoleEndDate": null,
"ResourceManagerPartyNumber": null,
"County": null,
"Province": null,
"ResourceManagerPartyId": null,
"TopResourceFlag": null,
"PersonNumber": null,
"BusinessUnit": null,
"LegalEntity": null,
"JobCode": null,
"JobTitle": null,
"UserStatus": null,
"PersonType": null,
"CreateUserAccountFlag": null,
"links": [
...
]
},
{
"ResourceProfileId": 100000001163507,
"PartyName": "Parminder Manandhar",
"LastUpdateDate": "2004-10-26T00:00:00+00:00",
"LastUpdatedBy": "1001530",
"CreationDate": "2000-10-03T10:35:48+00:00",
"CreatedBy": "1000200",
"ResourceType": "INDIVIDUAL",
"FormattedAddress": null,
"TimezoneCode": null,
"Username": null,
"City": null,
"Country": null,
"PostalCode": null,
"UpdateFlag": "true",
"DeleteFlag": "false",
"FirstName": "Parminder",
"LastName": "Manandhar",
"MiddleName": null,
"Title": null,
"ResourcePartyNumber": "4912",
"State": null,
"ResourceEmail": "sendmail-test-discard@oracle.com",
"RawWorkPhoneNumber": null,
"RawMobilePhoneNumber": null,
"RawFaxNumber": null,
"AddressLine1": null,
"AddressLine2": null,
"ResourceStartDate": "1997-06-02",
"ResourceEndDate": "4712-12-31",
"ResourcePartyId": 6518,
"ResourceOrganizationName": null,
"ResourceOrganizationUsage": null,
"ResourceOrgMemRoleEndDate": null,
"ResourceOrgRoleCode": null,
"ResourceParentOrganizationName": null,
"ResourceOrgManagerEmail": null,
"ResourceManagerName": null,
"ResourceManagerFirstName": null,
"ResourceManagerLastName": null,
"HRManagerEmailAddress": null,
"HireDate": null,
"ResourceOrgMemRoleStartDate": null,
"IndividualRoleCode": null,
"IndividualRoleStartDate": null,
"IndividualRoleEndDate": null,
"ResourceManagerPartyNumber": null,
"County": null,
"Province": null,
"ResourceManagerPartyId": null,
"TopResourceFlag": null,
"PersonNumber": null,
"BusinessUnit": null,
"LegalEntity": null,
"JobCode": null,
"JobTitle": null,
"UserStatus": null,
"PersonType": null,
"CreateUserAccountFlag": null,
"links": [
...
]
},
...
Note:
You can get the management hierarchy for a user by setting the RecordSet filter to 'ORA_MYMANAGERANDPEERS'. Call the API twice to get the results for 'ORA_MYMANAGERANDPEERS' for the specific user as follows:- Get the PrimaryOrganization name using
/crmRestApi/resources/11.13.18.05/resourceUsers?q=Username=?or/crmRestApi/resources/11.13.18.05/resourceUsers/{resourceUsersUniqID} - Get all the resources under the organization, which includes manager and peers
using
/crmRestApi/resources/11.13.18.05/resources?q=PrimaryOrganization=?