Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This service will query for an organization or multiple organizations and provide you with the roles associated. The XML/JSON response will be by person, not by role or org. For each distinct role+employee match, there will be 1 <Role> loop. For example, employee 10780 has 3 roles in the same Cost Center, so he will come as 3 <Role> nodes, 1 for each role he has.


Service Contract: DRAFT_GetRoles.xlsx

Endpoint: https://gw-dev.its.yale.edu/soa-gateway/GetRoles

 

Parameters: These can be added in any amount, all can be used, just one, or any combination of them. However, at least 1 parameter value must be used for this service. In order to use "roles" you must use it with an identifier parameter, like name. To use multiple parameters place "&" in between the parameter names.

You are required to enter a set of these parameters:

Option A:

type=  (Ex. Cost_Center, Supervisory)

page=  (The response will be paginated, this must be used with batches, you will get the totalpages in the response so you know how many times to loop)

recordsperpage= (the quantity of records you want in each page, the options are 1-999)

Option B:

code= (Ex. CC0001)

You are not required to enter this parameter, but can with option A or B above in order to limit your response to one role:

role=

You may send this parameter with any set of options to receive the response in json instead of XML:

outputformat=json

 

Examples:

Batch for Cost Center (limit by org type)-

https://gw-dev.its.yale.edu/soa-gateway/GetRoles?type=COST_CENTER&page=1&recordsperpage=10

Batch for Cost Center P2P Approver (limit by type and role)-

https://gw-dev.its.yale.edu/soa-gateway/GetRoles?type=COST_CENTER&page=1&recordsperpage=10&role=Cost Center P2P Unlimited Approver

Batch for Supervisory in JSON-

https://gw-dev.its.yale.edu/soa-gateway/GetRoles?type=SUPERVISORY&page=1&recordsperpage=10&outputformat=json

One Supervisory Org-

https://gw-dev.its.yale.edu/soa-gateway/GetRoles?code=SO100113

One Supervisory with One Role-

https://gw-dev.its.yale.edu/soa-gateway/GetRoles?code=SO100113&role=HR Partner

One Cost Center in JSON-

https://gw-dev.its.yale.edu/soa-gateway/GetRoles?code=CC0119&outputformat=json

One Supervisory Org with One Role in JSON-

https://gw-dev.its.yale.edu/soa-gateway/GetRoles?code=CC0119&outputformat=json&role=Cost Center Financial Analyst

 

Example XML:

Example Response
<Roles xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wd="urn:com.workday/bsvc">
   <Header>
      <Page>1</Page>
      <TotalPages>164</TotalPages>
   </Header>
   <Role>
      <Cd>CC0001</Cd>
      <Nm>HOSBUS Business Office</Nm>
      <Inactive>0</Inactive>
      <Type>COST_CENTER</Type>
      <RoleID>Cost_Center_Financial_Analyst</RoleID>
      <RoleNm>Cost Center Financial Analyst</RoleNm>
      <WorkerNm>Gagliardi, Anthony Dai</WorkerNm>
      <EmpID>151677</EmpID>
   </Role>

Example JSON:

Example Response
{"Roles": {
   "Header":    {
      "Page": "1",
      "TotalPages": "425"
   },
   "Role":    [
            {
         "RoleNm": "HR Partner",
         "Nm": "Department of Applied Physics",
         "EmpID": "154097",
         "Type": "SUPERVISORY",
         "Inactive": "0",
         "Cd": "SO100113",
         "RoleID": "HR_Partner",
         "WorkerNm": "Huber, Kyleen"
      }



  • No labels