Skip to content

Latest commit

 

History

History
562 lines (371 loc) · 16.9 KB

components.adoc

File metadata and controls

562 lines (371 loc) · 16.9 KB

Components

The Components resource is used to create and list components.

Listing components with fields

A GET request will list all of the service’s components. The fields parameter defines which component object properties should be contained in the response.

Listing by name

A GET request will list all of the service’s components by component name.
Please set the request parameter &name=<NAME>.

Note : send query parameter’s value in encoded format. (Reference: https://datatracker.ietf.org/doc/html/rfc3986)

Listing by type

A GET request will list all of the service’s components by component type.
Component types = {INTERNAL, OSS, COTS, FREESOFTWARE, INNER_SOURCE, SERVICE, CODE_SNIPPET}

Listing by external ids

A GET request will get all components corresponding to external ids
The request parameter supports MultiValueMap (allows to add duplicate keys with different values)
It’s possible to search for components only by the external id key by leaving the value.

Note : send query parameter’s value in encoded format. (Reference: https://datatracker.ietf.org/doc/html/rfc3986)

Upload attachment to component

A POST request is used to upload attachment to component

Request structure

Path Type Description

file

file

File path of the attachment

attachment.filename

String

Name of the file

attachment.attachmentContentId

String

Id of attachment info

attachment.attachmentType

String

Type of attachment, possible values are: [DOCUMENT, SOURCE, DESIGN, REQUIREMENT, CLEARING_REPORT, COMPONENT_LICENSE_INFO_XML, COMPONENT_LICENSE_INFO_COMBINED, SCAN_RESULT_REPORT, SCAN_RESULT_REPORT_XML, SOURCE_SELF, BINARY, BINARY_SELF, DECISION_REPORT, LEGAL_EVALUATION, LICENSE_AGREEMENT, SCREENSHOT, OTHER, README_OSS]

attachment.checkStatus

String

Status of attachment, possible values are: [NOTCHECKED, ACCEPTED, REJECTED]

attachment.createdComment

String

Comment while uploading attachment.

Response structure

Complete Component will be returned

Download attachment

A GET request will allow you to download an attachment of a component.
Please set the Accept-Header application/*. Only this Accept-Header is supported.

Download attachment bundle

A GET request will allow you to download the attachment bundle of a component.
Please set the Accept-Header application/zip. Only this Accept-Header is supported.

Delete attachments

With a DELETE request one or multiple attachments can be deleted from a component. To delete multiple attachments at once, just specify a comma-separated list of attachment IDs.

Note that attachments can only be deleted if they are not used by a project. Requests that cannot delete any of the attachments specified fail with response status 500.

Example response

The response contains the updated component. Here the set of attachments is especially relevant. If multiple attachments were to be deleted, but the deletion failed for some of them, those can still be found in the set. So callers should inspect the set of attachments in the result to find out whether all delete operations have been successful.

Delete a component

A DELETE request is used to delete an existing component

Resources using the component

A GET request will display all the resources where the component is used.

Prepare Import SBOM Component

A POST request is used to import SBOM in SPDX format.

Request parameters

Parameter Description

type

File type of SBOM

Request structure

Type Description

file

Path of the SBOM file

Response structure

Complete Component will be returned

Import SBOM Component

A POST request is used to import SBOM in SPDX format.

Request parameters

Parameter Description

type

File type of SBOM

Request structure

Type Description

file

Path of the SBOM file

Response structure

Complete Component will be returned

Downloading component report

A GET request help to download the components report.