Create or Replace
curl --request PUT \
--url https://api.cludo.com/api/v4/{customerId}/index/{crawlerId}/documents \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"fields": {},
"type": "PageContent"
}
]
'import requests
url = "https://api.cludo.com/api/v4/{customerId}/index/{crawlerId}/documents"
payload = [
{
"id": "<string>",
"fields": {},
"type": "PageContent"
}
]
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify([{id: '<string>', fields: {}, type: 'PageContent'}])
};
fetch('https://api.cludo.com/api/v4/{customerId}/index/{crawlerId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify([{id: '<string>', fields: {}, type: 'PageContent'}])
};
fetch('https://api.cludo.com/api/v4/{customerId}/index/{crawlerId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"document": {
"id": "<string>",
"type": 123,
"fields": {}
},
"reason": "<string>",
"success": true
}
]{
"message": "The request could not be processed. Check the request body and required parameters."
}{
"message": "unauthorized"
}{
"status": "InternalServerError",
"code": 500,
"messages": [
"Error occur. Please contact support with error ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890"
]
}Documents
Create or Replace
Create new documents or fully replace existing ones in the index. Send a JSON array of document objects; each document must include an id and a fields object. Common field names include Title, Url, Description, Date, Category, and Language.
PUT
/
api
/
v4
/
{customerId}
/
index
/
{crawlerId}
/
documents
Create or Replace
curl --request PUT \
--url https://api.cludo.com/api/v4/{customerId}/index/{crawlerId}/documents \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"fields": {},
"type": "PageContent"
}
]
'import requests
url = "https://api.cludo.com/api/v4/{customerId}/index/{crawlerId}/documents"
payload = [
{
"id": "<string>",
"fields": {},
"type": "PageContent"
}
]
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify([{id: '<string>', fields: {}, type: 'PageContent'}])
};
fetch('https://api.cludo.com/api/v4/{customerId}/index/{crawlerId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify([{id: '<string>', fields: {}, type: 'PageContent'}])
};
fetch('https://api.cludo.com/api/v4/{customerId}/index/{crawlerId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"document": {
"id": "<string>",
"type": 123,
"fields": {}
},
"reason": "<string>",
"success": true
}
]{
"message": "The request could not be processed. Check the request body and required parameters."
}{
"message": "unauthorized"
}{
"status": "InternalServerError",
"code": 500,
"messages": [
"Error occur. Please contact support with error ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890"
]
}Authorizations
Path Parameters
Body
application/json
Was this page helpful?

