11 Replies
https://dash.cloudflare.com/api/v4/accounts/{accountId}/pages/connections
https://dash.cloudflare.com/api/v4/accounts/{accoutId}/pages/connections/github/{org}/repos?page=1&per_page=10
I can only find 2 web api ,but can't find open api
As in you want to link GitHub repos to Cloudflare Pages projects with the api?
Yes . I want to use cloudflare token and api to get all info. just like https://api.cloudflare.com/api/v4/accounts/%7BaccountId%7D/pages/connections , they can return orgs list and choose repos https://dash.cloudflare.com/api/v4/accounts/%7BaccoutId%7D/pages/connections/github/%7Borg%7D/repos?page=1&per_page=10 to deploy repo to cloudflare
I don’t think you get can the info with the API. But to create a new project with it, you have the source block set to it
I found nuxthub can get the info , they can get all list repos
Confused on what you are saying? Cloudflare can list all your repos, just not with the API
My question is, I want to get all the repos via API, I need to automate the whole process without having to go through the Cloudflare dashboard. I see that NuxtHub can do this, so I'm wondering if there's an interface like that?
Not with Cloudflare. You have to go through dashboard to link your GitHub account but afterwards you can do it via the API but you’d have to get the repos a different way
Thank you for your reply. Now the problem is, how can I get these data through API. Because I have already given Cloudflare permission to access my GitHub repository, I hope to get the Git repository information directly through the Cloudflare API. Do you have any suggestions?
I mean you might be able to reverse engineer the API calls that the dashboard makes but there is no official API for it that I am aware of
Got it, thank you very much