Card Collections
Collections are groups of cards that are either user-created or automatically created from files that are uploaded. On this page, we'll dive into how to manage collections programmatically.
The collection model
The collection model contains all the information about your collections, including what cards are in the collection and the collection's name, description, and author.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the collection.
- Name
author_id
- Type
- string
- Description
The author id of the user who created the collection.
- Name
description
- Type
- string
- Description
The description of the collection.
- Name
name
- Type
- string
- Description
The name of the collection.
- Name
is_public
- Type
- boolean
- Description
Whether the collection is visible to other users or not.
- Name
created_at
- Type
- timestamp
- Description
Timestamp of when the collection was created.
- Name
updated_at
- Type
- timestamp
- Description
Timestamp of when the collection was updated.
List collections for a user
This route allows you to retrieve a list of all of the collections for a user.
Response
If the response is successful it will return a 200 status code and an array of collection objects with file ids appended.
- Name
id
- Type
- string
- Description
Unique identifier for the collection.
- Name
author_id
- Type
- string
- Description
The author id of the user who created the collection.
- Name
description
- Type
- string
- Description
The description of the collection.
- Name
name
- Type
- string
- Description
The name of the collection.
- Name
is_public
- Type
- boolean
- Description
Whether the collection is visible to other users or not.
- Name
created_at
- Type
- timestamp
- Description
Timestamp of when the collection was created.
- Name
updated_at
- Type
- timestamp
- Description
Timestamp of when the collection was updated.
- Name
file_id
- Type
- string
- Description
File id of the file that the collection was created from.
Request
curl -G 'https://api.arguflow.ai/api/user/collections/c9379ab0-389d-4204-8602-5ba1bf99d441'
Response
[
{
"id": "8739b180-4bf1-4936-93f6-771d2d018c70",
"author_id": "c9379ab0-389d-4204-8602-5ba1bf99d441",
"name": "Collection for file Alien Futurity Negative - UTNIF 2018.docx",
"is_public": true,
"description": "",
"created_at": "2023-07-20T11:55:21.445201",
"updated_at": "2023-07-20T11:55:21.445294",
"file_id": "2cdf94d5-9be3-4280-81c8-2c1cb7eb8f36"
},
//...
]
Create a collection
This route allows you to create a new collection. (Must be authenticated to use)
Required attributes
- Name
name
- Type
- string
- Description
The name of the collection.
- Name
is_public
- Type
- boolean
- Description
Whether the collection is visible to other users or not.
Optional attributes
- Name
description
- Type
- string
- Description
The description of the collection.
Response
If the response is successful it will return a 204 status code with no body.
Request
curl -L -g 'https://api.arguflow.ai/api/card_collection' \
--header 'Cookie: ai-editor=your_cookie_value_here' \
-d '{
"name": "Debating for these guys",
"is_public": false,
"description": "More data about this collection of card"
}'
Delete a collection
This route allows you to delete collections. Note: This will delete the collection, but not the card inside of it.
Required attributes
- Name
collection_id
- Type
- string
- Description
The id of the collection you wish to delete.
Response
If the response is successful it will return a 204 status code with no body.
Request
curl -X DELETE https://api.arguflow.ai/api/card_collection \
--header 'Cookie: ai-editor=your_cookie_value_here'\
-d '{
"collection_id": "1890301f-0e2f-4298-836c-19d74a9a778b"
}'
Update a collection
This route allows you to perform an update on a collection. Examples of updates are changing the name, description, or visibility status of the collection. (Must be authenticated and must be your collection)
Required attributes
- Name
collection_id
- Type
- string
- Description
The id of the collection you wish to update.
Optional attributes
- Name
name
- Type
- string
- Description
The new name for the collection.
- Name
description
- Type
- string
- Description
The new description for the collection.
- Name
is_public
- Type
- boolean
- Description
The new visibility state for the collection.
Response
If the response is successful it will return a 204 status code with no body.
Request
curl -L -X PUT 'https://api.arguflow.ai/api/card_collection' \
-H 'Content-Type: application/json' \
-H 'Cookie: ai-editor=your_cookie_value_here' \
-d '{
"collection_id": "35198a45-d735-457d-ac04-d44c328bc122",
"is_public": true
}'
Retrieve the card from a collection
This route allows you to retrieve the card from a collection by providing the collection id. (Must be authenticated if the collection is private)
Response
If the response is successful it will return a 200 status code with an array of card objects.
- Name
bookmarks
- Type
- Card
- Description
An array of card objects which are contained in the collection.
Request
curl -L 'https://api.arguflow.ai/api/card_collection/65c6dcce-2c4b-4466-874b-d194bcf91ae2/1' \
-H 'Cookie: ai-editor=your_cookie_value_here'
Response
{
"bookmarks": [
{
"metadata": [
{
"id": "12fd7e04-7261-4b89-8776-d331d29003b0",
"author": {
"id": "c9379ab0-389d-4204-8602-5ba1bf99d441",
"email": "dens.sumesh79@gmail.com",
"username": null,
"website": null,
"visible_email": true,
"created_at": "2023-07-20T11:54:39.303730"
},
"content": "Though by itself, the Canadian Indian free passage right issue is interesting as yet another chapter...",
"card_html": "\n<p class=\"western\" style=\"line-height: 108%; margin-bottom: 0.11in\"><font face=\"Calibri, serif\">Though\nby itself, the Canadian Indian free...",
"link": "https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1267977",
"qdrant_point_id": "ce80424d-6202-4612-bdaa-1c7e7001b088",
"total_upvotes": 0,
"total_downvotes": 0,
"vote_by_current_user": null,
"created_at": "2023-07-20T11:57:13.157339",
"updated_at": "2023-07-20T11:57:13.157340",
"oc_file_path": "/Blood Quantum Affirmative and Neg - Wake 2018.docx",
"file_id": "39f22d72-08d4-459b-9d68-8550187b976e",
"file_name": "Blood Quantum Affirmative and Neg - Wake 2018.docx",
"private": false,
"verification_score": null
}
]
},
//...
]
}
Add a card to a collection
This route allows you to add a card to a collection. (Must be authenticated and your collection)
Required attributes
- Name
card_metadata_id
- Type
- string
- Description
The id of the card you wish to add to the collection.
Response
If the response is successful it will return a 204 status code with no body.
Request
curl -L 'https::api.arguflow.ai/api/card_collection/65c6dcce-2c4b-4466-874b-d194bcf91ae2' \
-H 'Content-Type: application/json' \
-H 'Cookie: ai-editor=your_cookie_value_here' \
-d '{
"card_metadata_id": "2cbcebbd-81c6-478b-bb29-e84bd3bd7cea"
}'
Remove a card from a collection
This route allows you to remove a card from a collection. (Must be authenticated and your collection)
Required attributes
- Name
card_metadata_id
- Type
- string
- Description
The id of the card you wish to remove from the collection.
Response
If the response is successful it will return a 204 status code with no body.
Request
curl -X DELETE 'https::api.arguflow.ai/api/card_collection/65c6dcce-2c4b-4466-874b-d194bcf91ae2' \
-H 'Content-Type: application/json' \
-H 'Cookie: ai-editor=your_cookie_value_here' \
-d '{
"card_metadata_id": "2cbcebbd-81c6-478b-bb29-e84bd3bd7cea"
}'
Retrieve the collections a card is in
This route allows you to retrieve the collections a card is in. (Must be authenticated)
Required attributes
- Name
collection_ids
- Type
- string
- Description
A comma separated list of card ids you want to retrieve the collections for.
Response
If the response is successful it will return a 200 status code and an array of objects with card_ids and their associated collection_ids.
- Name
card_uuid
- Type
- string
- Description
The id of the card.
- Name
collection_ids
- Type
- array
- Description
An array of collection ids that the card is in.
Request
curl -L 'https::api.arguflow.ai/api/card_collection/bookmark' \
-H 'Content-Type: application/json' \
-H 'Cookie: ai-editor=your_cookie_value_here' \
-d '{
"collection_ids": "2cbcebbd-81c6-478b-bb29-e84bd3bd7cea,94923ec3-ead5-418f-8d27-3319e56a8297"
}'
Response
[
{
"card_uuid": "94923ec3-ead5-418f-8d27-3319e56a8297",
"collection_ids": ["566f5cde-4f4c-4efe-9abc-90519c1ee110"]
},
{
"card_uuid": "2cbcebbd-81c6-478b-bb29-e84bd3bd7cea",
"collection_ids": ["65c6dcce-2c4b-4466-874b-d194bcf91ae2"]
}
]
Search semantically within a collection
This route allows you to search the collection by converting your query into a vector and searching for the most similar vectors in the collection, returning the top 25 card. You go through all the pages of card by incrementing the page number in the request URL.
Required attributes
- Name
content
- Type
- string
- Description
The content you wish to search for.
- Name
collection_id
- Type
- string
- Description
The id of the collection you wish to search within.
Optional attributes
- Name
tag_set
- Type
- array
- Description
The tags you wish to filter by.
- Name
link
- Type
- array
- Description
The link URL you wish to filter by.
Response
If the response is successful it will return a 200 status code with 2D array of card objects and its collisions, the collection, and the total pages of cards.
- Name
bookmarks
- Type
[Card] - Description
A 2D array of card objects and their collisions.
- Name
collection
- Type
- Collection
- Description
The collection that the cards are from.
- Name
total_pages
- Type
- integer
- Description
The total number of pages of cards in the search result.
Request
curl -L 'https://api.arguflow.ai/api/card_collection/search/1' \
--header 'Content-Type: application/json' \
--header 'Cookie: ai-editor=your_cookie_value_here' \
--data '{
"content": "test",
"collection_id": "50f94186-9659-42c4-8a95-ae7b450cf3f9"
}'
Response
{
"bookmarks": [
{
"metadata": [
{
"id": "4546e8b0-d6e9-4334-9de9-14ffa002183f",
"author": {
"id": "c9379ab0-389d-4204-8602-5ba1bf99d441",
"email": "dens.sumesh79@gmail.com",
"username": null,
"website": null,
"visible_email": true,
"created_at": "2023-07-20T11:54:39.303730"
},
"content": "(CNN) The first polling reactions to last week's summit between President Donald Trump and Russian President Vladimir Putin in Helsinki, Finland, ...",
"card_html": "\n<p class=\"western\" style=\"line-height: 108%; margin-bottom: 0.11in\"><font size=\"1\" style=\"font-size: 8pt\">(CNN)\n</font><font size=\"2\" ...",
"link": "https://www.cnn.com/2018/07/24/politics/voters-democrats-republicans-economy-culture-divide-president-trump/index.html",
"qdrant_point_id": "d7955192-c194-4c97-b957-ff93f49d8575",
"total_upvotes": 0,
"total_downvotes": 0,
"vote_by_current_user": null,
"created_at": "2023-07-20T11:56:46.475045",
"updated_at": "2023-07-20T11:56:46.475047",
"oc_file_path": "/Base DA Uniqueness Updates - Berkeley 2018.docx",
"file_id": "476aace7-832e-487c-b791-b759cf1ecc84",
"file_name": "Base DA Uniqueness Updates - Berkeley 2018.docx",
"private": false,
"verification_score": null
}
],
"score": 0.7443217039108276
},
//...
],
"collection": {
"id": "50f94186-9659-42c4-8a95-ae7b450cf3f9",
"author_id": "c9379ab0-389d-4204-8602-5ba1bf99d441",
"name": "Collection for file Base DA Uniqueness Updates - Berkeley 2018.docx",
"is_public": true,
"description": "",
"created_at": "2023-07-20T11:56:46.486384",
"updated_at": "2023-07-20T11:56:46.486386"
},
"total_pages": 1
}
Search a collection using full-text
This route allows you to search a collection using full-text trigram search.
Required attributes
- Name
content
- Type
- string
- Description
The content you wish to search for.
- Name
collection_id
- Type
- string
- Description
The id of the collection you wish to search within.
Optional attributes
- Name
tag_set
- Type
- array
- Description
The tags you wish to filter by.
- Name
link
- Type
- array
- Description
The link URL you wish to filter by.
Response
If the response is successful it will return a 200 status code with 2D array of card objects and its collisions, the collection, and the total pages of cards.
- Name
bookmarks
- Type
[Card] - Description
A 2D array of card objects and their collisions.
- Name
collection
- Type
- Collection
- Description
The collection that the cards are from.
- Name
total_pages
- Type
- integer
- Description
The total number of pages of cards in the search result.
Request
curl -L 'https://api.arguflow.ai/api/card_collection/fulltextsearch/1' \
--header 'Content-Type: application/json' \
--header 'Cookie: ai-editor=your_cookie_value_here' \
--data '{
"content": "test",
"collection_id": "50f94186-9659-42c4-8a95-ae7b450cf3f9"
}'
Response
{
"bookmarks": [
{
"metadata": [
{
"id": "4546e8b0-d6e9-4334-9de9-14ffa002183f",
"author": {
"id": "c9379ab0-389d-4204-8602-5ba1bf99d441",
"email": "dens.sumesh79@gmail.com",
"username": null,
"website": null,
"visible_email": true,
"created_at": "2023-07-20T11:54:39.303730"
},
"content": "(CNN) The first polling reactions to last week's summit between President Donald Trump and Russian President Vladimir Putin in Helsinki, Finland, ...",
"card_html": "\n<p class=\"western\" style=\"line-height: 108%; margin-bottom: 0.11in\"><font size=\"1\" style=\"font-size: 8pt\">(CNN)\n</font><font size=\"2\" ...",
"link": "https://www.cnn.com/2018/07/24/politics/voters-democrats-republicans-economy-culture-divide-president-trump/index.html",
"qdrant_point_id": "d7955192-c194-4c97-b957-ff93f49d8575",
"total_upvotes": 0,
"total_downvotes": 0,
"vote_by_current_user": null,
"created_at": "2023-07-20T11:56:46.475045",
"updated_at": "2023-07-20T11:56:46.475047",
"oc_file_path": "/Base DA Uniqueness Updates - Berkeley 2018.docx",
"file_id": "476aace7-832e-487c-b791-b759cf1ecc84",
"file_name": "Base DA Uniqueness Updates - Berkeley 2018.docx",
"private": false,
"verification_score": null
}
],
"score": 0.7443217039108276
},
//...
],
"collection": {
"id": "50f94186-9659-42c4-8a95-ae7b450cf3f9",
"author_id": "c9379ab0-389d-4204-8602-5ba1bf99d441",
"name": "Collection for file Base DA Uniqueness Updates - Berkeley 2018.docx",
"is_public": true,
"description": "",
"created_at": "2023-07-20T11:56:46.486384",
"updated_at": "2023-07-20T11:56:46.486386"
},
"total_pages": 1
}