Is there a way to persuade the DoQuery API call to return attributes of file attachments?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I'm hoping to be able to execute an API call to retrieve the information that's displayed when looking at the revision history for a file attachment - i.e. revision number, date, name, size and creator user account. 

I can see that the '&fmt=structured' parameter on the DoQuery API call adds the file attachment url to the response, but it would be great if I could return the other attributes.

Photo of Jeremy

Jeremy

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,894 Points 20k badge 2x thumb
You can extract this information from the following URL using the gimmeAllTheDatas technique.

https://<SUBDOMAIN>.quickbase.com/db/<DBID>?a=GenVerBrow&rid=<RID>&f=<OBE32 Encoded fid>

There are OBE32 encode and decode functions here:

http://pastie.org/pastes/2270418/text


gimmeAllTheDatas is explained here

https://quickbase-community.intuit.com/questions/1319944-what-is-gimme-all-the-datas
Photo of Jeremy

Jeremy

  • 0 Points
Fantastic - thanks very much for that. Will give it a go.
Photo of Jeremy

Jeremy

  • 0 Points
Quick Update - We have a table that allows multiple images to be stored as file attachments (being resampled to reduce the size!). For our requirements it is sufficient to be able to view version number, date created, size and author for all images attached to a record on demand, so I have a button calling a script that pulls the required information from each page (using the url format in Dan's response) and displays it to the user. Works well!

We're also writing this information back to the record and including a timestamp so we have a snapshot of the information that will be up-to-date if the record hasn't been updated since the timestamp.