I'm trying to automate some bulk uploads to our self hosted install.
The file I'm uploading via swagger is a 65 byte file It uploads with a error 409 but it gives back the error.
{
"operations": {
"entryCreate": {
"entryId": 556124,
"exceptions": []
},
"setEdoc": {
"exceptions": []
},
"setTemplate": {
"template": null,
"exceptions": [
{
"errorCode": 9066,
"errorClass": "extraErrorException",
"statusCode": 409,
"operationId": "6de271ffa78344ce88d28f819a17fb22",
"message": "One or more required fields were omitted or had a blank value. [9066]",
"errorSource": "Laserfiche Server"
}
]
},
"setFields": {
"fieldCount": 0,
"exceptions": [
{
"errorCode": 216,
"errorClass": "invalidRequest",
"statusCode": 400,
"errorSource": "Api Server",
"operationId": "6de271ffa78344ce88d28f819a17fb22",
"message": "Error: Given value is not a valid option in the list of items for field Document Type.",
"instanceDetail": "metadata.fields.Document Type"
},
{
"errorCode": 9054,
"errorClass": "extraErrorException",
"statusCode": 409,
"operationId": "6de271ffa78344ce88d28f819a17fb22",
"message": "Bad field: Department. Another operation on which this operation depends failed. [9054]",
"errorSource": "Laserfiche Server"
},
More Omitted, identical to above with each field.
]
}
},
"documentLink": "https://redacted/LFRepositoryAPI/v1/Repositories/DEV--Cityof/Entries/556124"
}
The first error I think is related to setting the template and it says template: null in the error.
A full fields of a file that was uploaded with the web interface.
{
"@odata.context": "https://redacted/LFRepositoryAPI/v1/$metadata#Collection(Laserfiche.Repository.EntryFieldValue)",
"value": [
{
"@odata.type": "#Laserfiche.Repository.FieldValue",
"fieldId": 48,
"fieldName": "Department",
"fieldType": "List",
"isMultiValue": false,
"isRequired": false,
"hasMoreValues": false,
"groupId": 0,
"values": [
{
"value": "Legislative Services",
"position": 0
}
]
},
{
"@odata.type": "#Laserfiche.Repository.FieldValue",
"fieldId": 49,
"fieldName": "Document Type",
"fieldType": "List",
"isMultiValue": false,
"isRequired": false,
"hasMoreValues": false,
"groupId": 0,
"values": [
{
"value": "Brochure",
"position": 0
}
]
},
{
MORE Ommited
}
]
}
My body looks like
{
"template": "Main",
"metadata": {
"fields": {
"Department": {
"values": [
{
"value": "IT",
"position": 0
}
]
},
"Document Type": {
"values": [
{
"value": "Brochure",
"position": 0
}
]
},
"Original Creation Date": {
"values": [
{
"value": "1980-04-21",
"position": 0
}
]
}
},
"tags": [
],
"links": [
]
},
"volumeName": ""
}
I thought it might just be that it doesn't like setting a template because of the document type, but you can see this is the exact value I got from looking at another entity.