GitLab API icon

GitLab API

Gitlab

Actions1062

Project_snippets → postApiV4ProjectsIdSnippets

AI-generated

Summary

Creates a new snippet in a GitLab project via the POST /api/v4/projects/{id}/snippets endpoint.

Inputs

  • id (required) — The ID or URL-encoded path of the project (path parameter).
  • skipAuthentication — If true, the node will not use credentials; otherwise the gitlabApi credential is required.
  • authentication — Credentials to use for authentication (hidden, default gitlabApi).
  • baseUrl — Base URL of the GitLab instance (default https://gitlab.com).
  • method — HTTP method selector (UI default GET); for this operation the node forces POST.
  • body (required) — Payload for snippet creation conforming to the GitLab API definition referenced as #/definitions/postApiV4ProjectsIdSnippets (typically includes title, file_name, code, visibility, etc.).

Output shape

object

Returns the snippet object as returned by GitLab API (contains id, title, file_name, web_url, etc.).

Links

Discussion