cancel
Showing results for 
Search instead for 
Did you mean: 

Foundations EP5 REST API - Is TargetFileTypeId required for Document PUT requests?

Bria_Lubiens
Champ on-the-rise
Champ on-the-rise

I am working on creating a wrapper for the Foundations EP5 REST API and came across what I believe is incorrect information in the Spec.

https://sdk.onbase.com/rest/docs.html?product=OnBase&release=FoundationEP5&spec=document#operation/P...

For the Document PUT request, the spec says that TargetFileTypeId is NOT required given you are not trying to upload a new rendition of the latest revision.

However, I have not found this to be true, I've tried the following:

 

Excluding TargetFileTypeId completely from the request

Passing explicit "null"

Passing an empty string ""

Passing "0"

 

The only way I can get the document to re-index to TargetDocumentTypeId I am specifying is by passing the current FileTypeId of the document.

Is this a known issue? Is the spec incorrect? Or has anyone else done this successfully?

5 REPLIES 5

Ryan_Wakefield
World-Class Innovator
World-Class Innovator

I concur with your findings and I have found the FileTypeId to be a required field as well.

It's so unfortunate because our consumers don't use renditions at all and I can't find a simple way of getting the fileTypeId of a document on their behalf. 

@Bria Lubiens I have not had a chance to test out the original question about this field being required in all cases even though it is not marked as such, but I did want to take the chance to point out the '/default-upload-file-types' endpoint. This takes a file extension in the query string and will return what file type in OnBase this would typically match.

This is similar to what our Web and Unity client will do during an upload. When a user chooses the file to upload, it takes a best guess at the file type and preselects it for them. Most of the time users probably don't have to change the value. This endpoint allows you to provide similar functionality. It doesn't get rid of the need to specify file type, but it may make the user have to worry about it less. If the files are unusual extensions that end point may not always have a "best-guess" though.

Thanks for this suggestion @Justin Carlson . This is definitely good to know and be aware of when using the REST API.

 

Thanks.

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.