Build

posthttps://app.fossa.com/api/components/build

Upload 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

packageSpecstringrequired

The 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),

revisionstringrequired

The branch or revision of the component project being built.

dependencyboolean
descriptionstring

The project description for the archive

fileTypeenum

The 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).,

archivesbom
branchstring
jiraProjectKeystring

The corresponding Jira project for this component

linkstring

A link to attach to this revision

projectURLstring

The URL of the project being uploaded

policystring

The name of the policy for this build.

policyIdnumber

The ID of the policy for this build.

teamstring

The name of the team connected to the project.

titlestring

The title of the component.

releaseGroupstring

The title of release group to add the project to.

releaseGroupReleasestring

The 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

archivesobject

File upload metadata

packageSpecstring

The 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)

revisionstring

The branch or revision of the component being uploaded.

descriptionstring

The description of the archive.

projectURLstring

The homepage of the archive.

selectedTeamsobject[]
forceRebuildboolean

Force a rebuild no matter what

Responses

201Created
403Forbidden
FossaForbiddenError
500Server Error
FossaApiError

Try this endpoint

Build a request and run it against app.fossa.com.

Bearer

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/build
curl --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.

Click Try It to run a request and see the response here.
Enter a Bearer token before running this request.

Query params

packageSpecstringrequired

The 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),

revisionstringrequired

The branch or revision of the component project being built.

dependencyboolean
descriptionstring

The project description for the archive

fileTypeenum

The 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).,

branchstring
jiraProjectKeystring

The corresponding Jira project for this component

linkstring

A link to attach to this revision

projectURLstring

The URL of the project being uploaded

policystring

The name of the policy for this build.

policyIdnumber

The ID of the policy for this build.

teamstring

The name of the team connected to the project.

titlestring

The title of the component.

releaseGroupstring

The title of release group to add the project to.

releaseGroupReleasestring

The title of release to add the project to.

labelsarray

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.

application/json