Whether you’re trying to get your feet wet with SmartFile’s API or get a downloadable list of user, group or file behavior, JSON can be a great tool. With the help of an online tool, you can easily view your data so you can troubleshoot or audit data.
Step 1: Login
Login to your SmartFile account so that way you can return data. Once you login, open a new browser tab and visit this JSON to CSV converter — even if you don’t want to download a CSV. It will help you parse through the data quicker by giving you a preview.
Step 2: Get Your Data
Here’s the fun part, getting your data into good looking tables. For help, we’ll refer to the SmartFile API documentation and help documents.
Use Case #1: Getting User Info
This method lets you list out all of your users and easily see what they can and cannot do, along with their starting folder path.
Visit https://app.smartfile.com/api/2.1/access/user/?format=json and copy the text that is returned. The text you copy will be a simple text string, like this:
Return to your JSON to CSV converter and paste in the results. For instance, here is what I received — which is much easier to read:
Use Case #2: Getting Link Info
With this method, you can see all the links that have been created and for what user. You can also check expiration dates, which is always handy if you mandate them.
Visit https://app.smartfile.com/api/2/link/?format=json and copy the text that is returned.
Return to your JSON to CSV converter and paste in the results. Here is what I received — which again is much easier to read:
acl/read | acl/write | acl/remove | acl/list | expiration | name | href | path | recursive | owner/first_name | owner/last_name | owner/email | owner/name | owner/username | owner/url | url | created | usage_count | usage_limit | requires_password | password | cache |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
true | true | Test | https://file.ac/YOUR-URL/ | /Test | First Name | Last Name | YourEmail@YourDomain.com | First Name Last Name | Username | /api/2.1/user/Username/ | /api/2.1/link/YourURL/ | 2015-05-18 | 0 | 0 | |||||||
true | Test | https://file.ac/YOUR-URL/ | /Test | First Name | Last Name | YourEmail@YourDomain.com | First Name Last Name | Username | /api/2.1/user/Username/ | /api/2.1/link/YourURL/ | 2015-05-18 | 0 | 0 | ||||||||
true | true | SFTEST | https://file.ac/YOUR-URL/ | /smartfile/SFTEST | First Name | Last Name | YourEmail@YourDomain.com | First Name Last Name | Username | /api/2.1/user/Username/ | /api/2.1/link/YourURL/ | 2015-06-09 | 0 | 0 | |||||||
true | true | 2015.05.17-2015.05.23.csv | https://file.ac/YOUR-URL/ | /logs/2015.05/2015.05.17-2015.05.23.csv | First Name | Last Name | YourEmail@YourDomain.com | First Name Last Name | Username | /api/2.1/user/Username/ | /api/2.1/link/YourURL/ | 2015-08-17 | 0 | 0 | |||||||
true | true | 2015.05.17-2015.05.23.csv | https://file.ac/YOUR-URL/ | /logs/2015.05/2015.05.17-2015.05.23.csv | First Name | Last Name | YourEmail@YourDomain.com | First Name Last Name | Username | /api/2.1/user/Username/ | /api/2.1/link/YourURL/ | 2015-08-17 | 0 | true | 1234567 | 0 | |||||
true | true | 2015.08 | https://file.ac/YOUR-URL/ | /logs/2015.08 | First Name | Last Name | YourEmail@YourDomain.com | First Name Last Name | Username | /api/2.1/user/Username/ | /api/2.1/link/YourURL/ | 2015-08-17 | 0 | true | 12345 | 0 | |||||
true | true | down block.mov | https://file.ac/YOUR-URL/ | /other/down block.mov | First Name | Last Name | YourEmail@YourDomain.com | First Name Last Name | Username | /api/2.1/user/Username/ | /api/2.1/link/YourURL/ | 2015-08-23 | 0 | 0 |
Use Case #3: Getting Group Info
This method lets you list out all of your users in a group. This is handy for making sure departments are cleaning up their users if you let them manage that piece.
Visit https://app.smartfile.com/api/2/group/?format=json and copy the text that is returned. The text you copy will be a simple text string, like this:
Return to your JSON to CSV converter and paste in the results. For instance, here is what I received — which is much easier to read:
Step 4: Download Your Data
Using the JSON to CSV converter, you can then download your data into a spreadsheet for easy access and manipulation.
Let us know if you have any questions or suggestions in the comments below. We would love to hear what you think and we’d love to hear your other use cases!