API resources

原文:https://docs.gitlab.com/ee/api/api_resources.html

API resources

可在以下上下文中对GitLab API 的可用资源进行分组:

也可以看看:

Project resources

在项目上下文中可以使用以下 API 资源:

Resource 可用端点
Access requests /projects/:id/access_requests (也可用于组)
Award emoji /projects/:id/issues/.../award_emoji, /projects/:id/merge_requests/.../award_emoji, /projects/:id/snippets/.../award_emoji
Branches /projects/:id/repository/branches/, /projects/:id/repository/merged_branches
Commits /projects/:id/repository/commits, /projects/:id/statuses
Container Registry /projects/:id/registry/repositories
Custom attributes /projects/:id/custom_attributes (也适用于组和用户)
Dependencies /projects/:id/dependencies
Deploy keys /projects/:id/deploy_keys (也可以独立使用)
Freeze Periods /projects/:id/freeze_periods
Deployments /projects/:id/deployments
讨论 (主题注释) /projects/:id/issues/.../discussions/projects/:id/snippets/.../discussions/projects/:id/merge_requests/.../discussions/projects/:id/commits/.../discussions (也适用于团体)
Environments /projects/:id/environments
Error Tracking /projects/:id/error_tracking/settings
Events /projects/:id/events (也可用于用户和独立用户)
Feature Flags /projects/:id/feature_flags
Feature Flag User Lists /projects/:id/feature_flags_user_lists
Issues /projects/:id/issues (也可用于团体和独立团体)
Issues Statistics /projects/:id/issues_statistics (也适用于组和独立用户)
Issue boards /projects/:id/boards
Issue links /projects/:id/issues/.../links
Jobs /projects/:id/jobs, /projects/:id/pipelines/.../jobs
Labels /projects/:id/labels
Managed licenses /projects/:id/managed_licenses
Members /projects/:id/members (也可用于组)
Merge request approvals /projects/:id/approvals, /projects/:id/merge_requests/.../approvals
Merge requests /projects/:id/merge_requests (也可用于组和独立)
Notes (comments) /projects/:id/issues/.../notes : /projects/:id/snippets/.../notes / /projects/:id/merge_requests/.../notes /projects/:id/issues/.../notes ,/ /projects/:id/snippets/.../notes : /projects/:id/merge_requests/.../notes /projects/:id/issues/.../notes ,/ /projects/:id/snippets/.../notes : /projects/:id/merge_requests/.../notes (也可用于团体)
Notification settings /projects/:id/notification_settings (也可用于组和独立)
Packages /projects/:id/packages
Pages domains /projects/:id/pages (也可以独立使用)
Pipelines /projects/:id/pipelines
Pipeline schedules /projects/:id/pipeline_schedules
Pipeline triggers /projects/:id/triggers
项目包括设置 Webhooks /projects/projects/:id/hooks (也可供用户使用)
Project badges /projects/:id/badges
Project clusters /projects/:id/clusters
Project-level variables /projects/:id/variables
Project import/export /projects/:id/export, /projects/import, /projects/:id/import
Project milestones /projects/:id/milestones
Project snippets /projects/:id/snippets
Project templates /projects/:id/templates
Protected environments /projects/:id/protected_environments
Protected branches /projects/:id/protected_branches
Protected tags /projects/:id/protected_tags
Releases /projects/:id/releases
Release links /projects/:id/releases/.../assets/links
Remote mirrors /projects/:id/remote_mirrors
Repositories /projects/:id/repository
Repository files /projects/:id/repository/files
Repository submodules /projects/:id/repository/submodules
Resource label events /projects/:id/issues/.../resource_label_events : /projects/:id/merge_requests/.../resource_label_events /projects/:id/issues/.../resource_label_events ,/ /projects/:id/merge_requests/.../resource_label_events : /projects/:id/issues/.../resource_label_events / /projects/:id/merge_requests/.../resource_label_events (也可用于团体)
Runners /projects/:id/runners (也可以独立使用)
Search /projects/:id/search (also available for groups and standalone)
Services /projects/:id/services
Tags /projects/:id/repository/tags
User-starred metrics dashboards /projects/:id/metrics/user_starred_dashboards
Visual Review discussions /projects/:id/merge_requests/:merge_request_id/visual_review_discussions
Vulnerabilities /vulnerabilities/:id
Vulnerability exports /projects/:id/vulnerability_exports
Project vulnerabilities /projects/:id/vulnerabilities
Vulnerability findings /projects/:id/vulnerability_findings
Wikis /projects/:id/wikis

Group resources

组上下文中提供了以下 API 资源:

Resource 可用端点
Access requests /groups/:id/access_requests/ (也可用于项目)
Custom attributes /groups/:id/custom_attributes (也适用于项目和用户)
讨论 (主题注释) /groups/:id/epics/.../discussions (也可用于项目)
Epic issues /groups/:id/epics/.../issues
Epic links /groups/:id/epics/.../epics
Epics /groups/:id/epics
Groups /groups, /groups/.../subgroups
Group badges /groups/:id/badges
Group issue boards /groups/:id/boards
Group labels /groups/:id/labels
Group-level variables /groups/:id/variables
Group milestones /groups/:id/milestones
Issues /groups/:id/issues (也可用于项目和独立版本)
Issues Statistics /groups/:id/issues_statistics (也可用于项目和独立版本)
Members /groups/:id/members (也可用于项目)
Merge requests /groups/:id/merge_requests (也可用于项目和独立版本)
Notes (comments) /groups/:id/epics/.../notes (也适用于项目)
Notification settings /groups/:id/notification_settings (也可用于项目和独立版本)
Resource label events /groups/:id/epics/.../resource_label_events (也可用于项目)
Search /groups/:id/search (也可用于项目和独立版本)

Standalone resources

在项目和组上下文(包括/users )之外可以使用以下 API 资源:

Resource 可用端点
Instance-level CI/CD variables /admin/ci/variables
Admin Sidekiq queues /admin/sidekiq/queues/:queue_name
Appearance /application/appearance
Applications /applications
Audit Events /audit_events
Avatar /avatar
Broadcast messages /broadcast_messages
Code snippets /snippets
Custom attributes /users/:id/custom_attributes (也可用于组和项目)
Deploy keys /deploy_keys (也可用于项目)
Events /events/users/:id/events (也可用于项目)
Feature flags /features
Geo Nodes /geo_nodes
Group Activity Analytics /analytics/group_activity/{issues_count | merge_requests_count | new_members_count }
Import repository from GitHub /import/github
Instance clusters /admin/clusters
Issues /issues (也可用于小组和项目)
Issues Statistics /issues_statistics (也适用于小组和项目)
Keys /keys
License /license
Markdown /markdown
Merge requests /merge_requests (也适用于小组和项目)
Metrics dashboard annotations /environments/:id/metrics_dashboard/annotations, /clusters/:id/metrics_dashboard/annotations
Namespaces /namespaces
Notification settings /notification_settings (也适用于小组和项目)
Pages domains /pages/domains (也可用于项目)
Projects /users/:id/projects (也可用于项目)
Project repository storage moves /project_repository_storage_moves
Runners /runners (也可用于项目)
Search /search (也可用于小组和项目)
Settings /application/settings
Statistics /application/statistics
Sidekiq metrics /sidekiq
Suggestions /suggestions
System hooks /hooks
Todos /todos
Users /users
Validate .gitlab-ci.yml file /lint
Version /version

Templates API resources

端点可用于: