Created
November 14, 2018 06:50
-
-
Save stinethebean3/da40f3284bf74e06d717cb77c3865de2 to your computer and use it in GitHub Desktop.
Get list of Google Street View uploads for a Matterport account in a given date range
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Usage: | |
| # $ export TOKEN=abcdefg | |
| # $ viewgsvuploads.sh $orgID 2018-10-1 2018-10-31 | |
| token="$TOKEN" | |
| organization="$1" | |
| created_gte="${2}T00:00:00%2B00:00" | |
| created_lt="${3}T00:00:00%2B00:00" | |
| data=$(curl \ | |
| "https://my.matterport.com/api/v2/organizations/${organization}/activity/?activity_code=7&created_gte=${created_gte}&created_lt=${created_lt}&ordering=-created&page=1&page_size=50" \ | |
| -H "cookie: token=${token};" \ | |
| --compressed) | |
| echo "$data" | jq -r '.results[] | "\(.billable_sid), \(.details.model_name), \(.details.model_sid), \(.created)"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment