GitLab API icon

GitLab API

Gitlab

Actions1062

Projects → getApiV4ProjectsIdForks

AI-generated

Summary

Retrieve a list of forked projects for a specified GitLab project by its ID or URL-encoded path, applying optional filters such as ordering, visibility, and pagination.

Inputs

  • id (required) — The ID or URL-encoded path of the project to list forks from.
  • order_by — Field to order the forked projects by, e.g., created_at, name, or last_activity_at.
  • sort — Sort direction of the results, either ascending (asc) or descending (desc).
  • archived — Filter forks by their archived status.
  • visibility — Filter forks by visibility: private, internal, or public.
  • search — Search term to filter forks matching the criteria.
  • search_namespaces — Include ancestor namespaces in the search criteria.
  • owned — Limit to projects owned by the authenticated user.
  • starred — Limit to starred projects.
  • imported — Limit to projects imported by the authenticated user.
  • membership — Limit to projects where the user is a member.
  • with_issues_enabled — Filter forks with the issues feature enabled.
  • with_merge_requests_enabled — Filter forks with the merge requests feature enabled.
  • with_programming_language — Filter forks by a specific programming language.
  • min_access_level — Minimum access level of the authenticated user to the forked projects.
  • id_after — Limit results to projects with IDs greater than this value.
  • id_before — Limit results to projects with IDs less than this value.
  • last_activity_after — Limit to projects with last activity after this ISO 8601 timestamp.
  • last_activity_before — Limit to projects with last activity before this ISO 8601 timestamp.
  • repository_storage — Filter by repository storage shard (admin only).
  • topic — Filter projects by a comma-separated list of topics.
  • topic_id — Filter projects by assigned topic ID.
  • updated_before — Filter projects updated before the specified ISO 8601 date-time.
  • updated_after — Filter projects updated after the specified ISO 8601 date-time.
  • include_pending_delete — Include projects pending deletion (admin only).
  • wiki_checksum_failed — Filter projects where the wiki checksum has failed.
  • repository_checksum_failed — Filter projects where the repository checksum has failed.
  • include_hidden — Include hidden projects (admin only).
  • marked_for_deletion_on — Filter projects by the date they were marked for deletion (YYYY-MM-DD).
  • page — Page number for paginated results, defaults to 1.
  • per_page — Number of items per page for pagination, defaults to 20.
  • simple — When true, returns only minimal project info (ID, URL, name, path).
  • with_custom_attributes — When true, includes custom attributes in the response.

Output shape

a JSON array of project objects representing the forks of the specified project

Supports pagination with 'page' and 'per_page' parameters. Returned projects can be filtered and sorted using query parameters. Authentication is required unless skipped via 'Skip Authentication'. Errors or empty results depend on the project ID validity and permissions.

Examples

Example 1: List forks of a project with ID '123' ordered by creation date descending

Set 'id' to '123', 'order_by' to 'created_at', 'sort' to 'desc'.

Links

Discussion