Update File Namespaces
Set the namespaces a file belongs to. Replaces any existing namespace assignments. The 'default' namespace is always preserved.
Set which namespaces a file belongs to. This replaces any existing namespace assignments for the file. The default namespace is always preserved.
Overview
Use this endpoint to move a file between namespaces or assign it to multiple namespaces at once. The response returns the updated namespace_ids and resolved namespaces reflecting the new assignments.
Example Request
curl -X PUT "https://api.vidnavigator.com/v1/file/file_abc123/namespaces" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"namespace_ids": ["64a1b2c3d4e5f6789abc0002", "64a1b2c3d4e5f6789abc0003"]
}'Success Response
{
"status": "success",
"message": "File namespaces updated successfully",
"data": {
"namespace_ids": ["64a1b2c3d4e5f6789abc0001", "64a1b2c3d4e5f6789abc0002", "64a1b2c3d4e5f6789abc0003"],
"namespaces": [
{ "id": "64a1b2c3d4e5f6789abc0001", "name": "default" },
{ "id": "64a1b2c3d4e5f6789abc0002", "name": "Client Calls" },
{ "id": "64a1b2c3d4e5f6789abc0003", "name": "Product Demos" }
]
}
}The default namespace is always preserved in the response, even if not explicitly included in namespace_ids.
API reference
ApiKeyAuthX-API-Key<token>API key authentication. Include your VidNavigator API key in the X-API-Key header.
file_id*stringThe ID of the file to update
application/json- body
namespace_ids*array<string>List of namespace IDs to assign to this file
File namespaces updated successfully
application/json- response
status?"success""success"message?stringdata?curl -X PUT 'https://api.vidnavigator.com/v1/file/string/namespaces' \ -H 'Content-Type: application/json' \ -d '{ "namespace_ids": [ "64a1b2c3d4e5f6789..." ]}'{ "status": "success", "message": "string", "data": { "namespace_ids": [ "string" ], "namespaces": [ { "id": "string", "name": "string" } ] }}