Retrieve document from InfoArchive API

Options
Dave Snijders
edited October 24, 2023 in General Questions #1

Hello,

I figured out how to perform a search on InfoArchive using API's and search compositions. In the response there is a result list with all the metadata, including the attachment. The attachment shows an url.

When doing a GET on this url, the document is retrieved from InfoArchive. In this case I have to do 2 API calls for retrieving the document:

  1. execute a search to get the attachment url
  2. Do a get on that attachment url to retrieve the document.

Is there a possibility to retrieve the document with one request, for example by using a unique identifier?

Tagged:

Best Answer

  • A Kalogeropoulos
    Options

    Hello Dave,

    Direct access to cid (content identifiers) is possible but you first need to make sure that this is what you want from a configuration/security point of view. Since as you probably know security is not on content level (there is no ACL, and some object schema may have multiple contents or none) but through search configuration (those can be mapped to groups) where you can enforce/limit search criteria.

    If you open direct access to cid, effectively someone through REST API could deduct (or force brut) cids and get access to content, he should not have access to.

    Assuming you want direct access through cid, you need first to configure your holding for that access. and then you should have a way to get those cids beforehand. this can be done through search (and storing them), but you can also get them through the ri.xml after ingesting (the REST APi will give you the package information), and finally you can get this asynchronously through confirmation.

    Normally most of this is quite documented, but feel free to also reach out to P.S.

Answers

  • A Kalogeropoulos
    Options

    Hello Dave,

    Direct access to cid (content identifiers) is possible but you first need to make sure that this is what you want from a configuration/security point of view. Since as you probably know security is not on content level (there is no ACL, and some object schema may have multiple contents or none) but through search configuration (those can be mapped to groups) where you can enforce/limit search criteria.

    If you open direct access to cid, effectively someone through REST API could deduct (or force brut) cids and get access to content, he should not have access to.

    Assuming you want direct access through cid, you need first to configure your holding for that access. and then you should have a way to get those cids beforehand. this can be done through search (and storing them), but you can also get them through the ri.xml after ingesting (the REST APi will give you the package information), and finally you can get this asynchronously through confirmation.

    Normally most of this is quite documented, but feel free to also reach out to P.S.

  • Hello,

    As InfoArchive uses searches to determine who has access to which resources, you will need to get to a specific object by using the search and then the CID (COntent ID) of that document.