BREAGEN Logo
Schema Builder

Custom Schema Data

Custom Schema Data Operations provide functionality to manage the data associated with custom schemas, including creating, retrieving, updating, and deleting schema data.

Get Custom Schema Data Pages GET /v1/api/custom_schema_data/pages/

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

Parameters

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

Example Request

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

Example Response

{
	"total": 18,
	"items": [
		{
			"data_id": 1,
			"version_id": 1,
			"created_user": "[email protected]",
			"created_at": "2024-01-15T10:30:00Z"
		},
		{
			"data_id": 2,
			"version_id": 1,
			"created_user": "[email protected]",
			"created_at": "2024-01-16T14:20:00Z"
		}
	],
	"page": 1,
	"total_pages": 2
}

Get All Custom Schema Data GET /v1/api/custom_schema_data/all/

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

Parameters

ParameterDescriptionRequiredType
user_idFilter data by user (optional)Nostring

Example Request

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

Example Response

{
	"data": [
		{
			"data_id": 1,
			"version_id": 1,
			"json_data": {
				"name": "John Doe",
				"email": "[email protected]",
				"loyalty_tier": "gold"
			},
			"created_user": "[email protected]"
		}
	]
}

Get One Custom Schema Data GET /v1/api/custom_schema_data/{custom_schema_data_id}

Resource URL/v1/api/custom_schema_data/{custom_schema_data_id}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Parameters

ParameterDescriptionRequiredType
custom_schema_data_idID of the dataYesinteger

Example Request

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

Example Response

{
	"data_id": 1,
	"version_id": 1,
	"json_data": {
		"name": "John Doe",
		"email": "[email protected]",
		"loyalty_tier": "gold"
	},
	"created_user": "[email protected]",
	"created_at": "2024-01-15T10:30:00Z"
}

Update Custom Schema Data PUT /v1/api/custom_schema_data/{custom_schema_data_id}

Resource URL/v1/api/custom_schema_data/{custom_schema_data_id}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Parameters

ParameterDescriptionRequiredType
custom_schema_data_idID of the dataYesinteger

Request Body

{
	"json_data": {
		"name": "John Doe",
		"email": "[email protected]",
		"loyalty_tier": "platinum"
	},
	"created_user": "[email protected]"
}

Example Request

curl -X 'PUT' \
'https://api.braegen.ai/v1/api/custom_schema_data/1' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
    "json_data": {
        "name": "John Doe",
        "email": "[email protected]",
        "loyalty_tier": "platinum"
    },
    "created_user": "[email protected]"
}'

Delete Custom Schema Data DELETE /v1/api/custom_schema_data/{custom_schema_data_id}

Resource URL/v1/api/custom_schema_data/{custom_schema_data_id}
Response FormatJSON
Requires AuthenticationYes
Rate LimitedYes
HTTPSYes

Parameters

ParameterDescriptionRequiredType
custom_schema_data_idID of the dataYesinteger

Example Request

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

Get Custom Schema Data By Version GET /v1/api/custom_schema_data/version/{custom_schema_version_id}

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

Parameters

ParameterDescriptionRequiredType
custom_schema_version_idID of the schema versionYesinteger

Example Request

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

Example Response

{
	"version_id": 1,
	"data": [
		{
			"data_id": 1,
			"json_data": {
				"name": "John Doe",
				"email": "[email protected]",
				"loyalty_tier": "gold"
			},
			"created_user": "[email protected]",
			"created_at": "2024-01-15T10:30:00Z"
		}
	]
}

Create Custom Schema Data POST /v1/api/custom_schema_data/create

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

Request Body

{
	"version_id": 1,
	"json_data": {
		"name": "Jane Doe",
		"email": "[email protected]",
		"loyalty_tier": "silver"
	},
	"created_user": "[email protected]"
}

Example Request

curl -X 'POST' \
'https://api.braegen.ai/v1/api/custom_schema_data/create' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
    "version_id": 1,
    "json_data": {
        "name": "Jane Doe",
        "email": "[email protected]",
        "loyalty_tier": "silver"
    },
    "created_user": "[email protected]"
}'

Example Response

{
	"data_id": 3,
	"version_id": 1,
	"json_data": {
		"name": "Jane Doe",
		"email": "[email protected]",
		"loyalty_tier": "silver"
	},
	"created_user": "[email protected]",
	"created_at": "2024-01-17T09:15:00Z"
}