Namespaces

Update a namespace

Update a namespace. Updates the fields you name and keeps the rest. `metadata` merges into the stored metadata by key, and a `null` value deletes that key.

PATCH
/v1/namespaces/{id}

Updates the fields you name and keeps the rest. metadata merges into the stored metadata by key, and a null value deletes that key.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^ns_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json
  1. body
name?|null
metadata?|null

Response Body

Namespace

application/json
  1. response
id*NamespaceId
Match^ns_[0-9a-hjkmnp-tv-z]{16,24}$
name*string
createdAt*string
metadata*

Your own labels for the namespace, such as the id of your customer it serves. Samva stores them and never reads them.

updatedAt*string
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.namespaces.update({  "id": "example"});
Example Response
{  "id": "string",  "name": "string",  "createdAt": "string",  "metadata": {    "property1": "string",    "property2": "string"  },  "updatedAt": "string"}

Related documentation