CorfedoCorfedoDocs
ReferenceAPI referenceDependencies

Get Package Usage

POST /api/v1/packages/usage. Request parameters and response schemas.

POST
/api/v1/packages/usage

Authorization

corfedoOAuth corfedo:repositories:dependencies:read
headerAuthorizationBearer <token>

Corfedo-issued bearer credential for the workspace's API resource, such as https://workspace.corfedo.example/api; the workspace host is the issuer. Public clients identify themselves with a Client ID Metadata Document URL and use PKCE S256; service clients use private_key_jwt. Browser cookies and MCP-resource credentials are not accepted.

Scope: corfedo:repositories:dependencies:read

Request Body

application/json
  1. body
ecosystem*DependencyEcosystem
Value in"npm""cargo""pypi""maven""nuget""go""rubygems""packagist""pub""hex""hackage""swift""vcpkg""conan""docker""gradle""terraform""githubActions""pulumi"
name*string

Response Body

OK

application/json
  1. response
canonicalName*string
versions*array<>
usingRepositories*integer
Formatint32
Range-2147483648 <= value <= 2147483647
declaredOnlyRepositories*integer
Formatint32
Range-2147483648 <= value <= 2147483647
coverage*
advisoriesSupported*boolean
revision*string
Example Request
curl -X POST 'https://example.com/api/v1/packages/usage' \  -H 'Content-Type: application/json' \  -d '{  "ecosystem": "npm",  "name": "string"}'
Example Response
{  "canonicalName": "string",  "versions": [    {      "origin": "installed",      "version": "string",      "repositories": -2147483648,      "direct": -2147483648,      "transitive": -2147483648,      "unknown": -2147483648,      "instances": -2147483648    }  ],  "usingRepositories": -2147483648,  "declaredOnlyRepositories": -2147483648,  "coverage": {    "analysed": -2147483648,    "notAnalysed": [      {        "state": "notIndexed",        "repositories": -2147483648      }    ],    "gaps": [      {        "ecosystem": "npm",        "kind": "filesNotParsed",        "files": -2147483648,        "repositories": -2147483648      }    ],    "transitiveNotRecorded": [      "npm"    ]  },  "advisoriesSupported": true,  "revision": "string"}