Check out our upcoming webinars and client office hours calendar here!

How Can We Help?

Search icon

Search Results

Download Documents Stored in FS, RPT, or FAR via the API

You can use our APIs to find and download documents stored in FS, RPT, or FAR.

 

Download Documents Stored

Faculty Activity Reporting (FAR/Faculty180)

For FAR, the main endpoint you will use is the user data endpoint. This endpoint will return all data for all users in all sections. We recommend that you use one or more of the query parameters (such as termstart/termfinish, userlist, limit/offset) to pair down the data to a manageable set. The API will return sections with activity data contained in the node "activities". The activity data nodes will contain a node for "attachments" where they exist. Each attachment object will contain a "downloadurl" attribute. You can download the given document by running a GET call to the given URL. The API will then stream the file back to you so that you can save it to disk.

 

Fetches all data for all users, limited to 10 entries per page, starting at 0:

GET => https://faculty180.interfolio.com/api.php/userdata?limit=10&offset=0

Fetches all data from Fall 2021 to Summer 2022 for user with faculty ID "facID123456":

GET => https://faculty180.interfolio.com/api.php/userdata?termstart=2021/01&termfinish=2022/03&userlist=facID123456

Fetches the document with secret key "longalphanumericstring":

GET => https://faculty180.interfolio.com/public/download.php?key=longalphanumericstring
 
 

Faculty Search

For FS, the main endpoint you will use is the applications#document_data endpoint. This endpoint requires a "position_id" and an "application_id". You can find the ID of a position that you want to use by calling the v2#positions#filter endpoint. The API will respond with a paginated results set containing the positions at your institution. Each position object will have an "id" attribute that represents "position_id".

 

Fetches position list:

POST => https://logic.interfolio.com/byc-search/v2/{tenant_id}/positions/filter

You can look up the applications for that position by calling the applications#index endpoint. The API will respond with a list of applications for the given "position_id". Each application object will have an "id" attribute that represents "application_id".

 

Fetches application list for the given position:

GET => https://logic.interfolio.com/byc-search/{tenant_id}/positions/{position_id}/applications

You can then use the "position_id" and "application_id" values to call the applications#document_data endpoint. The API will respond with a list of media objects that have been received for the given application. Each media object will have the attributes "url" and "format". You can download media with the formats "PDF" or "IMAGE" by running a GET call to the given URL. The API will respond with a 302 status and a header "location" that contains a link to the document in our storage system. You will need to capture the redirect URL and issue a new GET call to that URL without including the authorization header (see code example below). The API will then stream the file back to you so that you can save it to disk.

 

Fetches media that has been received for the given application:

GET => https://logic.interfolio.com/byc-search/{tenant_id}/positions/{position_id}/applications/{application_id}/document_data

Fetches the document file stored at the given URL:

GET => https://s3.amazonaws.com/{interfolio_bucket}/{interfolio_app}/example_doc_key.pdf?{temporary_security_key_content}
 
 

RPT

For RPT, the main endpoint you will use is the packets#document_data endpoint. This endpoint requires a "packet_id". You can find the ID of a packet that you want to use by calling the packets#index endpoint or the packets#index#archived endpoint. These endpoints will return a list of packets at your institution. Each packet object will have an "id" attribute that represents "packet_id".

 

Fetches packets list:

GET => https://logic.interfolio.com/byc-tenure/{tenant_id}/packets

You can then use the "packet_id" to call the packets#document_data endpoint. The API will respond with a list of media objects that have been received for the given application. Each media object will have the attributes "url" and "format". You can download media with the formats "PDF" or "IMAGE" by running a GET call to the given URL. The API will respond with a 302 status and a header "location" that contains a link to the document in our storage system. You will need to capture the redirect URL and issue a new GET call to that URL without including the authorization header (see code example below). The API will then stream the file back to you as a literal file so that you can save it to disk.

 

Fetches media that has been received for the given packet:

GET => https://logic.interfolio.com/byc-tenure/{tenant_id}/packets/{packet_id}/document_data

Fetches the document file stored at the given URL:

GET => https://s3.amazonaws.com/{interfolio_bucket}/{interfolio_app}/example_doc_key.pdf?{temporary_security_key_content}
 
 

Ruby code examples for Faculty Search and RPT APIs

The intent here is to issue the call to the URL for a given document that you wish to download, capture the redirect URL contained in the "location" header, and issue a second call without the "Authorization" header. The second call results in the file being streamed back to the API user.

RestClient::Request.execute(method: request_verb, url: "#{host}#{request_string}", headers: {"TimeStamp" => timestamp_string, "Authorization" => authorization_header}) do |response, request, result, &block|
 if [302].include? response.code
 redirected_url = response.headers[:location]
 RestClient.get(redirected_url)
 else
 response.return!(request, result, &block)
 end
end
 
 
Was this article helpful?
Give feedback about this article