---
title: "Create or update data mapping items"
method: POST
path: "/gdc/dataload/dataSources/{dataSourceId}/dataMapping/bulk/upsert"
tags: ["cloudresource"]
---

# Create or update data mapping items

`POST /gdc/dataload/dataSources/{dataSourceId}/dataMapping/bulk/upsert`

## Request

- Base URL: `https://secure.gooddata.com`
- URL: `https://secure.gooddata.com/gdc/dataload/dataSources/{dataSourceId}/dataMapping/bulk/upsert`
- Auth: none declared

**NOTE:** Only Data Source users can create or update data mapping items.</br>
**Request body parameters** </br>
-  `project_id` (optional, string) specifies the project by which you want to filter data mapping items.
-  `client_id` (optional, string) specifies the ID of the client by which you want to filter data mapping items. You can use a client ID only if the project belongs to an LCM segment.

## Request body

- DataMapping
  - `dataMapping` DataMappingCommon, required: The datamapping you want to create or update
    - `items` MappingItem[], required
      - `mappingItem` MappingItemCommon, required: The datamapping you want to create or update data mapping items.
        - `clientId` string
        - `projectId` string
        - `value` string, required

## Response `200`

OK - create or update data mapping

- DataMapping1
  - `dataMapping` DataMappingResponse, required
    - `items` MappingItem1[], required
      - `mappingItem` MappingItemResponse, required
        - `clientId` string
        - `projectId` string
        - `value` string, required
        - `links` object, required
          - `parent` string, uri, required
          - `self` string, uri, required
    - `paging` Paging: Paging structure containing link to the next page.
      - `next` string, uri, nullable: Uri to next page, when such page exists.
    - `links` object
      - `self` string, uri, required

## Other responses

- `400`: Not Found
- `403`: Forbidden - if current user is not the owner of the data source

---

[API](https://skmtc.dev/gooddata/apis/gooddata-api-documentation.md) - [All operations](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/revisions/e5dc0ee6ab00?raw)
