How to access and use TrackVia's API or Application Scripts?

Get attachment name

I have successfully retrieved a record from view using API script. I want to download the attachments, but the problem is this that i am getting the
"id" of attachment, but i want to get name of attachment. Please let me know how i can get name of attachment through API.
i am using builtIn PHP SDK.

1 vote
Sign in
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Usman Khalid shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
Sign in with: facebook google
Signed in as (Sign out)
  • Kimberly commented  ·   ·  Flag as inappropriate

    Hello Usman,

    Thank you for contacting TrackVia!

    To obtain the true file name, you would need to take record id, and a URL encoded field name, then pass it into the following endpoint:

    GET /openapi/views/{viewId}/records/{recordId}/files/{fieldName:.+}

    The response from this endpoint should return the file contents in the body, and you can retrieve the filename from the "content disposition" response header.

    We will reach out to our engineering team to have the PHP sdk updated - thank you for bringing this to our attention.

    Hopefully this helps!



Feedback and Knowledge Base