Setting metadata value
Learn how to update the collection using the Alphamoon's API
Last updated
Learn how to update the collection using the Alphamoon's API
Last updated
{
"id": "191719e01ae84f02993168ef95be3c49",
"name": "Invoice example.pdf",
"files": [
{
"id": "0164f04d3a1e4138b73bb84695395871",
"collectionId": "191719e01ae84f02993168ef95be3c49",
"name": "Invoice example.pdf",
"status": "Accepted",
"progress": 100,
"numberOfPages": 1,
"createdAt": "2024-04-15T15:03:38Z",
"updatedAt": "2024-04-16T12:29:07Z",
"metadata": {}
}
],
"priority": false,
"split": false,
"status": "Accepted",
"progress": 100,
"numberOfPages": 1,
"processId": "93580f176efb48cda64f25cba74d8ca4",
"createdAt": "2024-04-15T15:03:38Z",
"updatedAt": "2024-04-29T12:07:54Z",
"metadata": {
"printed": "yes"
},
"availableForTraining": true,
"duplicates": []
}{
"action": "The client should not repeat this request without modification.",
"detail": "Please see the 'errors' field for details.",
"errors": [
{
"location": "body: priority",
"message": "field required",
"type": "request_validation_error"
}
],
"instance": "30e18f59-7c88-4e25-9bed-61863b2abf4b",
"status": 400,
"timestamp": "2021-11-09T17:43:36Z",
"title": "The server cannot process the request due to a client error.",
"type": "RequestValidationError"
}{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}curl -X 'PATCH' \
'https://workspace.alphamoon.ai/api/v0.3/collections/191719e01ae84f02993168ef95be3c49' \
-H 'accept: application/json' \
-H 'Authorization: Basic API_KEY_BASE64_ENCODED' \
-H 'Content-Type: application/json' \
-d '{
"metadata": {"printed": "yes"}
}'{
"id": "191719e01ae84f02993168ef95be3c49",
"name": "Invoice example.pdf",
"files": [
{
"id": "0164f04d3a1e4138b73bb84695395871",
"collectionId": "191719e01ae84f02993168ef95be3c49",
"name": "Invoice example.pdf",
"status": "Accepted",
"progress": 100,
"numberOfPages": 1,
"createdAt": "2024-04-15T15:03:38Z",
"updatedAt": "2024-04-16T12:29:07Z",
"metadata": {}
}
],
"priority": false,
"split": false,
"status": "Accepted",
"progress": 100,
"numberOfPages": 1,
"processId": "93580f176efb48cda64f25cba74d8ca4",
"createdAt": "2024-04-15T15:03:38Z",
"updatedAt": "2024-04-29T12:07:54Z",
"metadata": {
"printed": "yes"
},
"availableForTraining": true,
"duplicates": []
}