Incorrect type in create site > repo > id in api docs

Not sure where to put this, but the docs for creating sites had me a bit confused because the POST to /sites (Netlify API documentation) shows that the repo object’s ID field should be an integer. I am using bitbucket and so was searching all over for where the ID thats an integer could be found, only to finally discover that the correct value there is the workspace/repoName which is a string.

Sounds simple in retrospect, but because I was looking for which ID to put there, it caused a lot of confusion in trying different IDs there, like the deploy key ID that is returned from a POST to bitbucket to add the deploy key, etc…

Would be great to update. Thank you.

thanks for letting us know, @shallow_alchemy ! we’ll look into it.

Heya @shallow_alchemy and thanks again for the report! We did some investigation and indeed the type on bitbucket repos is the project/path, while for github repos, it’s the ID. Our team is discussing how/if we can make this more obvious in the autogenerated swagger spec (what you link to), and that may or may not be possible, but I can at least confirm that you are not holding it wrong :slight_smile:

1 Like

Thank you. I only figured out what to put there for bitbucket by looking at a payload somewhere else that included a repo object from another site already integrated with bit bucket. I saw the project and repo name in the json. Honestly it might even be worth updating it in the support thread about creating repo objects. It only mentions GitHub there

hi again! thanks for that info. when you say “Honestly it might even be worth updating it in the support thread about creating repo objects. It only mentions GitHub there” can you say what/where you mean exactly? i’d love to take a closer look and see if we can make things more clear.