Get Packages by PURL (Org Scoped)

Batch retrieval of package metadata and alerts by PURL strings for a specific organization. Compatible with CycloneDX reports.

Package URLs (PURLs) are an ecosystem agnostic way to identify packages. CycloneDX SBOMs use the purl format to identify components. This endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report.

Note: This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error.

More information on purl and CycloneDX:

This endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate). Actively running analysis will be returned when available on subsequent runs.

Query Parameters

This endpoint supports all query parameters from POST /v0/purl including: alerts, actions, compact, fixable, licenseattrib, licensedetails, purlErrors, cachedResultsOnly, and summary.

Additionally, you may provide a labels query parameter to apply a repository label's security policies. Pass the label slug as the value (e.g., ?labels=production). Only one label is currently supported.

Examples:

Looking up an npm package:

{
  "components": [
    {
      "purl": "pkg:npm/[email protected]"
    }
  ]
}

Looking up a PyPi package:

{
  "components": [
    {
      "purl": "pkg:pypi/[email protected]"
    }
  ]
}

Looking up a Maven package:

{
  "components": [
    {
      "purl": "pkg:maven/log4j/[email protected]"
    }
  ]
}

Batch lookup

{
  "components": [
    {
      "purl": "pkg:npm/[email protected]"
    },
    {
      "purl": "pkg:pypi/[email protected]"
    },
    {
      "purl": "pkg:maven/log4j/[email protected]"
    }
  ]
}

With label and options (query parameters):

POST /v0/orgs/{org_slug}/purl?labels=production&alerts=true&compact=true
{
  "components": [
    {
      "purl": "pkg:npm/[email protected]"
    }
  ]
}

This endpoint consumes 100 units of your quota.

This endpoint requires the following org token scopes:

  • packages:list
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The slug of the organization

Query Params
labels
array of strings

Repository label slugs to apply policies. Only one label is supported currently; the parameter is an array to allow future support for multiple labels.

labels
boolean
Defaults to false

Include alert metadata.

actions
array of strings

Include only alerts with comma separated actions defined by security policy.

actions
boolean
Defaults to false

Compact metadata. When enabled, excludes metadata fields like author, scores, size, dependencies, and manifest files. Always includes: id, type, name, version, release, namespace, subpath, alerts, and alertPriorities.

boolean
Defaults to false

Include only fixable alerts.

boolean
Defaults to false

Include license attribution data, including license text and author information. Maps attribution/license text to a list of data objects to which that attribution info applies.

boolean
Defaults to false

Include detailed license information, including location and match strength, for each license datum.

boolean
Defaults to false

Return errors found with handling PURLs as error objects in the stream.

boolean
Defaults to false

Return only cached results, do not attempt to scan new artifacts or rescan stale results.

boolean
Defaults to false

Include a summary object at the end of the stream with counts of malformed, resolved, and not found PURLs.

integer
1 to 1200

Maximum time in seconds to wait for scan results. PURLs that have not completed processing when the timeout is reached will be returned as errors (when purlErrors is enabled). Omit for no timeout, unless a default timeout is configured for the organization.

Body Params
components
array of objects
required
components*
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/x-ndjson
application/json