I have a group called spr-customers. It has the namespace_id 28. This I know, because listing all projects for the group references this namespace_id. I can also query the namespace by looking it up via API. However, listing all namespaces does not return the namespace associated with this group. When I try to create a new project inside the group by providing its namespace_id it still ends up as a personal project.
curl --request GET --header "PRIVATE-TOKEN: $GITLABTOKEN" https://gl.domain.io/api/v4/namespaces/28 | jq
{
"id": 28,
"name": "spr-customers",
"path": "spr-clients",
"kind": "group",
"full_path": "spr-clients",
"parent_id": null,
"members_count_with_descendants": 3
}
Creating a new project using this namespace still results in a private project inside my namespace
curl --request POST --header "PRIVATE-TOKEN: $GITLABTOKEN" https://gl.domain.io/api/v4/projects?name=foobar&namespace_id=28
curl --request GET --header "PRIVATE-TOKEN: $GITLABTOKEN" https://gl.domain.io/api/v4/projects/83 | jq
{
"id": 83,
"description": null,
"name": "foobar",
"name_with_namespace": "lari / foobar",
"path": "foobar",
"path_with_namespace": "lari/foobar",
"created_at": "2019-04-29T13:07:39.769Z",
...
"last_activity_at": "2019-04-29T13:07:39.769Z",
"namespace": {
"id": 2,
"name": "lari",
"path": "lari",
"kind": "user",
"full_path": "lari",
"parent_id": null
},
...
I’m probably missing something really obvious, but I can’t figure it out. Help would be greatly appreciated.