Skip to content

createGroup results in 400 error #1230

Closed
@michaeln31

Description

@michaeln31

Using 6.0.0-rc.8's createGroup(GroupParams params) method I get 400 response with name is missing, path is missing

GroupParams groupParams = new GroupParams()
                .withName(name)
                .withPath(name)
                .withParentId(parentId);

gitLabApi.getGroupApi().createGroup(groupParams)


Caused by: org.gitlab4j.api.GitLabApiException: name is missing, path is missing
	at org.gitlab4j.api.AbstractApi.validate(AbstractApi.java:784)
	at org.gitlab4j.api.AbstractApi.post(AbstractApi.java:402)
	at org.gitlab4j.api.GroupApi.createGroup(GroupApi.java:639)

The access token used has been validated using Gitlab's APIs directly and Group addGroup(Group group) works fine.

Group group = new Group();
        group.setName(name);
        group.setPath(name);
        group.setParentId(parentId);

gitLabApi.getGroupApi().addGroup(group)

3 < 201

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions