---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Workday API, Administration & Integrations/Data Migration Tools, Administration & Integrations/Data Migration Tools/Prepare Your Data, Analytics and Reporting, Analytics & Reporting, Analytics and Reporting/Prism Analytics]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Steps: Load Data into a Table Using the REST API
layout: subsection
---

### Prerequisites

<a id="prereq_N1005D_N1005A_N10001"></a>
Security:

-   <i>Prism: Tables Create</i> domain in the Prism Analytics functional area.
-   <i>Prism: Tables Manage</i> domain in the Prism Analytics functional area.


### Context

<a id="context_N10079_N1005A_N10001"></a>
The Prism Analytics REST API enables you to programmatically create and push external data into a Prism Analytics table. You can load data into a table once or on a regular basis. You can load data into a table you just created, or an existing table.

Use this URL when you use the REST API version 2 to access the Datasets and wBuckets resources:

```
https://{hostname}/ccx/api/prismAnalytics/{version}/{tenantname}
```

Use this URL when you use the REST API version 3 to access the Tables and Buckets resources:

```
https://{hostname}/api/prismAnalytics/{version}/{tenantname}
```

<b>Note:</b>

To create and load data into a Prism Analytics table with the REST API, you must specify v2 or v3 as the version.

Integration system users can’t create a table.

These instructions include links to the REST resources for version 2. You can find the resources for version 3 online in the Workday REST Services Directory.

### Steps

1.  <a id="step_N10059_N10056_N10047_N10001"></a>Register your API client in your tenant using the <b>Register API Client for Integrations</b> task.

    Select <b>Include Workday Owned Scope</b> when you register. For more information, see [Register API Clients for Integrations](/wcp_docs/dan1370797831458.html#).

2.  <a id="step_N10088_N1006C_N10047_N10001"></a>Get the ID of an existing or new table.
    1.  (Optional) Get a list of existing tables to retrieve the ID of the table you want to load data into.

        Use the Tables resource for v3, and the Datasets resource for v2. See [Reference: Datasets](/wcp_docs/ysi1529106266929.html#).

    2.  (Optional) Create a table while specifying the table name and fields in the body of the POST request. Note the table ID in the response.

        The table name you specify is the table API name. Optionally, you can also specify a display name. API names and display names must conform to name validation rules.

        Use the Tables resource for v3, and the Datasets resource for v2. See [Reference: Datasets](/wcp_docs/ysi1529106266929.html#).


3.  <a id="step_N10089_N1005C_N10047_N10001"></a>Create a bucket for the table from the previous step.

    In the body of the POST request JSON:

    -   Specify a unique name for the bucket. Bucket names must conform to name validation rules.
    -   Specify the table ID in the targetDataset parameter.
    -   Describe the schema of the data files you'll upload to the bucket. The schema must be the same or a subset of the table schema.

    Use the Buckets resource for v3, and the wBuckets resource for v2. See:

    -   [Reference: wBuckets](/wcp_docs/sqj1530145901439.html#)
    -   [Reference: Table and Dataset Field Attributes](/wcp_docs/spq1529536811680.html#)
    -   [Reference: File Parse Options](/wcp_docs/eyj1529536831964.html#)

4.  <a id="step_N100A6_N1005C_N10047_N10001"></a>Upload 1 or more files into the bucket. Specify the bucket ID in the URL of the POST request.

    Consider these rules:

    -   You can upload 1 file in each POST request. To upload multiple files into the bucket, create multiple POST requests either sequentially or concurrently.
    -   Files must be gzip compressed.
    -   Each filename in a bucket must be unique.
    -   The schema of the files you upload must match the schema defined in the bucket.
    -   The maximum number of concurrent uploads is 10.

    Use the Buckets/Files resource for v3, and the wBuckets/Files resource for v2. See:

    -   [Reference: wBuckets/Files](/wcp_docs/rku1530580707508.html#)
    -   [Reference: Source File Format Requirements](/wcp_docs/hsa1529966246818.html#)

    <b>Note:</b> You should retry the request if Workday returns HTTP response status code of 429 Too Many Requests.

5.  <a id="step_N100AE_N1005C_N10047_N10001"></a>After you’ve successfully uploaded all files to the bucket, load the data into the table. You do this by running the complete call on the bucket.

    This call starts a background process that moves the data from its temporary location into the table. This call either replaces or appends the table depending on the operation parameter in the body of the POST Buckets or wBuckets call. You can only call this resource on a bucket once and only when the state of the bucket is New. When this call succeeds, Workday changes the bucket state to Processing and immediately returns a success response. Then in the background, Workday starts the process to commit the data into the table.

    Use the Buckets/Complete resource for v3, and the wBuckets/Complete resource for v2. See [Reference: wBuckets/Complete](/wcp_docs/dms1530580724946.html#).

6.  <a id="step_N10125_N10068_N10047_N10001"></a>Get the status of the bucket. You might want to get the bucket status to find out what state it's in, such as Processing, Success, or Failed.

    Use the Buckets resource for v3, and the wBuckets resource for v2. See [Reference: wBuckets](/wcp_docs/sqj1530145901439.html#).

    You can view the status of the bucket loading data into the table on the <b>Activities</b> tab of the <b>View Table</b> report for the table associated with the bucket.

7.  <a id="step_N10187_N10081_N10047_N10001"></a>In the Workday UI, create a derived dataset using this table as the base.


### Related Information

[Reference: Naming Guidelines](/wcp_docs/mbh1617053010020.html)

