I’m facing issue while creating schema using API.
I’ve tried to create schema using vtex schema API present at below link.
Facing schema not found(404) issue.
Please provide a solution for this issue.
I’m facing issue while creating schema using API.
I’ve tried to create schema using vtex schema API present at below link.
Facing schema not found(404) issue.
Please provide a solution for this issue.
Can you share your Curl?
Sure, please give it a shot and ping if you found a solution.
curl --request PUT
–url https://sportrx.vtexcrm.com.br/api/dataentities/BusinessPermission/schemas/business-permission-schema-v1
–header ‘Content-Type: application/json’
One more thing, do I need to specify the json for the same.
@Saurabh you need send the body with the json Schema.
e.g.
{
"properties": {
"name": {
"type": "string"
}
}
}
I was not able to figure out where to put the body.
Added body at ‘BODY PARAMS’ section.
Thank you @hansen .
Used below curl:
curl --request PUT
–url https://sportrx.vtexcrm.com.br/api/dataentities/BusinessPermission/schemas/business-permission-schema-v1
–header ‘Content-Type: application/json’
–data ’
{
“properties”: {
“name”: {
“type”: “string”
}
}
}
’
Still not giving 404 Not Found Error.
Please suggest another approach @hansen.
Good morning,
do not share the keys and the tokens, this is a risk to the security of your website, it can be invaded with this information and have data deleted and modified, deactivate this key as soon as possible to avoid danger
Sure @Guilherme_Medina.
Removed app key and token, will be creating new one.
Can you share your json model?
I´ll try to create here.
|data_entity_name
|BusinessPermission
|
|schema_name
|business-permission-schema-v1
|
{
“properties”: {
“name”: {
“type”: “string”
},
“label”: {
“type”: “string”
}
},
“v-default-fields”: [
“name”,
“label”,
“id”
],
“required”: [
“name”
],
“v-indexed”: [
“name”
],
“v-security”: {
“allowGetAll”: true,
“publicRead”: [
“name”,
“label”,
“id”
],
“publicWrite”: [
“name”,
“label”
],
“publicFilter”: [
“name”,
“id”
]
}
}