Update a static collection - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This web service updates a static collection that was previously added to the user's library.

Method Endpoint
PUT
/api/users/{userId}/collections/{collectionId}
Path parameter Type Description
{userId} String The user's identifier. See the List users or Search users web services to find a user's ID. It is also possible to get a user's ID from the Manage users menu.
{collectionId} String The identifier of the static collection as retrieved when listing collections.

It is necessary to provide an Ft-Calling-App value when using Fluid Topics web services. See Fluid Topics calling app.

Request example

The following lines show an example of a JSON request body:

{
  "title": "My updated static collection",
  "description": "An updated static collection of topics about xyz",
  "color": "green",
  "documents": [
    "a7wNxXBLnM65nqk0xv14ug",
    "wuq~8lXw7YHaFWTkn~CFA"
  ]
}
Field Type Required? Description
title String No A name for the static collection.
description String No A description of the static collection.
color String No A color for the static collection's tag. Accepted values are black, green, blue, purple, red, orange, and yellow.
documents Array No A comma-separated list of the identifiers of the documents to add to the static collection. Web services are available to list maps or unstructured documents with their identifiers. See List maps for structured documents and List documents.

Only the fields included in the JSON body are updated. Fields not included in the JSON body remain unchanged.

Return code Description
20O OK The collection was updated.
400 BAD REQUEST A required parameter is missing or an invalid color was provided for the collection's tag.
401 UNAUTHORIZED The authorization header is absent or invalid.
403 FORBIDDEN The user or API key does not have the USERS_ADMIN or ADMIN role, or the user corresponding to the USER_ID parameter does not have the COLLECTION_USER role.
404 NOT FOUND No user exists with this ID, the identifier for the documents parameter does not correspond to an existing document or no collection matches the COLLECTION_ID.

Response body

The following lines show an example of a JSON request body:

{
  "ownerId": "d433cb2q-8d2f-4aaf-a8fc-917e154b4ceb",
  "id": "bf93cb2q-3070-4aaf-a134-917e154b4ceef",
  "title": "My updated static collection",
  "description": "An updated static collection of topics about xyz",
  "color": "green",
  "documentsUrl": "https://docs.fluidtopics.com/api/users/d433cb2q-8d2f-4aaf-a8fc-917e154b4ceb/collections/bf93cb2q-3070-4aaf-a134-917e154b4ceef/documents",
  "creationDate": "2022-10-22T15:10:07.126+00:00",
  "lastUpdate": "2022-11-05T15:17:25.101+00:00"
}
Field Type Description
ownerId String The identifier of the user who owns the collection.
id String The identifier of the collection.
title String The name of the collection.
description String The description of the collection.
color String The color of the collection's tag.
documentsUrl String A URL to retrieve the list of documents in the collection.
creationDate String The date and time the collection was created.
lastUpdate String The date and time the collection was last updated.

Selecting the URL in the documentsUrl section sends a GET request to list information about each document. This includes URLs to access collection documents in the Reader page.