Replace a Catalog object

You can overwrite the contents of a Catalog object using a PUT request, wherein the entire resource is replaced with the request payload.

NOTE
If you only need to update a few specific fields within a Catalog object, using a PATCH request may be more efficient.

API format

PUT /{OBJECT_TYPE}/{OBJECT_ID}
Parameter
Description
{OBJECT_TYPE}

The type of Catalog object to be replaced. Valid objects are:

  • batches
  • dataSets
  • dataSetFiles
{OBJECT_ID}
The identifier of the specific object you want to update.

Request

The following request overwrites a dataset with the values provided in the payload.

curl -X PUT \
  https://platform.adobe.io/data/foundation/catalog/dataSets/5ba9452f7de80400007fc52a \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'x-sandbox-name: {SANDBOX_NAME}' \
  -d '{
        "name": "New Dataset Name",
        "description": "New description for dataset",
        "tags": {
            "adobe/pqs/table": [
                "sample_dataset"
            ]
        },
        "files": "@/dataSetFiles?dataSetId=5ba9452f7de80400007fc52a"
    }'

Response

A successful response returns an array containing the ID of the overwritten object. This ID should match the one sent in the PUT request. Performing a GET request for this object now shows that its details have be replaced with those provided in the payload of the previous PUT request.

[
    "@/dataSets/5ba9452f7de80400007fc52a"
]
recommendation-more-help
c5c02be6-79a3-4a2f-b766-136bffe8b676