GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation allows adding an email address to a specific user in GitLab by making a POST request to the GitLab API endpoint `/api/v4/users/{id}/emails`. It is useful for managing user email addresses programmatically, such as adding secondary emails to user accounts in GitLab.

Use Case Examples

  1. Adding a new email address to a GitLab user by specifying the user ID and the email details in the request body.
  2. Automating user email management in GitLab for administrative purposes.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Default is false.
Authentication The authentication method used for the request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to POST for this operation.
Path Parameters The path parameter 'id' representing the ID of the user to whom the email will be added.

Output

JSON

  • id - The ID of the added email address.
  • email - The email address added to the user.
  • confirmed_at - Timestamp when the email was confirmed.
  • created_at - Timestamp when the email was created.
  • is_primary - Boolean indicating if the email is the primary email for the user.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists in GitLab.
  • Verify that the request body contains the required email information as per GitLab API specifications.
  • Check that the GitLab API key credential is correctly configured and has sufficient permissions to add emails to users.
  • Common error messages may include authentication failures, invalid user ID, or malformed request body. Resolving these involves verifying credentials, user existence, and request format.

Links

Discussion