Updates the personal collection specified by {personal_collection_id}.

You can’t use a PUT request to change individual attributes. Those you don’t specify in the request will return to their default values (or ""). This means that to update one or more attributes, you must first get the existing attributes using the corresponding GET request, and then write them back with the changes using the PUT request. Writing read-only attributes has no effect.

Query parameters

None

Body parameters

NameTypeDescriptionDefault
bookmarks array An array of bookmarks, each representing a dataset or collection1.
description string Long description of this personal collection.
display_name string Name of this personal collection.

1 See the format shown on the PersonalCollection model.

Responses

CodeReturns
200 The personal collection model for the updated personal collection.
401 Invalid login credentials
404 Requested resource not found

Example

This example adds the specified dataset to the specified personal collection. The request body includes the display_name as it is a required attribute.

Request

$ curl -X PUT 'https://public.enigma.com/api/personal-collections/d5fa3540-98e9-4d35-bc4d-e0478f2dfdd5' -H 'Authorization: Bearer <APIKEY>' -H 'content-type: application/json' \
  -d '{
    "bookmarks": [
      {
        "collection": null,
        "dataset": {
          "description": "Details on medications and dosage reported for each adverse event in 2014. The Primary ID and Drug Sequence No. can be used to link to other tables within this dataset.",
          "description_short": "Details on medications and dosage reported for each adverse event in 2014. The Primary ID and Drug Sequence No. can be used to link to other tables within this dataset.",
          "display_name": "Drug Information 2014",
          "id": "55a5ec14-de6d-40ed-aa0b-160f07231b4c",
          "published": true
        }
      }
    ],
    "display_name": "Test"
}'

Response

{
  "bookmarks": [
    {
      "collection": null,
      "dataset": {
        "description": "Details on medications and dosage reported for each adverse event in 2014. The Primary ID and Drug Sequence No. can be used to link to other tables within this dataset.",
        "description_short": "Details on medications and dosage reported for each adverse event in 2014. The Primary ID and Drug Sequence No. can be used to link to other tables within this dataset.",
        "display_name": "Drug Information 2014",
        "id": "55a5ec14-de6d-40ed-aa0b-160f07231b4c",
        "published": true
      }
    }
  ],
  "description": "",
  "display_name": "Test",
  "id": "52cd9ca6-c29f-489e-9931-6145e59090d7"
}