POST /repos/OWNER/REPO/branches/BRANCH/protection/restrictions/[users|teams|apps]
{
"users|teams|apps": [
"name1",
"name2"
]
}
gh: Invalid request.
For 'links/12/schema', {"apps" => ["name1"]} is not an array. (HTTP 422)
"message": "Invalid request.\n\nFor 'links/12/schema', {\"apps\" => [\"name1\"]} is not an array.",
"documentation_url": "https://docs.github.com/rest/branches/branch-protection#add-app-access-restrictions",
"status": "422"
}
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/rest/branches/branch-protection?apiVersion=2022-11-28#add-user-access-restrictions
https://docs.github.com/en/rest/branches/branch-protection?apiVersion=2022-11-28#add-team-access-restrictions
https://docs.github.com/en/rest/branches/branch-protection?apiVersion=2022-11-28#add-app-access-restrictions
What changes are you suggesting?
The code examples for the APIs above call for a JSON object
However, we will get error in response
It turns out that the APIs need an array directly
Additional information
No response