Problem: OpenApply is used as the entry point in the admissions process, where parents upload passport photos, and other details. You would like to be able to store those assets in another system, or perhaps upload them into your school's SIS or MIS platform.
Solution: OpenApply has an exporting feature that will allow you to do a wholesale export of all files, but if you looking for an automated process, you can use the APIs to achieve this.
Notes:
- This technique assumes some understanding of APIs. Please consult OpenApply's Reference Documentation for more details about how to call each endpoint
Steps Involved:
- We support using the API to get all student information, including filtering, and retrieving updates since the last call. This student information includes a secret link to PDF files submitted to application form.
- You can then securely download these assets, save to disk, or upload to the target platform.
Step 1: Use the Get all Students endpoint to get a list of all the students in OpenApply. The first time, you will need to get all of the students. However, on subsequent calls, say, a week later, you can use the `since_date` query parameter to only get those records that have changed since the YYYY-MM-DD formatted-date. In this way, you can loop through a much smaller number of records, instead of all of them every time.
Step 2: Identify the assets that you would like downloaded. They can be found in each individual record returned by the Get all Students endpoint, and may be different for each school . All records will have a `profile_photo` property, and many schools will have the same frequently-used standard fields found in the `custom_fields` property. In addition, some schools may add an upload form to their Application Form, which will also appear in `custom_fields`. Note that in the v1 API files will only be available by calling the individual student e.g. GET {{url}}/students/:id
Step 3: Retrieve the value of all the target properties that has been identified, for example `profile_photo`. It will be a full URL.
Step 4: Use the value of the property and connect to the internet using that value as the URL, just as you would normally. If testing manually, you can use the browser.
NOTE: The url value in the response is currently for V1 of our API, so you will need to use v1 authentication to retrieve them successfully. Using V3 will result in "Access Denied."
Step 5: Note that depending on the URL, it may be a link to a content provider, which provides an unguessable random number of characters, and does not require a log in. For example, the URLs may be to CloudFlare.
Step 5 1/2: If you attempt to use the URL provided, you may get an error "Access Denied." This will happen especially if the asset's URL is behind the V1 API. In this case, you simply need to add version 1 token in the "API Manager" area of OpenApply, call the URL with that token. You can add the token either to the headers, or to the end of the URL as a query parameter. If you are using the browser to test, you would need to use the latter method.
Step 6: The response to this call will have a `Content-Type` response header which will indicate the format of the blog. Save the file with a label, including the student ID as an identifier, so that this particular file is clearly labeled as having some particular content.
In this way, automated processes can be constructed to extract the uploaded assets.