Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Data Source:  Workday (roles) /COAHub / People Hub (identifiers/name)

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.

Endpoint: To Request Access: Request access to COA Validator/Segment Service/COA Integration Hub (includes Roles)


GetRoles Service Contract: GetRoles_v1.xlsx


Endpoints:

Test:

https://gw-

...

tst.its.yale.edu/soa-gateway/COAHub/

...

v1/GetRoles

Production:

https://gw.its.yale.edu/soa-gateway/COAHub/v1/GetRoles


Parameters: These can be added in any amount, all can be used, just one, or any combination of them. However, at least 1 required 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 restricted to which Roles you may see you must pass one of the Role parameter values.

You are required to enter a set one of these parameters:

Option A:

typerole=   (Ex. Cost _ Center , SupervisoryManager)page

Option B:

roleid=   (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:

(Ex. cost_center_manager)

You are may optionally enter any of these parameters:

Netid=

UPI=

type=  (Ex. Cost_Center, Supervisory)

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 Manager (limit by org typerole)-

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&COAHub/v1/GetRoles?role=Cost Center P2P Unlimited Approver

...

Manager

One Supervisory Org-

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/COAHub/v1/GetRoles?code=SO100113

One Supervisory with One Role-

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

One Cost Center in JSON-

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

One Supervisory Org with One Role in JSON-

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

...

Orgs for One person and One Role:

https://gw-dev.its.yale.edu/soa-gateway/COAHub/v1/GetRoles?role=Cost Center Manager&netid=cf394


Example XML:

Code Block
languagexml
titleExample Response
<Roles xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wd="urn:com.workday/bsvc"><Roles>
    <Header>
      <Page>1<<Version>1.0</Page>Version>
      <TotalPages>164<<Count>134</TotalPages>Count>
   </Header>
   <Role>
      <Cd>CC0001<<Cd>CC0501</Cd>
      <Nm>HOSBUS<Nm>FASPHY Physics BusinessResearch Office<Unit</Nm>
      <Inactive>0</Inactive>
      <Type>COST_CENTER</Type>
      <RoleID>Cost_Center_Financial_Analyst</RoleID>
      <RoleNm>Cost Center Financial Analyst</RoleNm>
      <WorkerNm>Gagliardi<WorkerNm>Fagan, AnthonyPauline Dai<A</WorkerNm>
      <EmpID>151677<<EmpID>4504</EmpID>
      <NETID>pfagan</NETID>
      <UPI>10075276</UPI>
      <Email>pauline.fagan@yale.edu</Email>
      <LoadDt>2017-05-18</LoadDt>
   </Role>
</Roles>

Example JSON:

Code Block
languagexml
titleExample Response
{
  "Roles": {
    "Header":    {
      "PageCount": "1",
      "TotalPagesVersion": "4251.0"
    },
    "Role": {
  [          "RoleNm": "Business Partner",
  {          "RoleNmNm": "HR PartnerDepartment of Applied Physics",
            "NmNETID": "Department of Applied Physics"mac247",
            "Email": "melissa.wojciechowski@yale.edu",
            "EmpID": "15409781827",
            "Type": "SUPERVISORY",
            "Inactive": "0",
            "Cd": "SO100113",
            "LoadDt": "2017-05-18",
            "UPI": "12051628",
            "RoleID": "HRbusiness_Partnerpartner",
            "WorkerNm": "HuberWojciechowski, Melissa KyleenA"
    }
  }
}