trying to recreate snap_sh.sh in Postman

Jump to solution
IanGoh
Community Participant

I've gotten a Postman collection (at least manually) to do the steps

# 1. We go to DAP to authenticate with client ID/secret and get a JWT token back
 
got the access_token
 
# 2. In possession of that token we go the query interface to initiate our DAP query. We get back a job ID from the request
 
got back job id 
 
# 3. Using the job ID, let's wait for the job to finish
 
# 4. When a job is complete, the first result resource ID contains the response resource.
 
job completed, got
 
{
    "id""24168951-...",
    "status""complete",
    "resources": [
        {
            "id""24168951..."
        }
    ],
    "started_at""2022-06-17T20:15:25Z",
    "at""2022-06-17T20:13:03Z"
}
 
# 5. When the job is complete, a pre-signed URL is present in the response. We get this URL here.
 
so then I tried to get the url with
"id""24168951..." }
 
but I'm getting back
 
{
"error" : {
"id" : "76f8f2d5-5873-4f67-9b02-5a3ef5e5b2b6",
"message" : "Bad request format."
}
}
Labels (2)
0 Likes
1 Solution
IanGoh
Community Participant

mea culpa,  the /object/url request needed to enclose the id in { .. ]

 

[
    {
        "id""24168951..."
    }
]
 
And I did get a URL back.

View solution in original post