GitLab Software composition analysis API

Use this API to upload the SBOM produced by a CI/CD job, download the resulting scan, and reuse a scan that already exists for the same SBOM.

Operations 4

POST /api/v4/jobs/{id}/sbom_scans/authorize Authorize SBOM file upload #
POST /api/v4/jobs/{id}/sbom_scans Upload an SBOM file #
POST /api/v4/jobs/{id}/sbom_scans/{sbom_digest} Reuse SBOM scan results #
GET /api/v4/jobs/{id}/sbom_scans/{sbom_digest} Download an SBOM scan result #

Documentation

📖
Documentation
https://docs.gitlab.com/api/openapi/
📖
Documentation
https://docs.gitlab.com/api/issues/
📖
Authentication
https://docs.gitlab.com/api/rest/authentication/
📖
Documentation
https://docs.gitlab.com/api/merge_requests/
📖
Documentation
https://docs.gitlab.com/api/pipelines/
📖
Documentation
https://docs.gitlab.com/api/jobs/
📖
Documentation
https://docs.gitlab.com/api/runners/
📖
Documentation
https://docs.gitlab.com/api/users/
📖
Documentation
https://docs.gitlab.com/api/repositories/
📖
Documentation
https://docs.gitlab.com/api/commits/
📖
Documentation
https://docs.gitlab.com/api/branches/
📖
Documentation
https://docs.gitlab.com/api/tags/
📖
Documentation
https://docs.gitlab.com/api/releases/
📖
Documentation
https://docs.gitlab.com/api/environments/
📖
Documentation
https://docs.gitlab.com/api/deployments/
📖
Documentation
https://docs.gitlab.com/api/pipeline_schedules/
📖
Documentation
https://docs.gitlab.com/api/labels/
📖
Documentation
https://docs.gitlab.com/api/milestones/
📖
Documentation
https://docs.gitlab.com/api/notes/
📖
Documentation
https://docs.gitlab.com/api/snippets/
📖
Documentation
https://docs.gitlab.com/api/packages/
📖
Documentation
https://docs.gitlab.com/api/container_registry/
📖
Documentation
https://docs.gitlab.com/api/vulnerabilities/
📖
Documentation
https://docs.gitlab.com/api/deploy_keys/
📖
Documentation
https://docs.gitlab.com/api/protected_branches/
📖
Documentation
https://docs.gitlab.com/api/wikis/
📖
Documentation
https://docs.gitlab.com/api/events/
📖
Documentation
https://docs.gitlab.com/api/search/
📖
Documentation
https://docs.gitlab.com/api/namespaces/
📖
Documentation
https://docs.gitlab.com/api/groups/
📖
Documentation
https://docs.gitlab.com/api/projects/
📖
Documentation
https://docs.gitlab.com/api/applications/
📖
Documentation
https://docs.gitlab.com/api/avatar/
📖
Documentation
https://docs.gitlab.com/api/broadcast_messages/
📖
Documentation
https://docs.gitlab.com/api/bulk_imports/
📖
Documentation
https://docs.gitlab.com/api/settings/
📖
Documentation
https://docs.gitlab.com/api/metadata/
📖
Documentation
https://docs.gitlab.com/api/version/
📖
Documentation
https://docs.gitlab.com/api/rest/
📖
APIReference
https://docs.gitlab.com/api/api_resources/
📖
RateLimits
https://docs.gitlab.com/security/rate_limits/
📖
Documentation
https://docs.gitlab.com/api/oauth2/
📖
Authentication
https://docs.gitlab.com/integration/oauth_provider/
📖
Documentation
https://docs.gitlab.com/user/project/integrations/webhooks.html
📖
APIReference
https://docs.gitlab.com/api/project_webhooks/

Specifications

Schemas & Data

📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-put-api-v4-application-settings-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-apientities-geo-node-status-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-apientities-geo-site-status-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-apientities-application-setting-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-post-api-v4-geo-status-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-put-api-v4-projects-id-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-cluster-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-batched-background-migration-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-ci-variable-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-dictionary-table-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-plan-limit-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-appearance-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-avatar-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-bulk-imports-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-bulk-import-schema.json
📊
JSONSchema
https://artifacts.apis.io/gitlab/json-schema/gitlab-api-entities-metadata-schema.json

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gitlab:gitlab-software-composition-analysis-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gitlab-software-composition-analysis-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab REST Software composition analysis API
  description: GitLab REST API used to interact with a GitLab installation.
  termsOfService: https://handbook.gitlab.com/handbook/legal/api-terms/
  version: '19.6'
  license:
    name: CC BY-SA 4.0
    url: https://gitlab.com/gitlab-org/gitlab/-/blob/master/LICENSE
    x-gitlab-description: The license applies to the OpenAPI specification document itself. For terms governing use of the GitLab API, see the termsOfService field.
servers:
- url: https://{hostname}
  description: GitLab REST API
  variables:
    hostname:
      default: gitlab.com
      description: Your GitLab instance hostname
security:
- http: []
- oauth2: []
- apiKey: []
tags:
- name: Software composition analysis
  description: 'Use this API to upload the SBOM produced by a CI/CD job, download the resulting scan, and reuse a

    scan that already exists for the same SBOM.'
  x-displayName: Software composition analysis
paths:
  /api/v4/jobs/{id}/sbom_scans/authorize:
    post:
      operationId: postApiV4JobsIdSbomScansAuthorize
      summary: Authorize SBOM file upload
      description: Authorizes uploading an SBOM file to be scanned for a specified job.
      tags:
      - Software composition analysis
      responses:
        '200':
          description: SBOM Upload allowed
        '403':
          description: Forbidden
        '413':
          description: File too large
        '404':
          description: Not Found
        '400':
          description: Bad Request
      parameters:
      - name: id
        required: true
        description: ID of the job.
        schema:
          type: integer
        in: path
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiV4JobsIdSbomScansAuthorizeRequest'
      x-gitlab-tier: ultimate
  /api/v4/jobs/{id}/sbom_scans:
    post:
      operationId: postApiV4JobsIdSbomScans
      summary: Upload an SBOM file
      description: Uploads an SBOM file to be scanned for a specified job.
      tags:
      - Software composition analysis
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesSecurityVulnerabilityScanningSbomScan'
        '400':
          description: Bad request
        '403':
          description: Forbidden
        '413':
          description: File too large
        '404':
          description: Not Found
      parameters:
      - name: id
        required: true
        description: ID of the job.
        schema:
          type: integer
        in: path
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/postApiV4JobsIdSbomScansRequest'
      x-gitlab-tier: ultimate
  /api/v4/jobs/{id}/sbom_scans/{sbom_digest}:
    post:
      operationId: postApiV4JobsIdSbomScansSbomDigest
      summary: Reuse SBOM scan results
      description: Reuses existing SBOM scan results if scans for the specified digest already exist.
      tags:
      - Software composition analysis
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIEntitiesSecurityVulnerabilityScanningSbomScan'
        '400':
          description: Bad request
        '403':
          description: Forbidden
        '404':
          description: Not found
        '410':
          description: Result no longer available
      parameters:
      - name: id
        required: true
        description: ID of the job.
        schema:
          type: integer
        in: path
      - name: sbom_digest
        required: true
        description: SBOM digest that identifies an SBOM scan uniquely.
        schema:
          type: string
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiV4JobsIdSbomScansSbomDigestRequest'
      x-gitlab-tier: ultimate
    get:
      operationId: getApiV4JobsIdSbomScansSbomScanId
      summary: Download an SBOM scan result
      description: Downloads an SBOM scan result file for a specified job.
      tags:
      - Software composition analysis
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/APIEntitiesSecurityVulnerabilityScanningSbomScan'
        '202':
          description: Sbom Scan in progress
        '400':
          description: Bad request
        '403':
          description: Forbidden
        '410':
          description: Sbom Scan failed
        '404':
          description: Not Found
      parameters:
      - name: id
        required: true
        description: ID of the job.
        schema:
          type: integer
        in: path
      - name: sbom_scan_id
        required: true
        description: ID of the SBOM scan.
        schema:
          type: integer
        in: path
      x-gitlab-tier: ultimate
components:
  schemas:
    postApiV4JobsIdSbomScansRequest:
      type: object
      properties:
        file:
          type:
          - string
          - 'null'
          format: binary
          description: The sbom file to upload
        sbom_digest:
          type:
          - string
          - 'null'
          description: Digest corresponding to uploaded SBOM
      required:
      - file
    APIEntitiesSecurityVulnerabilityScanningSbomScan:
      type: object
      properties:
        id:
          type: integer
          format: int64
        download_url:
          type: string
        throttled:
          type: boolean
        project_throttling_resets_in:
          type: integer
        advisory_db_state:
          type: string
    postApiV4JobsIdSbomScansAuthorizeRequest:
      type: object
      properties:
        filesize:
          type:
          - integer
          - 'null'
          description: Size of the artifact file.
    postApiV4JobsIdSbomScansSbomDigestRequest:
      type: object
      properties:
        purl_types:
          type:
          - array
          - 'null'
          description: List of package URL (purl) types valid for the given SBOM digest.
      required:
      - purl_types
  securitySchemes:
    http:
      type: http
      scheme: bearer
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://gitlab.com/oauth/authorize
          tokenUrl: https://gitlab.com/oauth/token
          refreshUrl: https://gitlab.com/oauth/token
          scopes:
            api: Grants complete read/write access to the API, including all groups and projects, the container registry, the dependency proxy, and the package registry.
            read_api: Grants read access to the API, including all groups and projects, the container registry, and the package registry.
            read_user: Grants read-only access to your profile through the /user API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under /users.
            create_runner: Grants create access to the runners.
            manage_runner: Grants access to manage the runners.
            k8s_proxy: Grants permission to perform Kubernetes API calls using the agent for Kubernetes.
            self_rotate: Grants permission for token to rotate itself.
            mcp: Grants read-write access to remote Model Context Protocol (MCP) server for tools execution.
            mcp_orbit: Grants access to the Orbit Knowledge Graph MCP server for graph queries and schema retrieval.
    apiKey:
      type: apiKey
      name: PRIVATE-TOKEN
      in: header