@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api GitLab API
@base https://www.gitlab.com/api/v4
@version v4
@auth ApiKey Private-Token in header
@endpoints 73
@hint download_for_search
@toc groups(10), projects(26), admin(16), applications(3), avatar(1), broadcast_messages(5), bulk_imports(6), application(4), metadata(1), version(1)

@group groups
@endpoint GET /groups/{id}/badges/{badge_id}
@required {id: str, badge_id: int(int32)}
@returns(200) {name: str, link_url: str, image_url: str, rendered_link_url: str, rendered_image_url: str, id: str, kind: str}

@endpoint PUT /groups/{id}/badges/{badge_id}
@required {id: str, badge_id: int(int32)}
@optional {link_url: str, image_url: str, name: str}
@returns(200) {name: str, link_url: str, image_url: str, rendered_link_url: str, rendered_image_url: str, id: str, kind: str}

@endpoint DELETE /groups/{id}/badges/{badge_id}
@required {id: str, badge_id: int(int32)}
@returns(204)

@endpoint GET /groups/{id}/badges
@required {id: str}
@optional {page: int(int32)=1, per_page: int(int32)=20, name: str}
@returns(200)

@endpoint POST /groups/{id}/badges
@required {id: str, link_url: str, image_url: str}
@optional {name: str}
@returns(201) {name: str, link_url: str, image_url: str, rendered_link_url: str, rendered_image_url: str, id: str, kind: str}

@endpoint GET /groups/{id}/badges/render
@required {id: str, link_url: str, image_url: str}
@returns(200) {name: str, link_url: str, image_url: str, rendered_link_url: str, rendered_image_url: str}

@endpoint DELETE /groups/{id}/access_requests/{user_id}
@required {id: str, user_id: int(int32)}
@returns(204)

@endpoint PUT /groups/{id}/access_requests/{user_id}/approve
@required {id: str, user_id: int(int32)}
@optional {access_level: int(int32)=30}
@returns(200) {id: int(int32), username: str, name: str, state: str, avatar_url: str, avatar_path: str, custom_attributes: [map], web_url: str, email: str, requested_at: str}

@endpoint GET /groups/{id}/access_requests
@required {id: str}
@optional {page: int(int32)=1, per_page: int(int32)=20}
@returns(200) {id: int(int32), username: str, name: str, state: str, avatar_url: str, avatar_path: str, custom_attributes: [map], web_url: str, email: str, requested_at: str}

@endpoint POST /groups/{id}/access_requests
@required {id: str}
@returns(200) {id: int(int32), username: str, name: str, state: str, avatar_url: str, avatar_path: str, custom_attributes: [map], web_url: str, email: str, requested_at: str}

@endgroup

@group projects
@endpoint DELETE /projects/{id}/repository/merged_branches
@required {id: any}
@returns(202)
@errors {404}

@endpoint GET /projects/{id}/repository/branches/{branch}
@required {id: any, branch: int(int32)}
@returns(200) {name: str, commit: map{id: str, short_id: str, created_at: str(date-time), parent_ids: [str], title: str, message: str, author_name: str, author_email: str, authored_date: str(date-time), committer_name: str, committer_email: str, committed_date: str(date-time), trailers: map, web_url: str}, merged: bool, protected: bool, developers_can_push: bool, developers_can_merge: bool, can_push: bool, default: bool, web_url: str}
@errors {404}

@endpoint DELETE /projects/{id}/repository/branches/{branch}
@required {id: any, branch: str}
@returns(204)
@errors {404}

@endpoint HEAD /projects/{id}/repository/branches/{branch}
@required {id: any, branch: str}
@returns(204)
@errors {404}

@endpoint GET /projects/{id}/repository/branches
@required {id: any}
@optional {page: int(int32)=1, per_page: int(int32)=20, search: str, regex: str, sort: str(name_asc/updated_asc/updated_desc), page_token: str}
@returns(200)
@errors {404}

@endpoint POST /projects/{id}/repository/branches
@required {id: any, branch: str, ref: str}
@returns(201) {name: str, commit: map{id: str, short_id: str, created_at: str(date-time), parent_ids: [str], title: str, message: str, author_name: str, author_email: str, authored_date: str(date-time), committer_name: str, committer_email: str, committed_date: str(date-time), trailers: map, web_url: str}, merged: bool, protected: bool, developers_can_push: bool, developers_can_merge: bool, can_push: bool, default: bool, web_url: str}
@errors {400}

@endpoint PUT /projects/{id}/repository/branches/{branch}/unprotect
@required {id: any, branch: str}
@returns(200) {name: str, commit: map{id: str, short_id: str, created_at: str(date-time), parent_ids: [str], title: str, message: str, author_name: str, author_email: str, authored_date: str(date-time), committer_name: str, committer_email: str, committed_date: str(date-time), trailers: map, web_url: str}, merged: bool, protected: bool, developers_can_push: bool, developers_can_merge: bool, can_push: bool, default: bool, web_url: str}
@errors {404}

@endpoint PUT /projects/{id}/repository/branches/{branch}/protect
@required {id: any, branch: str}
@optional {developers_can_push: bool, developers_can_merge: bool}
@returns(200) {name: str, commit: map{id: str, short_id: str, created_at: str(date-time), parent_ids: [str], title: str, message: str, author_name: str, author_email: str, authored_date: str(date-time), committer_name: str, committer_email: str, committed_date: str(date-time), trailers: map, web_url: str}, merged: bool, protected: bool, developers_can_push: bool, developers_can_merge: bool, can_push: bool, default: bool, web_url: str}
@errors {404}

@endpoint GET /projects/{id}/badges/{badge_id}
@required {id: any, badge_id: int(int32)}
@returns(200) {name: str, link_url: str, image_url: str, rendered_link_url: str, rendered_image_url: str, id: str, kind: str}

@endpoint PUT /projects/{id}/badges/{badge_id}
@required {id: any, badge_id: int(int32)}
@optional {link_url: str, image_url: str, name: str}
@returns(200) {name: str, link_url: str, image_url: str, rendered_link_url: str, rendered_image_url: str, id: str, kind: str}

@endpoint DELETE /projects/{id}/badges/{badge_id}
@required {id: any, badge_id: int(int32)}
@returns(204)

@endpoint GET /projects/{id}/badges
@required {id: any}
@optional {page: int(int32)=1, per_page: int(int32)=20, name: str}
@returns(200)

@endpoint POST /projects/{id}/badges
@required {id: any, link_url: str, image_url: str}
@optional {name: str}
@returns(201) {name: str, link_url: str, image_url: str, rendered_link_url: str, rendered_image_url: str, id: str, kind: str}

@endpoint GET /projects/{id}/badges/render
@required {id: any, link_url: str, image_url: str}
@returns(200) {name: str, link_url: str, image_url: str, rendered_link_url: str, rendered_image_url: str}

@endpoint DELETE /projects/{id}/access_requests/{user_id}
@required {id: any, user_id: int(int32)}
@returns(204)

@endpoint PUT /projects/{id}/access_requests/{user_id}/approve
@required {id: any, user_id: int(int32)}
@optional {access_level: int(int32)=30}
@returns(200) {id: int(int32), username: str, name: str, state: str, avatar_url: str, avatar_path: str, custom_attributes: [map], web_url: str, email: str, requested_at: str}

@endpoint GET /projects/{id}/access_requests
@required {id: any}
@optional {page: int(int32)=1, per_page: int(int32)=20}
@returns(200) {id: int(int32), username: str, name: str, state: str, avatar_url: str, avatar_path: str, custom_attributes: [map], web_url: str, email: str, requested_at: str}

@endpoint POST /projects/{id}/access_requests
@required {id: any}
@returns(200) {id: int(int32), username: str, name: str, state: str, avatar_url: str, avatar_path: str, custom_attributes: [map], web_url: str, email: str, requested_at: str}

@endpoint PUT /projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id}
@required {id: any, alert_iid: int(int32), metric_image_id: int(int32)}
@returns(200) {id: int(int32), created_at: str(date-time), filename: str, file_path: str, url: str, url_text: str}
@errors {403, 422}

@endpoint DELETE /projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id}
@required {id: any, alert_iid: int(int32), metric_image_id: int(int32)}
@returns(204) {id: int(int32), created_at: str(date-time), filename: str, file_path: str, url: str, url_text: str}
@errors {403, 422}

@endpoint GET /projects/{id}/alert_management_alerts/{alert_iid}/metric_images
@required {id: any, alert_iid: int(int32)}
@returns(200)
@errors {404}

@endpoint POST /projects/{id}/alert_management_alerts/{alert_iid}/metric_images
@required {id: any, alert_iid: int(int32)}
@returns(200) {id: int(int32), created_at: str(date-time), filename: str, file_path: str, url: str, url_text: str}
@errors {403}

@endpoint POST /projects/{id}/alert_management_alerts/{alert_iid}/metric_images/authorize
@required {id: any, alert_iid: int(int32)}
@returns(200)
@errors {403}

@endgroup

@group admin
@endpoint GET /admin/batched_background_migrations/{id}
@required {id: int(int32)}
@optional {database: str(main/ci/embedding/geo)=main}
@returns(200) {id: str, job_class_name: str, table_name: str, status: str, progress: num(float), created_at: str(date-time)}
@errors {401, 403, 404}

@endpoint GET /admin/batched_background_migrations
@optional {database: str(main/ci/embedding/geo)=main}
@returns(200)
@errors {401, 403}

@endpoint PUT /admin/batched_background_migrations/{id}/resume
@required {id: int(int32)}
@optional {database: str(main/ci/embedding/geo)=main}
@returns(200) {id: str, job_class_name: str, table_name: str, status: str, progress: num(float), created_at: str(date-time)}
@errors {401, 403, 404, 422}

@endpoint PUT /admin/batched_background_migrations/{id}/pause
@required {id: int(int32)}
@optional {database: str(main/ci/embedding/geo)=main}
@returns(200) {id: str, job_class_name: str, table_name: str, status: str, progress: num(float), created_at: str(date-time)}
@errors {401, 403, 404, 422}

@endpoint GET /admin/ci/variables/{key}
@required {key: str}
@returns(200) {variable_type: str, key: str, value: str, protected: bool, masked: bool, raw: bool, environment_scope: str}
@errors {404}

@endpoint PUT /admin/ci/variables/{key}
@required {key: str}
@optional {value: str, protected: bool, masked: bool, raw: bool, variable_type: str(env_var/file)}
@returns(200) {variable_type: str, key: str, value: str, protected: bool, masked: bool, raw: bool, environment_scope: str}
@errors {404}

@endpoint DELETE /admin/ci/variables/{key}
@required {key: str}
@returns(204) {variable_type: str, key: str, value: str, protected: bool, masked: bool, raw: bool, environment_scope: str}
@errors {404}

@endpoint GET /admin/ci/variables
@optional {page: int(int32)=1, per_page: int(int32)=20}
@returns(200) {variable_type: str, key: str, value: str, protected: bool, masked: bool, raw: bool, environment_scope: str}

@endpoint POST /admin/ci/variables
@required {key: str, value: str}
@optional {protected: bool, masked: bool, raw: bool, variable_type: str(env_var/file)}
@returns(201) {variable_type: str, key: str, value: str, protected: bool, masked: bool, raw: bool, environment_scope: str}
@errors {400}

@endpoint GET /admin/databases/{database_name}/dictionary/tables/{table_name}
@required {database_name: str(main/ci), table_name: str}
@returns(200) {table_name: str, feature_categories: [str]}
@errors {401, 403, 404}

@endpoint GET /admin/clusters/{cluster_id}
@required {cluster_id: int(int32)}
@returns(200) {id: str, name: str, created_at: str, domain: str, enabled: str, managed: str, provider_type: str, platform_type: str, environment_scope: str, cluster_type: str, namespace_per_environment: str, user: map{id: int(int32), username: str, name: str, state: str, avatar_url: str, avatar_path: str, custom_attributes: [map], web_url: str, email: str}, platform_kubernetes: map{api_url: str, namespace: str, authorization_type: str, ca_cert: str}, provider_gcp: map{cluster_id: str, status_name: str, gcp_project_id: str, zone: str, machine_type: str, num_nodes: str, endpoint: str}, management_project: map{id: int(int32), description: str, name: str, name_with_namespace: str, path: str, path_with_namespace: str, created_at: str(date-time)}}
@errors {403, 404}

@endpoint PUT /admin/clusters/{cluster_id}
@required {cluster_id: int(int32)}
@optional {name: str, enabled: bool, environment_scope: str, namespace_per_environment: bool=true, domain: str, management_project_id: int(int32), managed: bool, platform_kubernetes_attributes[api_url]: str, platform_kubernetes_attributes[token]: str, platform_kubernetes_attributes[ca_cert]: str, platform_kubernetes_attributes[namespace]: str}
@returns(200) {id: str, name: str, created_at: str, domain: str, enabled: str, managed: str, provider_type: str, platform_type: str, environment_scope: str, cluster_type: str, namespace_per_environment: str, user: map{id: int(int32), username: str, name: str, state: str, avatar_url: str, avatar_path: str, custom_attributes: [map], web_url: str, email: str}, platform_kubernetes: map{api_url: str, namespace: str, authorization_type: str, ca_cert: str}, provider_gcp: map{cluster_id: str, status_name: str, gcp_project_id: str, zone: str, machine_type: str, num_nodes: str, endpoint: str}, management_project: map{id: int(int32), description: str, name: str, name_with_namespace: str, path: str, path_with_namespace: str, created_at: str(date-time)}}
@errors {400, 403, 404}

@endpoint DELETE /admin/clusters/{cluster_id}
@required {cluster_id: int(int32)}
@returns(204) {id: str, name: str, created_at: str, domain: str, enabled: str, managed: str, provider_type: str, platform_type: str, environment_scope: str, cluster_type: str, namespace_per_environment: str, user: map{id: int(int32), username: str, name: str, state: str, avatar_url: str, avatar_path: str, custom_attributes: [map], web_url: str, email: str}, platform_kubernetes: map{api_url: str, namespace: str, authorization_type: str, ca_cert: str}, provider_gcp: map{cluster_id: str, status_name: str, gcp_project_id: str, zone: str, machine_type: str, num_nodes: str, endpoint: str}, management_project: map{id: int(int32), description: str, name: str, name_with_namespace: str, path: str, path_with_namespace: str, created_at: str(date-time)}}
@errors {403, 404}

@endpoint POST /admin/clusters/add
@required {name: str, platform_kubernetes_attributes[api_url]: str, platform_kubernetes_attributes[token]: str}
@optional {enabled: bool=true, environment_scope: str=*, namespace_per_environment: bool=true, domain: str, management_project_id: int(int32), managed: bool=true, platform_kubernetes_attributes[ca_cert]: str, platform_kubernetes_attributes[namespace]: str, platform_kubernetes_attributes[authorization_type]: str(unknown_authorization/rbac/abac)=rbac}
@returns(201) {id: str, name: str, created_at: str, domain: str, enabled: str, managed: str, provider_type: str, platform_type: str, environment_scope: str, cluster_type: str, namespace_per_environment: str, user: map{id: int(int32), username: str, name: str, state: str, avatar_url: str, avatar_path: str, custom_attributes: [map], web_url: str, email: str}, platform_kubernetes: map{api_url: str, namespace: str, authorization_type: str, ca_cert: str}, provider_gcp: map{cluster_id: str, status_name: str, gcp_project_id: str, zone: str, machine_type: str, num_nodes: str, endpoint: str}, management_project: map{id: int(int32), description: str, name: str, name_with_namespace: str, path: str, path_with_namespace: str, created_at: str(date-time)}}
@errors {400, 403, 404}

@endpoint GET /admin/clusters
@returns(200)
@errors {403}

@endpoint POST /admin/migrations/{timestamp}/mark
@required {timestamp: int(int32)}
@optional {database: str(main/ci/embedding/geo)=main}
@returns(201)
@errors {401, 403, 404, 422}

@endgroup

@group applications
@endpoint DELETE /applications/{id}
@required {id: int(int32)}
@returns(204)

@endpoint GET /applications
@returns(200)

@endpoint POST /applications
@required {name: str, redirect_uri: str, scopes: str}
@optional {confidential: bool=true}
@returns(200) {id: str, application_id: str, application_name: str, callback_url: str, confidential: bool, secret: str}

@endgroup

@group avatar
@endpoint GET /avatar
@required {email: str}
@optional {size: int(int32)}
@returns(200) {avatar_url: str}

@endgroup

@group broadcast_messages
@endpoint GET /broadcast_messages/{id}
@required {id: int(int32)}
@returns(200) {id: str, message: str, starts_at: str, ends_at: str, color: str, font: str, target_access_levels: str, target_path: str, broadcast_type: str, dismissable: str, active: str}

@endpoint PUT /broadcast_messages/{id}
@required {id: int(int32)}
@optional {message: str, starts_at: str(date-time), ends_at: str(date-time), color: str, font: str, target_access_levels: [int(int32)], target_path: str, broadcast_type: str(banner/notification), dismissable: bool}
@returns(200) {id: str, message: str, starts_at: str, ends_at: str, color: str, font: str, target_access_levels: str, target_path: str, broadcast_type: str, dismissable: str, active: str}

@endpoint DELETE /broadcast_messages/{id}
@required {id: int(int32)}
@returns(200) {id: str, message: str, starts_at: str, ends_at: str, color: str, font: str, target_access_levels: str, target_path: str, broadcast_type: str, dismissable: str, active: str}

@endpoint GET /broadcast_messages
@optional {page: int(int32)=1, per_page: int(int32)=20}
@returns(200) {id: str, message: str, starts_at: str, ends_at: str, color: str, font: str, target_access_levels: str, target_path: str, broadcast_type: str, dismissable: str, active: str}

@endpoint POST /broadcast_messages
@required {message: str}
@optional {starts_at: str(date-time), ends_at: str(date-time), color: str, font: str, target_access_levels: [int(int32)], target_path: str, broadcast_type: str(banner/notification), dismissable: bool}
@returns(201) {id: str, message: str, starts_at: str, ends_at: str, color: str, font: str, target_access_levels: str, target_path: str, broadcast_type: str, dismissable: str, active: str}

@endgroup

@group bulk_imports
@endpoint GET /bulk_imports/{import_id}/entities/{entity_id}
@required {import_id: int(int32), entity_id: int(int32)}
@returns(200) {id: int(int32), bulk_import_id: int(int32), status: str, entity_type: str, source_full_path: str, destination_full_path: str, destination_name: str, destination_slug: str, destination_namespace: str, parent_id: int(int32), namespace_id: int(int32), project_id: int(int32), created_at: str(date-time), updated_at: str(date-time), failures: [map], migrate_projects: bool}
@errors {401, 404, 503}

@endpoint GET /bulk_imports/{import_id}/entities
@required {import_id: int(int32)}
@optional {status: str(created/started/finished/timeout/failed), page: int(int32)=1, per_page: int(int32)=20}
@returns(200)
@errors {401, 404, 503}

@endpoint GET /bulk_imports/{import_id}
@required {import_id: int(int32)}
@returns(200) {id: int(int32), status: str, source_type: str, created_at: str(date-time), updated_at: str(date-time)}
@errors {401, 404, 503}

@endpoint GET /bulk_imports/entities
@optional {page: int(int32)=1, per_page: int(int32)=20, sort: str(asc/desc)=desc, status: str(created/started/finished/timeout/failed)}
@returns(200)
@errors {401, 404, 503}

@endpoint GET /bulk_imports
@optional {page: int(int32)=1, per_page: int(int32)=20, sort: str(asc/desc)=desc, status: str(created/started/finished/timeout/failed)}
@returns(200)
@errors {401, 404, 503}

@endpoint POST /bulk_imports
@returns(200) {id: int(int32), status: str, source_type: str, created_at: str(date-time), updated_at: str(date-time)}
@errors {400, 401, 404, 422, 503}

@endgroup

@group application
@endpoint GET /application/appearance
@returns(200) {title: str, description: str, pwa_name: str, pwa_short_name: str, pwa_description: str, logo: str, pwa_icon: str, header_logo: str, favicon: str, new_project_guidelines: str, profile_image_guidelines: str, header_message: str, footer_message: str, message_background_color: str, message_font_color: str, email_header_and_footer_enabled: str}

@endpoint PUT /application/appearance
@returns(200) {title: str, description: str, pwa_name: str, pwa_short_name: str, pwa_description: str, logo: str, pwa_icon: str, header_logo: str, favicon: str, new_project_guidelines: str, profile_image_guidelines: str, header_message: str, footer_message: str, message_background_color: str, message_font_color: str, email_header_and_footer_enabled: str}

@endpoint GET /application/plan_limits
@optional {plan_name: str(default/free/bronze/silver/premium/gold/ultimate/ultimate_trial/premium_trial/opensource)=default}
@returns(200) {ci_pipeline_size: int(int32), ci_active_jobs: int(int32), ci_project_subscriptions: int(int32), ci_pipeline_schedules: int(int32), ci_needs_size_limit: int(int32), ci_registered_group_runners: int(int32), ci_registered_project_runners: int(int32), conan_max_file_size: int(int32), enforcement_limit: int(int32), generic_packages_max_file_size: int(int32), helm_max_file_size: int(int32), limits_history: map, maven_max_file_size: int(int32), notification_limit: int(int32), npm_max_file_size: int(int32), nuget_max_file_size: int(int32), pipeline_hierarchy_size: int(int32), pypi_max_file_size: int(int32), terraform_module_max_file_size: int(int32), storage_size_limit: int(int32)}
@errors {401, 403}

@endpoint PUT /application/plan_limits
@required {plan_name: str(default/free/bronze/silver/premium/gold/ultimate/ultimate_trial/premium_trial/opensource)}
@optional {ci_pipeline_size: int(int32), ci_active_jobs: int(int32), ci_project_subscriptions: int(int32), ci_pipeline_schedules: int(int32), ci_needs_size_limit: int(int32), ci_registered_group_runners: int(int32), ci_registered_project_runners: int(int32), conan_max_file_size: int(int32), enforcement_limit: int(int32), generic_packages_max_file_size: int(int32), helm_max_file_size: int(int32), maven_max_file_size: int(int32), notification_limit: int(int32), npm_max_file_size: int(int32), nuget_max_file_size: int(int32), pypi_max_file_size: int(int32), terraform_module_max_file_size: int(int32), storage_size_limit: int(int32), pipeline_hierarchy_size: int(int32)}
@returns(200) {ci_pipeline_size: int(int32), ci_active_jobs: int(int32), ci_project_subscriptions: int(int32), ci_pipeline_schedules: int(int32), ci_needs_size_limit: int(int32), ci_registered_group_runners: int(int32), ci_registered_project_runners: int(int32), conan_max_file_size: int(int32), enforcement_limit: int(int32), generic_packages_max_file_size: int(int32), helm_max_file_size: int(int32), limits_history: map, maven_max_file_size: int(int32), notification_limit: int(int32), npm_max_file_size: int(int32), nuget_max_file_size: int(int32), pipeline_hierarchy_size: int(int32), pypi_max_file_size: int(int32), terraform_module_max_file_size: int(int32), storage_size_limit: int(int32)}
@errors {400, 401, 403}

@endgroup

@group metadata
@endpoint GET /metadata
@returns(200) {version: str, revision: str, kas: map{enabled: bool, externalUrl: str, version: str}, enterprise: bool}
@errors {401}

@endgroup

@group version
@endpoint GET /version
@returns(200) {version: str, revision: str, kas: map{enabled: bool, externalUrl: str, version: str}, enterprise: bool}
@errors {401}

@endgroup

@group projects
@endpoint GET /projects/{id}/jobs
@required {id: any}
@optional {scope: [str]}
@returns(200)

@endpoint GET /projects/{id}/jobs/{job_id}
@required {id: any, job_id: int}
@returns(200) {id: int, name: str, status: str, stage: str, created_at: str(date-time), started_at: str(date-time), finished_at: str(date-time), commit: map{id: str, short_id: str, created_at: str(date-time), parent_ids: [str], title: str, message: str, author_name: str, author_email: str, authored_date: str(date-time), committer_name: str, committer_email: str, committed_date: str(date-time), trailers: map, web_url: str}, archived: bool, allow_failure: bool, erased_at: str(date-time), duration: int, queued_duration: num, ref: str, artifacts: [any], tag: bool, web_url: str, project: map{ci_job_token_scope_enabled: bool}, user: map{id: int(int32), username: str, name: str, state: str, avatar_url: str, avatar_path: str, custom_attributes: [map], web_url: str, email: str}}

@endpoint POST /projects/{id}/jobs/{job_id}/play
@required {id: any, job_id: int}
@optional {job_variables_attributes: [str]}
@returns(200)

@endgroup

@end
