---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Workday REST API, REST API, REST Services]
nav: wcp_docs
parent_url: /wcp_docs/
title: Call Workday REST APIs in Extend Apps
layout: subsection
---

### Prerequisites

<a id="prereq_N10021_N1001E_N10001"></a>
-   An Extend app built with App Builder or an integrations app built with Orchestration Builder.
-   Configure security policies required by the Workday REST APIs.

    A security domain or business process security policy secures each REST method. If the current user can't access that domain or business process, the REST method can't access it. Note that Workday REST APIs require the Report/Task permissions in the security policy, whether the user is an ISU or an individual user.



### Context

<a id="context_N1003D_N1001E_N10001"></a>
Workday REST APIs provide access to Workday services and data through the API Gateway. A Workday REST API endpoint uses this URL format:

```
  https://api.workday.com/{service}/{version}/{resource}
```

Use the REST API Explorer to see the available Workday REST APIs from the various Workday services. From the REST API Explorer, you can sign in the tenant and run the REST APIs against tenanted data. You can run and test the REST APIs that meet your custom app requirements. In a custom app, you can use Workday REST APIs as:

-   Inbound endpoints - Retrieve data using the GET method.
-   Outbound endpoints - Modify data using the POST, PUT, or DELETE methods.


### Steps

1.  <a id="step_N10060_N1005D_N1001E_N10001"></a>Open your custom app in App Builder.
2.  <a id="step_N10069_N1005D_N1001E_N10001"></a>In the App Metadata (.amd) file, add the base URL of the Workday service to `dataProviders[]`.
3.  <a id="step_N1007F_N1005D_N1001E_N10001"></a>To call an inbound endpoint in a PMD file, add the `endPoints[]` array. Add the GET endpoint with any required query parameters to `endPoints[]`. Enter these required attributes:

    -   `name` - The endpoint reference name.
    -   `baseUrlType` - The data provider `key` in the AMD. Example: `workday-staffing`.
    -   `authType` - The authentication used by the Workday REST API, which is SSO.
    -   `url` - The portion of the URI that follows the `baseUrlType`.

4.  <a id="step_N100CD_N1006E_N1002C_N10001"></a>On each PMD tag that displays data from the inbound endpoint, set the `value` attribute to a binding to the endpoint field. Specify its value using the inbound endpoint name and path to the field in the JSON response body.
5.  <a id="step_N100DA_N1006E_N1002C_N10001"></a>To call an outbound endpoint in a PMD file, add the `outboundData` subschema with the `outboundEndPoints[]` array. Note that when you add `outboundData` to the PMD, it becomes an edit page. Add the POST, PUT, or DELETE endpoint to `outboundEndPoints[]`. Enter these required attributes:

    -   `name` - The endpoint reference name.
    -   `baseUrlType` - The data provider `key` in the AMD. Example: `workday-staffing`.
    -   `authType` - The authentication used by the Workday REST API, which is SSO.
    -   `url`: The portion of the URI that follows the `baseUrlType`.
    -   `httpMethod` - POST, PUT, or DELETE.

6.  <a id="step_N10145_N1005D_N1001E_N10001"></a>On each PMD tag that contains outbound data for the outbound endpoint, set the `valueOutBinding` attribute. The `valueOutBinding` attribute declares how its value binds to your outbound endpoint. Specify its value using the outbound endpoint name and path to the field in the JSON request body.
7.  <a id="step_N1014E_N1005D_N1001E_N10001"></a>Validate and deploy your app to the tenant to test.


### Example

This example uses the `/workers` REST API, which is a Workday `staffing` service.

In the AMD, add the base URL to `dataProviders[]`:

```
{
  "key" : "workday-staffing",
  "value" : "https://api.workday.com/staffing/v1/"
}
```

In a PMD, add this inbound endpoint to `endPoints[]`:

```
{
      "baseUrlType": "workday-staffing",
      "name": "worker",
      "authType": "sso",
      "url": "<% 'workers/' + queryParams.workerId %>"
    }
```

<b>Note:</b> This endpoint constructs its URL by pulling in a value from the `queryParams` variable on the binding context. The `workerId` field contains the value you defined in the routing pattern of the task that launched this page. The fully constructed endpoint looks something like GET `https://api.workday.com/staffing/v1/workers/123456789`.

In the PMD, add this `instanceList` widget:

```
{
          "id": "workerInstance",
          "type": "instanceList",
          "label": "Worker",
          "instanceList": [
            {
              "id": "<% worker.id %>",
              "descriptor": "<% worker.descriptor %>",
              "wid": "<% worker.id %>"
            }
          ]
}
```

### Related Information

[Concept: Page Metadata](/wcp_docs/oau1528861566075.html)

[Concept: App Metadata](/wcp_docs/qdr1547677184237.html)

[Concept: Site Metadata](/wcp_docs/gpx1528861218724.html)

[Get Started with API Explorer](/rest-api-explorer)

[Administrator Guide: Edit Domain Security Policies](https://doc.workday.com/access/sources/dita/topic?wd:docset=adminguide&ft:locale=en-US&resourceid=dan1370797389950)

[Administrator Guide: Edit Business Process Security Policies](https://doc.workday.com/access/sources/dita/topic?wd:docset=adminguide&ft:locale=en-US&resourceid=dan1370796362110)

[Reference: Workday Extend API Gateways and Authorization Base URLs](/wcp_docs/dlh1653340161856.html)

