Skip to Content

Update File Namespaces

Set the namespaces a file belongs to. Replaces any existing namespace assignments. The 'default' namespace is always preserved.

PUT
/file/{file_id}/namespaces

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

Authorization

ApiKeyAuth
headerX-API-Key<token>

API key authentication. Include your VidNavigator API key in the X-API-Key header.

Path Parameters

file_id*string

The ID of the file to update

Request Body

application/json
  1. body
namespace_ids*array<string>

List of namespace IDs to assign to this file

Response Body

File namespaces updated successfully

application/json
  1. response
status?"success"
Value in"success"
message?string
data?
Example Request
curl -X PUT 'https://api.vidnavigator.com/v1/file/string/namespaces' \  -H 'Content-Type: application/json' \  -d '{  "namespace_ids": [    "64a1b2c3d4e5f6789..."  ]}'
Example Response
{  "status": "success",  "message": "string",  "data": {    "namespace_ids": [      "string"    ],    "namespaces": [      {        "id": "string",        "name": "string"      }    ]  }}

On this page