Skip to main content
PATCH
/
api
/
v1
/
endpoints
/
{slug}
curl --request PATCH \
  --url http://localhost:8080/api/v1/endpoints/legal-qa \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Updated Legal Q&A Endpoint",
    "summary": "Updated summary text",
    "description": "# Updated Description\nMarkdown content here"
  }'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Updated Legal Q&A Endpoint",
  "slug": "legal-qa",
  "description": "# Updated Description\nMarkdown content here",
  "summary": "Updated summary text",
  "response_type": "both",
  "published": true,
  "tags": "legal,qa,documents",
  "created_at": "2024-03-01T12:00:00Z",
  "updated_at": "2024-03-01T14:30:00Z",
  "model": {
    "id": "223e4567-e89b-12d3-a456-426614174000",
    "name": "GPT-4 Legal",
    "dtype": "openai",
    "configuration": {
      "model_name": "gpt-4"
    }
  },
  "dataset": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Legal Documents DB",
    "summary": "Vector database of legal documents",
    "dtype": "weaviate",
    "configuration": {
      "host": "localhost",
      "port": 8080
    }
  },
  "policies": [
    {
      "id": "333e4567-e89b-12d3-a456-426614174003",
      "name": "Rate Limit Policy",
      "policy_type": "rate_limit",
      "configuration": {
        "rate": "100/hour"
      }
    }
  ]
}
Update an endpoint’s metadata. This operation allows partial updates to the name, summary, and description fields.
This endpoint only updates metadata fields. To change the linked dataset, model, or policies, you need to use the respective management endpoints.

Authentication

Requires tenant authentication via SyftBox token.

Path parameters

slug
string
required
The unique slug of the endpoint to update.

Request body

At least one field must be provided in the request body.
name
string
New name for the endpoint.
summary
string
Updated plain-text summary.
description
string
Updated markdown-formatted description.

Response

Returns the complete updated endpoint details.
id
string
required
Unique identifier for the endpoint.
name
string
required
Updated name of the endpoint.
slug
string
required
URL-friendly slug (unchanged).
description
string
required
Updated markdown description.
summary
string
required
Updated brief summary.
response_type
string
required
Type of response (raw/summary/both).
published
boolean
required
Whether the endpoint is published.
tags
string
required
Comma-separated tags.
created_at
string
required
ISO 8601 timestamp of creation.
updated_at
string
required
ISO 8601 timestamp of last update.
model
object
Attached model information.
dataset
object
Attached dataset information.
policies
array
required
Array of attached policies.
curl --request PATCH \
  --url http://localhost:8080/api/v1/endpoints/legal-qa \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Updated Legal Q&A Endpoint",
    "summary": "Updated summary text",
    "description": "# Updated Description\nMarkdown content here"
  }'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Updated Legal Q&A Endpoint",
  "slug": "legal-qa",
  "description": "# Updated Description\nMarkdown content here",
  "summary": "Updated summary text",
  "response_type": "both",
  "published": true,
  "tags": "legal,qa,documents",
  "created_at": "2024-03-01T12:00:00Z",
  "updated_at": "2024-03-01T14:30:00Z",
  "model": {
    "id": "223e4567-e89b-12d3-a456-426614174000",
    "name": "GPT-4 Legal",
    "dtype": "openai",
    "configuration": {
      "model_name": "gpt-4"
    }
  },
  "dataset": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Legal Documents DB",
    "summary": "Vector database of legal documents",
    "dtype": "weaviate",
    "configuration": {
      "host": "localhost",
      "port": 8080
    }
  },
  "policies": [
    {
      "id": "333e4567-e89b-12d3-a456-426614174003",
      "name": "Rate Limit Policy",
      "policy_type": "rate_limit",
      "configuration": {
        "rate": "100/hour"
      }
    }
  ]
}
You can update just one field at a time. For example, to only update the summary, send a request with just the summary field.

Build docs developers (and LLMs) love