Skip to content

Agents.createToken uses the wrong HTTP verb #3807

Description

@asperan

Description

  • Node.js version: v22.17.1
  • Gitbeaker version: 43.8.0
  • Gitbeaker release (cli, rest, core, requester-utils): core
  • OS & version: N/A

The Agents API uses the wrong HTTP verb when executing the createToken method (get rather than post).

Line in code

Gitlab Agent API documentation

Steps to reproduce

N/A

Expected behaviour

N/A

Actual behaviour

N/A

Possible fixes

Change method called: from RequestHelper.get<ClusterAgentTokenSchema> to RequestHelper.post<ClusterAgentTokenSchema>; the generic type may be different, as this REST action also contains the token itself in the response.

Checklist

  • I have checked that this is not a duplicate issue.
  • I have read the documentation.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugChanges fix a minor bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions