---
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 Dataset Using the REST API
layout: subsection
---

### Prerequisites

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

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


### Context

<a id="context_N10050_N10047_N10001"></a>
The Prism Analytics REST API enables you to programmatically create and push external data into a Prism Analytics dataset. When you use the REST API, you create and load into an API dataset. An API dataset is a specific type of base dataset.

API base datasets are similar to base datasets created in the UI, except you can't edit or publish an API dataset. Create a derived dataset using the API dataset as its base if you want to make any edits.

<b>Note:</b> If you're new to Workday, you don't have access to version 1 to create or edit base datasets.

You can load data into an API dataset once or on a regular basis. You can load data into an API dataset you just created, or an existing API dataset.

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

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

<b>Note:</b>

To create and load data into a dataset with the REST API, you must specify v1 as the version.

Integration system users can’t create a dataset.

### 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.

2.  <a id="step_N10088_N1006C_N10047_N10001"></a>Get the ID of an existing or new API dataset.
    1.  (Optional) Get a list of existing API datasets to retrieve the ID of the dataset you want to load data into.
    2.  (Optional) Create an empty dataset while specifying the dataset name in the body of the post request. Note the dataset ID in the response.

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


3.  <a id="step_N10089_N1005C_N10047_N10001"></a>Create a wBucket for the dataset from the previous step. In the body of the post request, enter JSON that specifies a unique name for the wBucket and describes the structure of the data files you'll upload to the wBucket. Use the dataset ID in the targetDataset parameter.

    wBucket names must conform to name validation rules.

4.  <a id="step_N100A6_N1005C_N10047_N10001"></a>Upload 1 or more files into the wBucket. Specify the wBucket 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 wBucket, create multiple post requests either sequentially or concurrently.
    -   Files must be gzip compressed.
    -   Each filename in a wBucket must be unique.
    -   The schema of the file you upload must match the schema defined in the wBucket.

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

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

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

    You can use the <b>WBucket Monitor</b> task in the Workday UI to view the current information on all wBuckets, such as the associated dataset, state, and the user who modified it most recently.

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


### Related Information

[Register API Clients for Integrations](/wcp_docs/dan1370797831458.html)

[Reference: File Parse Options](/wcp_docs/eyj1529536831964.html)

[Reference: Source File Format Requirements](/wcp_docs/hsa1529966246818.html)

[Reference: Table and Dataset Field Attributes](/wcp_docs/spq1529536811680.html)

[Reference: wBuckets](/wcp_docs/sqj1530145901439.html)

[Reference: wBuckets/Complete](/wcp_docs/dms1530580724946.html)

[Reference: wBuckets/Files](/wcp_docs/rku1530580707508.html)

