cancel
Showing results for 
Search instead for 
Did you mean: 

Upload and Archive interactions: KeywordGuid value

Denise_Gemesio
Confirmed Champ
Confirmed Champ

Hi everyone,

 

I will need to use the Single Part File Upload for a customer and going through the documentation here everything is very clear.

Nonetheless, when coming to Request 3, I didn't get what was the "KeywordGuid" value? Is it a random value? Or is it linked to the configuration?

07c160b6aca34401a800d74fe43f4703

Thank you very much and have a nice day 🙂

Denise

1 ACCEPTED ANSWER

Daniel_Medina
Champ in-the-making
Champ in-the-making

Hello Denise,

The KeywordGuid is a randomly generated value.  We can retrieve the KeywordGuid for the Document Type by performing a GET request to  /document-types/documentTypeId/default-keywords  .  From the response, we'll copy the KeywordGuid and use that in document archival. 

 

More information on performing this request can be found in the article, "Gets default keywords for a new document" located in the SDK here:  https://sdk.onbase.com/rest/docs.html?product=OnBase&release=FoundationEP4&spec=document#operation/G...  .

View answer in original post

4 REPLIES 4

Daniel_Medina
Champ in-the-making
Champ in-the-making

Hello Denise,

The KeywordGuid is a randomly generated value.  We can retrieve the KeywordGuid for the Document Type by performing a GET request to  /document-types/documentTypeId/default-keywords  .  From the response, we'll copy the KeywordGuid and use that in document archival. 

 

More information on performing this request can be found in the article, "Gets default keywords for a new document" located in the SDK here:  https://sdk.onbase.com/rest/docs.html?product=OnBase&release=FoundationEP4&spec=document#operation/G...  .

Thank you Daniel! Have a nice week!

Were you able to get this to work using the JSON you show above?  I found that the documentation on the JSON format for this call is different between 2 different link sources and once I changed the JSON it got further, however now I get a 403 Forbidden.  

 

here's the 2 documentation links I used where the JSON format conflicts:

linkA

vs

linkB

 

 

This is the format of the JSON I had to switch to using linkB above, however I omitted typeGroupId:

 

{
"documentTypeId": "string",
"fileTypeId": "string",
"storeAsNew": true,
"comment": "string",
"documentDate": "2018-08-21T00:00:00.000Z",
"uploads": [
{
"id": "string"
}
],
"keywordCollection": {
"keywordGuid": "string",
"items": [
{
"typeGroupId": "string",
"keywords": [
{
"typeId": "string",
"values": [
{
"value": "string"
}
]
}
]
}
]
}
}

 

Thanks, Diane

Denise_Gemesio
Confirmed Champ
Confirmed Champ

Hi!

On almost the same topic, I keep getting the status "400 Bad Request" when executing the last step of the document upload ("Archive document with upload and metadata": https://sdk.onbase.com/rest/OnBase/FoundationEP3/document/programmers-guide/upload-archive-interacti...).

I just copied the code and changed the parts that needed to be changed.

It's a post query to this link with the right authorization token: https://{localhost}/ApiServer/onbase/core/documents

 

The body of the error:

{
    "errors": {
        "keywordCollection": [
            "The input was not valid."
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "Bad Request",
    "status": 400,
    "detail": "Some of the provided input data is invalid",
    "instance": "/documents"
}

 

The body of the request (the document type doesn't have any keywords to be sure nothing was wrong in the keywords):

{
  "documentTypeId": "152",
  "fileTypeId": "16",
  "documentDate": "2020-09-11",
  "uploads": [
    {
      "id": "313fd1ec-a405-4e25-bb1f-537a7fb68e79"
    }
  ],
  "keywordCollection": [
    {
      "keywordGuid": "49f341a8-82cb-4065-9502-ac40f0ff429d",
      "keywords": []
    }
  ]
}
Getting started

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.