Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

None of the examples in create team show how to use parent_team_id #3484

Open
okapetanios opened this issue Mar 21, 2024 · 2 comments
Open

Comments

@okapetanios
Copy link

Schema Inaccuracy

gh api
--method POST
-H "Accept: application/vnd.github+json"
-H "X-GitHub-Api-Version: 2022-11-28"
/orgs/MYORGANIZATION/teams
-f name="teamname"
-f permission='push'
-f notification_setting='notifications_enabled'
-f privacy='closed'
-f parent_team_id=7100545

I get the following error
{
"message": "Invalid request.\n\nFor 'properties/parent_team_id', "7100545" is not a number.",
"documentation_url": "https://docs.github.com/rest/teams/teams#create-a-team"
}
gh: Invalid request.

For 'properties/parent_team_id', "7100545" is not a number. (HTTP 422)

@okapetanios
Copy link
Author

Sorry this is, in part a schema issue because none of the examples in create team show parent_team_id being used:
https://docs.github.com/en/rest/teams/teams?apiVersion=2022-11-28#create-a-team

@owlstronaut
Copy link

Thanks @okapetanios ! Indeed you do have to use -F parent_team_id=7100545 instead of -f parent_team_id=7100545 in order to pass the id as a number instead of a string. I'll see about getting an example added to our docs that shows its use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants