CD2 Complete Newbie Doc?

Jump to solution
Community Explorer

Hello Friends-

I am not a coder or dba. The existing CD2 documentation gets me to the point where I can run the cli on my Mac and get a list of tables, and then it stops. The Postman doc gets me making api calls, but not downloading any data.

I set up a postgres database, and I want to know how to hook up CD2 to it. If someone would like to help me, I'd be happy to write the instructions for others (I'm a technical writer). It seems unlikely that I'm the only Canvas admin without experience with this.

Labels (2)
1 Solution

I would strongly recommend that you check out the official Python client library. It takes most of the work off your shoulder.

In order to retrieve data by interacting with DAP API endpoints directly, you must first start a query job by invoking the API endpoint{namespace}/table/{table}/data

This is an asynchronous call; it will trigger the job but the job will take time to process. You can monitor the status by invoking the status endpoint. Once the job is complete, it returns a series of object IDs. You will need to exchange these object IDs to pre-signed URLs with URL exchange endpoint. Finally, you need to download the files that the pre-signed URLs point to with plain HTTP file download.

DAP API returns full table dumps for a single root account. There is no API for passing row-level filters.

If you think the process is complicated, I agree. This is why we have created the DAP client library, which has the commands snapshot and incremental to do all these steps for you.

View solution in original post