pat-s
December 27, 2019, 9:32pm
1
In my client package, creating a checkout key via the "/project/<repo_slug>/checkout-key"
endpoint using the v1.1 API works fine.
Doing the same using API v2 results in a “invalid input” (400) response.
Contrary,
getting checkout keys
deleting checkout keys
works fine with API v2.
Am I overlooking something?
rose
December 27, 2019, 10:23pm
2
Hi @pat-s ,
I just tried this on my local machine and it worked. Are you passing a "type"
value as specified here ?
{
"type": "deploy-key" // or "user-key"
}
I was able to reproduce the “invalid input” response by making the API call without specifying a "type"
value.
pat-s
December 29, 2019, 9:02pm
3
Thanks. Turns out one has to use user-key
with API v2 but github-user-key
with API v1.1
When querying the keys, the names are still “github-user-key”. Maybe this should be harmonized upstream to cope with API v2.
2 Likes
rose
December 30, 2019, 9:58pm
4
Totally @pat-s . Looks like this isn’t specifically called out anywhere either, besides just comparing the V1 and V2 documentation. Harmonizing upstream—and/or just a bullet-point list of changes from 1 to 2 (also not mentioned here or here ). Thank you!
system
Closed
January 9, 2020, 9:58pm
5
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.