BREAGEN Logo
Schema Builder

Custom Schema Version

Custom Schema Version Operations provide functionality to manage versions of custom schemas, including creating, retrieving, updating, and deleting schema versions.

Get Custom Schema Version Pages GET /v1/api/custom_schema_version/pages/

Resource URL/v1/api/custom_schema_version/pages/
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Parameters

ParameterDescriptionRequiredType
pagePage number for paginationYesinteger
limitNumber of items per pageYesinteger
user_idFilter versions by user (optional)Nostring

Example Request

curl -X 'GET' \
'https://api.braegen.ai/v1/api/custom_schema_version/pages/?page=1&limit=10' \
-H 'accept: application/json'

Example Response

{
	"total": 12,
	"items": [
		{
			"version_id": 1,
			"custom_schema_name": "retail_customer",
			"version": "1.0.0",
			"created_at": "2024-01-15T10:30:00Z"
		},
		{
			"version_id": 2,
			"custom_schema_name": "retail_customer",
			"version": "1.1.0",
			"created_at": "2024-01-16T14:20:00Z"
		}
	],
	"page": 1,
	"total_pages": 2
}

Get All Custom Schema Versions GET /v1/api/custom_schema_version/all/

Resource URL/v1/api/custom_schema_version/all/
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Parameters

ParameterDescriptionRequiredType
user_idFilter versions by user (optional)Nostring

Example Request

curl -X 'GET' \
'https://api.braegen.ai/v1/api/custom_schema_version/all/' \
-H 'accept: application/json'

Example Response

{
	"versions": [
		{
			"version_id": 1,
			"custom_schema_name": "retail_customer",
			"version": "1.0.0",
			"json_schema": {
				"type": "object",
				"properties": {
					"name": { "type": "string" },
					"email": { "type": "string" },
					"loyalty_tier": { "type": "string" }
				}
			}
		}
	]
}

Get One Custom Schema Version GET /v1/api/custom_schema_version/{custom_schema_version_id}

Resource URL/v1/api/custom_schema_version/{custom_schema_version_id}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Parameters

ParameterDescriptionRequiredType
custom_schema_version_idID of the versionYesinteger

Example Request

curl -X 'GET' \
'https://api.braegen.ai/v1/api/custom_schema_version/1' \
-H 'accept: application/json'

Example Response

{
	"version_id": 1,
	"custom_schema_name": "retail_customer",
	"version": "1.0.0",
	"json_schema": {
		"type": "object",
		"properties": {
			"name": { "type": "string" },
			"email": { "type": "string" },
			"loyalty_tier": { "type": "string" }
		}
	}
}

Update Custom Schema Version PUT /v1/api/custom_schema_version/{custom_schema_version_id}

Resource URL/v1/api/custom_schema_version/{custom_schema_version_id}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Parameters

ParameterDescriptionRequiredType
custom_schema_version_idID of the versionYesinteger

Request Body

{
	"version": "1.1.0",
	"json_schema": {
		"type": "object",
		"properties": {
			"name": { "type": "string" },
			"email": { "type": "string" },
			"loyalty_tier": { "type": "string" },
			"points": { "type": "integer" }
		}
	}
}

Example Request

curl -X 'PUT' \
'https://api.braegen.ai/v1/api/custom_schema_version/1' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
    "version": "1.1.0",
    "json_schema": {
        "type": "object",
        "properties": {
            "name": {"type": "string"},
            "email": {"type": "string"},
            "loyalty_tier": {"type": "string"},
            "points": {"type": "integer"}
        }
    }
}'

Delete Custom Schema Version DELETE /v1/api/custom_schema_version/{custom_schema_version_id}

Resource URL/v1/api/custom_schema_version/{custom_schema_version_id}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Parameters

ParameterDescriptionRequiredType
custom_schema_version_idID of the versionYesinteger

Example Request

curl -X 'DELETE' \
'https://api.braegen.ai/v1/api/custom_schema_version/1' \
-H 'accept: application/json'

Create Custom Schema Version POST /v1/api/custom_schema_version/create

Resource URL/v1/api/custom_schema_version/create
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Request Body

{
	"custom_schema_name": "retail_customer",
	"version": "1.0.0",
	"json_schema": {
		"type": "object",
		"properties": {
			"name": { "type": "string" },
			"email": { "type": "string" },
			"loyalty_tier": { "type": "string" }
		}
	}
}

Example Request

curl -X 'POST' \
'https://api.braegen.ai/v1/api/custom_schema_version/create' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
    "custom_schema_name": "retail_customer",
    "version": "1.0.0",
    "json_schema": {
        "type": "object",
        "properties": {
            "name": {"type": "string"},
            "email": {"type": "string"},
            "loyalty_tier": {"type": "string"}
        }
    }
}'

Example Response

{
	"version_id": 3,
	"custom_schema_name": "retail_customer",
	"version": "1.0.0",
	"json_schema": {
		"type": "object",
		"properties": {
			"name": { "type": "string" },
			"email": { "type": "string" },
			"loyalty_tier": { "type": "string" }
		}
	},
	"created_at": "2024-01-17T09:15:00Z"
}