This web service creates a new manual collection and adds it to the user's library.
| Method | Endpoint |
|---|---|
POST |
|
| 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. |
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 example shows a JSON request body for this web service:
{
"title": "My new manual collection",
"description": "A manual collection of topics about xyz",
"color": "green",
"documents": [
"a7wNxXBLnM65nqk0xv14ug",
"wuq~8lXw7YHaFWTkn~CFA"
]
}
| Field | Type | Required? | Description |
|---|---|---|---|
title |
String | Yes | A name for the manual collection. |
description |
String | Yes | A description of the manual collection. |
color |
String | Yes | A color for the manual collection's tag. Accepted values are black, green, blue, purple, red, orange, and yellow. |
documents |
Array | Yes | A comma-separated list of the identifiers of the documents to add to the manual collection. Web services are available to retrieve the identifiers. See List maps for structured documents and List documents for unstructured documents. |
| Return code | Description |
|---|---|
201 CREATED |
The manual collection was created. |
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, or an identifier provided for the documents parameter does not correspond to an existing document. |
Response body
The following example shows a JSON response body for this web service:
{
"ownerId": "d433cb2q-8d2f-4aaf-a8fc-917e154b4ceb",
"id": "bf93cb2q-3070-4aaf-a134-917e154b4ceef",
"title": "My new manual collection",
"description": "A manual 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-10-22T15:10:07.126+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 when the collection was created. |
lastUpdate |
String | The date and time when 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.