Rebuild ontology filter fields
curl --request POST \
--url https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/ontologies/{ontology_id}/fields/rebuild \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/ontologies/{ontology_id}/fields/rebuild', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/ontologies/{ontology_id}/fields/rebuild"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text){
"workflow_id": "<string>",
"status": "accepted",
"accepted_at": "2023-11-07T05:31:56Z",
"status_url": "<string>"
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}Entries and ontologies
Rebuild ontology fields
Regenerate filter metadata after a bulk entry import.
POST
/
v1
/
ontologies
/
{ontology_id}
/
fields
/
rebuild
Rebuild ontology filter fields
curl --request POST \
--url https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/ontologies/{ontology_id}/fields/rebuild \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/ontologies/{ontology_id}/fields/rebuild', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/ontologies/{ontology_id}/fields/rebuild"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text){
"workflow_id": "<string>",
"status": "accepted",
"accepted_at": "2023-11-07T05:31:56Z",
"status_url": "<string>"
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}Regenerate filter metadata after a bulk entry import.
Requires
ontologies:write. Returns a workflow you can poll.