Appearance
Topics API Reference
Topics organize files in a lab. The tree has one or more fields at the root, with topics and subtopics nested beneath them. Use the lab code returned by the Labs API as {$VIMI_LAB} in each request.
Get all Topics
GET - api/v1/lab/{$VIMI_LAB}/topics
Returns a flat list of the topics the API user can access. Build the tree from parent_id: entries with null are root fields, all others are topics or subtopics of the referenced entry.
Use an id from this list as the topic when uploading a file.
Response
json
{
"links": {
"self": "https://{$VIMI_BASE_URL}/api/v1/lab/vimi/topics"
},
"data": [
{
"type": "topics",
"id": "9",
"attributes": {
"parent_id": null,
"name": "Chemistry",
"comment": "Electrochemistry and materials",
"public": true
}
},
{
"type": "topics",
"id": "11",
"attributes": {
"parent_id": 9,
"name": "Raman spectra",
"comment": null,
"public": true
}
}
]
}Attributes:
parent_id- ID of the parent topic, ornullfor a root fieldname- topic namecomment- description or notes about the topic, ornullpublic- whether the topic is discoverable during membership registration
