---
title: "List SCA licenses"
method: POST
path: "/api/v1/sca/licenses/search"
tags: ["SCA"]
---

# List SCA licenses

`POST /api/v1/sca/licenses/search`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v1/sca/licenses/search`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

List licenses grouped with their packages for the user's repositories.

## Request body

- ListScaLicensesInput
  - `organizationId` string
  - `repositoryIds` string[]
  - `branch` string: Read each repository as of its newest finished scan on this branch. Omit for the newest scan on any branch.

## Response `200`

Successful response

- ScaLicenseListResponse
  - `licenses` ScaLicense[]
    - `id` string, required
    - `name` string, required
    - `category` 'permissive' | 'weak-copyleft' | 'strong-copyleft' | 'network-copyleft' | 'unknown', required
    - `tier` 'high' | 'medium' | 'low' | 'unknown', required
    - `totalReposCount` integer, required: Distinct repositories using this license
    - `packages` ScaPackage[], required
      - `id` string, required
      - `name` string, required
      - `version` string, nullable
      - `ecosystem` string, required
      - `manifestPath` string, nullable
      - `manifestStartLine` integer, nullable
      - `manifestEndLine` integer, nullable
      - `manifestStartColumn` integer, nullable
      - `manifestEndColumn` integer, nullable
      - `repositoryId` string, nullable
      - `repositoryName` string, nullable
      - `branch` string, nullable
      - `commitSha` string, nullable
      - `count` integer: Number of packages in this group
      - `items` ScaPackage[]
  - `totalCount` integer: Total licenses matching the query
  - `nextCursor` string, nullable: Cursor for the next page, if any

## Other responses

- `400`: Bad Request
- `401`: Unauthorized

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api-2.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api-2/revisions/ea6ae4b68cd3?raw)
