Build
https://app.fossa.com/api/components/buildUpload a component and start asynchronously building it. Only SBOM imports are supported for non-premium accounts. This endpoint accepts push-only tokens in addition to full API tokens.
Query parameters
packageSpecstringrequiredThe unresolved spec (i.e. a URL) that can be passed to a fetcher and resolved to a package id. For example:, underscore (npm), https://github.com/fossas/fossa (git), nokogiri (gem),
revisionstringrequiredThe branch or revision of the component project being built.
dependencybooleandescriptionstringThe project description for the archive
fileTypeenumThe kind of component file to be built., If 'archive', the signed URL is for uplaoding a directory of source code., If 'sbom', the signed URL is for uploading an SBOM file (CycloneDX or SPDX).,
archivesbombranchstringjiraProjectKeystringThe corresponding Jira project for this component
linkstringA link to attach to this revision
projectURLstringThe URL of the project being uploaded
policystringThe name of the policy for this build.
policyIdnumberThe ID of the policy for this build.
teamstringThe name of the team connected to the project.
titlestringThe title of the component.
releaseGroupstringThe title of release group to add the project to.
releaseGroupReleasestringThe title of release to add the project to.
labelsstring[]Set of labels to apply to a project. If the org or the project have too many labels, then the labels will be applied in order until limits are hit.
Request body · application/json
archivesobjectFile upload metadata
packageSpecstringThe unresolved spec (i.e. a URL) that can be passed to a fetcher and resolved to a package id. For example: underscore (npm) https://github.com/fossas/fossa (git) nokogiri (gem)
revisionstringThe branch or revision of the component being uploaded.
descriptionstringThe description of the archive.
projectURLstringThe homepage of the archive.
selectedTeamsobject[]forceRebuildbooleanForce a rebuild no matter what
Responses
201Created403Forbidden500Server ErrorTry this endpoint
Build a request and run it against app.fossa.com.
Stored in this browser for 24 hours. Try It uses a docs proxy for CORS and does not store tokens server-side.
POST https://app.fossa.com/api/components/buildcurl --request POST \ --url 'https://app.fossa.com/api/components/build' \ --header 'accept: application/json' \ --header 'authorization: Bearer YOUR_API_TOKEN' \ --header 'content-type: application/json' \ --data '{ "archives": { "packageSpec": "string", "revision": "string", "description": "string", "projectURL": "string" }, "selectedTeams": [ { "id": 1 } ], "forceRebuild": true}'Real request. Mutating methods can change data.
Query params
packageSpecstringrequiredThe unresolved spec (i.e. a URL) that can be passed to a fetcher and resolved to a package id. For example:, underscore (npm), https://github.com/fossas/fossa (git), nokogiri (gem),
revisionstringrequiredThe branch or revision of the component project being built.
dependencybooleandescriptionstringThe project description for the archive
fileTypeenumThe kind of component file to be built., If 'archive', the signed URL is for uplaoding a directory of source code., If 'sbom', the signed URL is for uploading an SBOM file (CycloneDX or SPDX).,
branchstringjiraProjectKeystringThe corresponding Jira project for this component
linkstringA link to attach to this revision
projectURLstringThe URL of the project being uploaded
policystringThe name of the policy for this build.
policyIdnumberThe ID of the policy for this build.
teamstringThe name of the team connected to the project.
titlestringThe title of the component.
releaseGroupstringThe title of release group to add the project to.
releaseGroupReleasestringThe title of release to add the project to.
labelsarraySet of labels to apply to a project. If the org or the project have too many labels, then the labels will be applied in order until limits are hit.