GitLab API icon

GitLab API

Gitlab

Actions1062

Project_snippets → getApiV4ProjectsIdSnippetsSnippetId

AI-generated

Summary

Retrieves a specific project snippet by its ID and the project ID or URL-encoded path using a GET request to /api/v4/projects/{id}/snippets/{snippet_id}.

Inputs

  • id (required) — The ID or URL-encoded path of the project
  • snippet_id (required) — The ID of a project snippet
  • skipAuthentication — If true, the request skips authentication; otherwise uses the gitlabApi credential.

Output shape

object

Returns the snippet object as defined by the GitLab API.

Examples

Example 1: Get snippet 123 from project 'my-group/my-project'

Set id to 'my-group%2Fmy-project' (URL‑encoded) and snippet_id to 123

Links

Discussion