Download the latest dbml file in ci/cd pipeline

I want to be able to download the latest dbml file in from in my ci/cd process. Does anyone know how to do this? Is this possible?

Hi there,

To solve your problem, please see our previous post in this community thread about using dbdiagram’s public API:

In this case, you must make a GET request to retrieve the dbml content. This is an example of a request:

requests.get(f'{your_diagram_id}', headers=headers)

However, this is only a workaround. We’ll soon consider officially introducing our API.

Best regards
Huy Phung

My diagram is not a public diagram, it’s a private diagram.

To get my diagram id, I went to the url for my diagram and copied it from there:

Then I ran this command and I’m getting a 403 Forbidden error.
curl --request GET

Do I have to add some auth parameter like a header or something else to my call?

Hi looper33,

Thank you for sharing your case with us. Unfortunately, we regret to inform you that public API for fetching private diagrams is not supported at the moment.