API User and Attachment REST API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ceonello
    Member
    • Feb 2020
    • 36

    API User and Attachment REST API

    Hi All,
    I have an API user that need to access the api/v1/Attachment service to retrieve an attachment list filtered by parentId (with other attributes like file size and content type).
    The problem is that when I try GETting a result from that endpoint, the system always respond with '403 Forbidden' Status, and I have no way to set Attachment read permission on roles since there is no Attachment entity.
    Is there any workaround on this?

    Thank you very much
    Last edited by Ceonello; 03-30-2021, 12:51 PM.
  • Ceonello
    Member
    • Feb 2020
    • 36

    #2
    Originally posted by Ceonello
    Hi All,
    I have an API user that need to access the api/v1/Attachment service to retrieve an attachment list filtered by parentId (with other attributes like file size and content type).
    The problem is that when I try GETting a result from that endpoint, the system always respond with '403 Forbidden' Status, and I have no way to set Attachment read permission on roles since there is no Attachment entity.
    Is there any workaround on this?

    Thank you very much
    Ok, I think I found a workaround by myself:
    - retrieve attachmentsIds from the parent entity
    - for every attachmentId get api/v1/Attachment/<attachmentId> and store it in a list (this end point is accessible even by API User)

    If you know a better approach I will be glad to hear it, otherwise consider the thread closed.

    Bye

    Comment

    Working...