GitLab API

GitlabTool

Actions1000

Overview

This node operation updates the state of a specific user within a GitLab group by making a PUT request to the GitLab API endpoint `/api/v4/groups/{id}/members/{user_id}/state`. It is useful for managing group membership states, such as activating or deactivating a user's membership in a group. Practical examples include enabling or disabling a user's access to a group programmatically within an automation workflow.

Use Case Examples

  1. Updating a user's membership state to 'active' or 'blocked' in a GitLab group.
  2. Automating group membership management based on external triggers or conditions.

Properties

Name Meaning
Skip Authentication Option to skip API authentication for the request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but for this operation it is PUT.
Path Parameters Parameters to specify the group ID and user ID for the membership state update.

Output

JSON

  • id - The ID of the group.
  • user_id - The user ID of the user whose membership state was updated.
  • state - The updated state of the user's membership in the group.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the group ID and user ID path parameters are correctly set and valid to avoid 404 Not Found errors.
  • Verify that the API key credential has sufficient permissions to update group membership states to prevent authorization errors.
  • Check the base URL if using a self-hosted GitLab instance to ensure the request is sent to the correct server.

Links

Discussion