PUT v1/schemas

The following endpoint allows you to update a data schema by ID.

Update an existing data schema

put

Updates an existing data schema by its ID and returns the updated schema.

Authorizations
Path parameters
idstringRequired
Body
idstring | nullableOptional

The unique identifier for the data schema.

namestring | nullableOptional

The name of the schema or field.

descriptionstring | nullableOptional

A description of the schema or field.

Responses
200
Payload of DataSchema
application/json
put
PUT /v1/schemas/{id} HTTP/1.1
Host: api.gaffa.dev
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1082

"{\"name\":\"Updated Product Schema\",\"description\":\"Enhanced schema for product information with additional fields\",\"fields\":[{\"type\":\"string\",\"name\":\"productName\",\"description\":\"Name of the product\",\"fields\":[]},{\"type\":\"decimal\",\"name\":\"price\",\"description\":\"Product price\",\"fields\":[]},{\"type\":\"boolean\",\"name\":\"inStock\",\"description\":\"Whether the product is in stock\",\"fields\":[]},{\"type\":\"array\",\"name\":\"tags\",\"description\":\"Product tags\",\"fields\":[{\"type\":\"string\",\"name\":\"tagItem\",\"description\":null,\"fields\":[]}]},{\"type\":\"array\",\"name\":\"categories\",\"description\":\"Product categories\",\"fields\":[{\"type\":\"string\",\"name\":\"category\",\"description\":null,\"fields\":[]}]},{\"type\":\"object\",\"name\":\"specifications\",\"description\":\"Technical specifications\",\"fields\":[{\"type\":\"string\",\"name\":\"dimensions\",\"description\":\"Product dimensions\",\"fields\":[]},{\"type\":\"double\",\"name\":\"weight\",\"description\":\"Product weight in grams\",\"fields\":[]}]}]}"
200

Payload of DataSchema

{
  "id": "text",
  "name": "text",
  "description": "text",
  "fields": [
    {
      "type": 0,
      "name": "text",
      "description": "text",
      "fields": [
        {
          "type": 0,
          "name": "text",
          "description": "text",
          "fields": [
            "[Circular Reference]"
          ]
        }
      ]
    }
  ]
}

Last updated