Rebuild ontology filter fields
curl --request POST \
--url https://api.swapnice.com/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://api.swapnice.com/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://api.swapnice.com/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://api.swapnice.com/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://api.swapnice.com/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://api.swapnice.com/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.Authorizations
OAuth 2.1 authorization code with PKCE. Implicit and password flows are unsupported.
Headers
Required for mutating requests. Replays with the same key and payload hash return
the original logical result; replays with a different payload hash return 409.
Required string length:
16 - 255Path Parameters
⌘I