08-12-2021 02:00 AM
Hello,
I'm trying to create document into OnBase by calling the url: POST /document
That return Bad Request (400) withing message: "User does not have rights to create/modify hidden and/or readonly keywords"
everything else is working (create upload space, upload file to tempfs, etc...)
I'm using manager account for test purpose & manager has access to restricted keyword.
I've try document without readonly keyword too.
here's some example of the post request:
{
"documentTypeId": "402",
"fileTypeId": "2",
"storeAsNew": true,
"documentDate": "2021-08-12T09:32:42.000Z",
"uploads": [
{
"id": "2cda143a-36af-4989-8804-9c8578d3ec35"
}
],
"keywordCollection":
{
"keywordGuid": "454a0195-1244-4f91-8c2a-0309e3344074",
"items": [
{
"keywords": [
{
"typeId": "681",
"values": [
{
"value": "MANAGER"
}
]
}
]
}
]
}
}
I've try same call without keyword with the same issue:
{
"documentTypeId": "402",
"fileTypeId": "2",
"storeAsNew": true,
"documentDate": "2021-08-12T09:32:42.000Z",
"uploads": [
{
"id": "2cda143a-36af-4989-8804-9c8578d3ec35"
}
],
"keywordCollection": {
"keywordGuid": "454a0195-1244-4f91-8c2a-0309e3344074",
"items":
[
{
"keywords": []
}
]
}
}
Thanks for any idea.
08-12-2021 07:53 AM
Another suggestion, where are you obtaining that keyword GUID from? You have to get a fresh keyword GUID with each upload by calling the default keywords endpoint (/document-types/{documentTypeId}/default-keywords). The keyword guid is document specific, so once you upload a document with it, that keyword guid is no longer valid.
I think that could cause the error message you are seeing.
08-12-2021 06:08 AM
Have you verified that the document type that you are uploading to is able to be stored to through the MANAGER account? I would highly suggest double checking the document type's User Group settings.
08-12-2021 06:47 AM
As another suggestion, have you tried another Document Type? Possibly a System Document?
08-12-2021 07:53 AM
Another suggestion, where are you obtaining that keyword GUID from? You have to get a fresh keyword GUID with each upload by calling the default keywords endpoint (/document-types/{documentTypeId}/default-keywords). The keyword guid is document specific, so once you upload a document with it, that keyword guid is no longer valid.
I think that could cause the error message you are seeing.
08-12-2021 07:57 AM
To confirm, I performed a test using a previous keywordGUID and did in fact receive this error message.
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
"title": "Forbidden",
"status": 403,
"detail": "User does not have rights to create/modify hidden and/or readonly keywords",
"instance": "/documents"
}
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.