Ingest Into Space
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/spaces/ingestions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"address": "<string>",
"source_name": "<string>",
"content": "<string>",
"file_base64": "<string>",
"file_name": "<string>",
"instructions": "<string>",
"review": "<string>",
"wait_seconds": 0
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/spaces/ingestions"
payload = {
"address": "<string>",
"source_name": "<string>",
"content": "<string>",
"file_base64": "<string>",
"file_name": "<string>",
"instructions": "<string>",
"review": "<string>",
"wait_seconds": 0
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
source_name: '<string>',
content: '<string>',
file_base64: '<string>',
file_name: '<string>',
instructions: '<string>',
review: '<string>',
wait_seconds: 0
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/spaces/ingestions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"space": "<string>",
"address": "<string>",
"source_name": "<string>",
"status": "<string>",
"review": "<string>",
"created_by": {
"actor_type": "<string>",
"actor_label": "",
"user": "<string>"
},
"counts": {
"created": 123,
"updated": 123,
"unchanged": 123,
"awaiting_decision": 123,
"skipped": 123,
"failed": 123
},
"object": "space_ingestion",
"instructions": "<string>",
"created_at": "<string>",
"completed_at": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"internal": true
},
"message": "<string>",
"source_content": "<string>",
"source_file_name": "<string>",
"unfiled_excerpts": [
"<string>"
],
"operations": [
{
"id": "<string>",
"position": 123,
"kind": "<string>",
"status": "<string>",
"summary": "<string>",
"source_excerpt": "<string>",
"passage": "<string>",
"options": [
"<string>"
],
"page": {
"id": "<string>",
"address": "<string>",
"title": "<string>"
},
"parent": "<string>",
"parent_operation_id": "<string>",
"title": "<string>",
"existing_excerpt": "<string>",
"unavailable_options": {},
"decision": {
"choice": "<string>",
"decided_by": {
"actor_type": "<string>",
"actor_label": "",
"user": "<string>"
},
"decided_at": "<string>"
},
"result": {
"version_number": 123,
"content_hash": "<string>"
},
"error": {},
"current_content": "<string>",
"proposed_content": "<string>",
"option_contents": {}
}
],
"decision_errors": [
{}
]
}Spaces
Ingest Into Space
File material (text or a file) into a space or a page’s subtree; contradictions come back as decisions.
POST
/
api
/
v1
/
spaces
/
ingestions
Ingest Into Space
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/spaces/ingestions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"address": "<string>",
"source_name": "<string>",
"content": "<string>",
"file_base64": "<string>",
"file_name": "<string>",
"instructions": "<string>",
"review": "<string>",
"wait_seconds": 0
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/spaces/ingestions"
payload = {
"address": "<string>",
"source_name": "<string>",
"content": "<string>",
"file_base64": "<string>",
"file_name": "<string>",
"instructions": "<string>",
"review": "<string>",
"wait_seconds": 0
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
source_name: '<string>',
content: '<string>',
file_base64: '<string>',
file_name: '<string>',
instructions: '<string>',
review: '<string>',
wait_seconds: 0
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/spaces/ingestions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"space": "<string>",
"address": "<string>",
"source_name": "<string>",
"status": "<string>",
"review": "<string>",
"created_by": {
"actor_type": "<string>",
"actor_label": "",
"user": "<string>"
},
"counts": {
"created": 123,
"updated": 123,
"unchanged": 123,
"awaiting_decision": 123,
"skipped": 123,
"failed": 123
},
"object": "space_ingestion",
"instructions": "<string>",
"created_at": "<string>",
"completed_at": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"internal": true
},
"message": "<string>",
"source_content": "<string>",
"source_file_name": "<string>",
"unfiled_excerpts": [
"<string>"
],
"operations": [
{
"id": "<string>",
"position": 123,
"kind": "<string>",
"status": "<string>",
"summary": "<string>",
"source_excerpt": "<string>",
"passage": "<string>",
"options": [
"<string>"
],
"page": {
"id": "<string>",
"address": "<string>",
"title": "<string>"
},
"parent": "<string>",
"parent_operation_id": "<string>",
"title": "<string>",
"existing_excerpt": "<string>",
"unavailable_options": {},
"decision": {
"choice": "<string>",
"decided_by": {
"actor_type": "<string>",
"actor_label": "",
"user": "<string>"
},
"decided_at": "<string>"
},
"result": {
"version_number": 123,
"content_hash": "<string>"
},
"error": {},
"current_content": "<string>",
"proposed_content": "<string>",
"option_contents": {}
}
],
"decision_errors": [
{}
]
}Body
application/json
Response
202 - application/json
Accepted
