Replace an entry
curl --request PUT \
--url https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/entries/{entry_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"ontology": "<string>",
"owner_id": "<string>",
"ingestion_origin": "<string>",
"entry_name": "<string>",
"fields": {},
"entry_id": "<string>",
"value": 123,
"image_upload_status": "uploaded",
"media": {
"primary_image": "<string>",
"gallery": [
"<string>"
]
}
}
'const options = {
method: 'PUT',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ontology: '<string>',
owner_id: '<string>',
ingestion_origin: '<string>',
entry_name: '<string>',
fields: {},
entry_id: '<string>',
value: 123,
image_upload_status: 'uploaded',
media: {primary_image: '<string>', gallery: ['<string>']}
})
};
fetch('https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/entries/{entry_id}', 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/entries/{entry_id}"
payload = {
"ontology": "<string>",
"owner_id": "<string>",
"ingestion_origin": "<string>",
"entry_name": "<string>",
"fields": {},
"entry_id": "<string>",
"value": 123,
"image_upload_status": "uploaded",
"media": {
"primary_image": "<string>",
"gallery": ["<string>"]
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"status": "created",
"entry": {
"entry_id": "<string>",
"ontology": "<string>",
"entry_name": "<string>",
"owner_id": "<string>",
"ingestion_origin": "<string>",
"value": 123,
"image_upload_status": "uploaded",
"media": {
"primary_image": "<string>",
"gallery": [
"<string>"
]
},
"fields": {},
"checksum": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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
Replace an entry
PUT uses the same validation as create. Identity fields must still match.
PUT
/
v1
/
entries
/
{entry_id}
Replace an entry
curl --request PUT \
--url https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/entries/{entry_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"ontology": "<string>",
"owner_id": "<string>",
"ingestion_origin": "<string>",
"entry_name": "<string>",
"fields": {},
"entry_id": "<string>",
"value": 123,
"image_upload_status": "uploaded",
"media": {
"primary_image": "<string>",
"gallery": [
"<string>"
]
}
}
'const options = {
method: 'PUT',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
ontology: '<string>',
owner_id: '<string>',
ingestion_origin: '<string>',
entry_name: '<string>',
fields: {},
entry_id: '<string>',
value: 123,
image_upload_status: 'uploaded',
media: {primary_image: '<string>', gallery: ['<string>']}
})
};
fetch('https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/entries/{entry_id}', 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/entries/{entry_id}"
payload = {
"ontology": "<string>",
"owner_id": "<string>",
"ingestion_origin": "<string>",
"entry_name": "<string>",
"fields": {},
"entry_id": "<string>",
"value": 123,
"image_upload_status": "uploaded",
"media": {
"primary_image": "<string>",
"gallery": ["<string>"]
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"status": "created",
"entry": {
"entry_id": "<string>",
"ontology": "<string>",
"entry_name": "<string>",
"owner_id": "<string>",
"ingestion_origin": "<string>",
"value": 123,
"image_upload_status": "uploaded",
"media": {
"primary_image": "<string>",
"gallery": [
"<string>"
]
},
"fields": {},
"checksum": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"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>"
}
]
}
}PUT uses the same validation as create. Identity fields must still match.
Requires
entries:write and an Idempotency-Key.Authorizations
Headers
Body
application/json