---
title: "CreateSBOMImport"
method: POST
path: "/v1/namespaces/{tenant_meta.namespace}/sbom-imports"
tags: ["SBOMImportService"]
---

# CreateSBOMImport

`POST /v1/namespaces/{tenant_meta.namespace}/sbom-imports`

Imports the given SBOM.

## Path parameters

- `tenant_meta.namespace` string, required

## Request body

- SBOMImportServiceCreateSBOMImportBody — ImportedSBOM represents an SBOM that has been imported.
  - `context` V1Context, required — Contexts keep objects from different scans separated.
    - `id` string, required — The context ID, such as a pull request ID or branch reference.
    - `tags` string[] — A list of tags applied to a context. Used primarily for CI and SBOM contexts.
    - `type` 'CONTEXT_TYPE_UNSPECIFIED' | 'CONTEXT_TYPE_MAIN' | 'CONTEXT_TYPE_EXTERNAL' | 'CONTEXT_TYPE_CI_RUN' | 'CONTEXT_TYPE_SBOM' | 'CONTEXT_TYPE_REF', required — - CONTEXT_TYPE_MAIN: Objects from a scan of the default branch. All objects in the oss namespace are in the main context. The context id is always "default". - CONTEXT_TYPE_EXTERNAL: Indicates that this object is a copy/temporary value of an object in another project. Used for same-tenant dependencies. In source code reference this is equivalent to "vendor" folders. Package versions in the external context are only scanned for call graphs. No other operations are performed on them. - CONTEXT_TYPE_CI_RUN: Objects from a PR scan. The context id is the PR UUID. Objects in this context are deleted after 30 days. - CONTEXT_TYPE_SBOM: Objects from an SBOM scan. The context id is the SBOM serial number or some other unique identifier. - CONTEXT_TYPE_REF: Objects from a scan of a specific branch. The context id is the branch reference name.
    - `will_be_deleted_at` string, date-time — Time that all objects in this context will be deleted. This field is deprecated and will be removed in the future. Please use the meta.will_be_deleted_at field instead.
  - `meta` V1Meta, required — Common fields for all Endor Labs resources.
    - `annotations` object — Annotations can be used to attach metadata to a resource message. Annotation values can be small or large, structured or unstructured, and may include characters not permitted by labels. The keys may contain alphanumerics, underscores (_), dots (.) and dashes (-). The values of an annotation must be 16384 bytes or smaller.
    - `create_time` string, date-time — Time the resource was created. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `created_by` string — Name and authentication source of the user who created the object, for example, ewok@endor.ai@google@api-key.
    - `description` string — Resource description. Must be less than 1024 bytes.
    - `index_data` V1IndexData — IndexData is used to index the resource for search. It's an internal object.
      - `data` string[]
      - `search_score` number, float — search_score is the score of the resource for search. Internal use only.
      - `tenant` string
      - `will_be_deleted_at` string, date-time — Time that the resource will be deleted.
    - `kind` string — Resource kind, for example, HelloResponse. Auto-generated using the protobuf message proto.MessageName().Name().
    - `name` string, required — Resource name. Must be 63 characters or less.
    - `parent_kind` string — Parent object resource kind, for example, Project.
    - `parent_uuid` string — Parent object UUID.
    - `references` object — Map of objects referenced in a query API.
    - `tags` string[] — List of tags attached to the resource. Tags can be used to select objects and to find collections of objects that satisfy certain conditions. A tag must be 255 characters or less.
    - `update_time` string, date-time — Time the resource was last updated. Note: Updated on all create/patch/delete operations. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `updated_by` string — Name and authentication source of the last user who updated the object, for example, vulnerabilityingestor@endor.ai@x509.
    - `upsert_time` string, date-time — Time the resource was last upserted. Note: create_time is only set the first time the resource is created. upsert_time is set every time the resource is upseted. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `version` string — Message version.
  - `processing_status` V1ProcessingStatus
    - `analytic_time` string, date-time — Last time a project was analyzed. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `deactivated` boolean — Indicates whether the project is deactivated. Deactivated projects are not scanned and are not visible to users in the UI by default.
    - `disable_automated_scan` boolean — This is a private package and it must not be scanned by the background scheduler. It will be scanned by an endorctl client instead. Default: false.
    - `metadata` V1ProcessingStatusMetadata
      - `full_history_scan_time` string, date-time
    - `queue_time` string, date-time — Last time a project was queued. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `scan_state` 'SCAN_STATE_UNSPECIFIED' | 'SCAN_STATE_NOT_PROCESSED' | 'SCAN_STATE_IDLE' | 'SCAN_STATE_INGESTING' | 'SCAN_STATE_ANALYTIC' | 'SCAN_STATE_UNREACHABLE' | 'SCAN_STATE_REQUEST_FULL_RESCAN' | 'SCAN_STATE_REQUEST_INCREMENTAL_RESCAN' | 'SCAN_STATE_QUEUED' | 'SCAN_STATE_QUARANTINED' — Scan state for a project or package version. - SCAN_STATE_NOT_PROCESSED: Object has not been processed by the system yet. Set when the project or package is created for the first time. A new project or package version is automatically placed in this state. - SCAN_STATE_IDLE: Object has been scanned at least once. - SCAN_STATE_INGESTING: Object is being scanned. - SCAN_STATE_ANALYTIC: Object is being analyzed. - SCAN_STATE_UNREACHABLE: Object cannot be ingested because it is not reachable from the scheduler. - SCAN_STATE_REQUEST_FULL_RESCAN: Object is marked for a complete rescan. This only applies to OSS projects. - SCAN_STATE_REQUEST_INCREMENTAL_RESCAN: Object is marked for an incremental rescan, where only new packages discovered in the scan are added. Indicates that this project should be rescanned with a higher priority. Often because it is used by a customer and we need any new packages to be discovered and scanned with higher priority. If the project is put in this state, we will scan any new packages at high priority but we will not re-scan older packages. - SCAN_STATE_QUEUED: Object is queued to be scanned. - SCAN_STATE_QUARANTINED: Scan scheduling was unsuccessful due to a system errors. Object is quarantined from additional scheduling. Potentially object is an orphan or similar situations.
    - `scan_time` string, date-time — Last time a project was ingested. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt
  - `spec` V1ImportedSBOMSpec — The internal specification of the object.
    - `cyclone_dx` string — CycloneDX is the cyclonedx bom struct serialized to a string.
    - `cyclone_dx_bytes` string, byte — CycloneDX bom struct encoded in zstd bytes.
    - `identifier` string — The unique identifer of the component of a SBOM. For example, a CycloneDX SBOM will have metadata.component.bom-ref as the identifier of the main component.
    - `kind` 'SBOM_KIND_UNSPECIFIED' | 'SBOM_KIND_CYCLONEDX' | 'SBOM_KIND_SPDX', required — SBOM type.
    - `main_component_purl` string — The PURL of the main component of a SBOM.
    - `spdx` string — SPDX is the spdx bom struct serialized to a string.
    - `spdx_bytes` string, byte — SPDX bom struct encoded in zstd bytes.
    - `supplier_name` string — The suplier name of the imported SBOM.
    - `version` integer — The version of the imported SBOM.
  - `tenant_meta` object — SBOM are associated with a tenant and tenant information must be provided.
  - `uuid` string

## Response `200`

A successful response.

- V1ImportedSBOM — ImportedSBOM represents an SBOM that has been imported.
  - `context` V1Context, required — Contexts keep objects from different scans separated.
    - `id` string, required — The context ID, such as a pull request ID or branch reference.
    - `tags` string[] — A list of tags applied to a context. Used primarily for CI and SBOM contexts.
    - `type` 'CONTEXT_TYPE_UNSPECIFIED' | 'CONTEXT_TYPE_MAIN' | 'CONTEXT_TYPE_EXTERNAL' | 'CONTEXT_TYPE_CI_RUN' | 'CONTEXT_TYPE_SBOM' | 'CONTEXT_TYPE_REF', required — - CONTEXT_TYPE_MAIN: Objects from a scan of the default branch. All objects in the oss namespace are in the main context. The context id is always "default". - CONTEXT_TYPE_EXTERNAL: Indicates that this object is a copy/temporary value of an object in another project. Used for same-tenant dependencies. In source code reference this is equivalent to "vendor" folders. Package versions in the external context are only scanned for call graphs. No other operations are performed on them. - CONTEXT_TYPE_CI_RUN: Objects from a PR scan. The context id is the PR UUID. Objects in this context are deleted after 30 days. - CONTEXT_TYPE_SBOM: Objects from an SBOM scan. The context id is the SBOM serial number or some other unique identifier. - CONTEXT_TYPE_REF: Objects from a scan of a specific branch. The context id is the branch reference name.
    - `will_be_deleted_at` string, date-time — Time that all objects in this context will be deleted. This field is deprecated and will be removed in the future. Please use the meta.will_be_deleted_at field instead.
  - `meta` V1Meta, required — Common fields for all Endor Labs resources.
    - `annotations` object — Annotations can be used to attach metadata to a resource message. Annotation values can be small or large, structured or unstructured, and may include characters not permitted by labels. The keys may contain alphanumerics, underscores (_), dots (.) and dashes (-). The values of an annotation must be 16384 bytes or smaller.
    - `create_time` string, date-time — Time the resource was created. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `created_by` string — Name and authentication source of the user who created the object, for example, ewok@endor.ai@google@api-key.
    - `description` string — Resource description. Must be less than 1024 bytes.
    - `index_data` V1IndexData — IndexData is used to index the resource for search. It's an internal object.
      - `data` string[]
      - `search_score` number, float — search_score is the score of the resource for search. Internal use only.
      - `tenant` string
      - `will_be_deleted_at` string, date-time — Time that the resource will be deleted.
    - `kind` string — Resource kind, for example, HelloResponse. Auto-generated using the protobuf message proto.MessageName().Name().
    - `name` string, required — Resource name. Must be 63 characters or less.
    - `parent_kind` string — Parent object resource kind, for example, Project.
    - `parent_uuid` string — Parent object UUID.
    - `references` object — Map of objects referenced in a query API.
    - `tags` string[] — List of tags attached to the resource. Tags can be used to select objects and to find collections of objects that satisfy certain conditions. A tag must be 255 characters or less.
    - `update_time` string, date-time — Time the resource was last updated. Note: Updated on all create/patch/delete operations. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `updated_by` string — Name and authentication source of the last user who updated the object, for example, vulnerabilityingestor@endor.ai@x509.
    - `upsert_time` string, date-time — Time the resource was last upserted. Note: create_time is only set the first time the resource is created. upsert_time is set every time the resource is upseted. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `version` string — Message version.
  - `processing_status` V1ProcessingStatus
    - `analytic_time` string, date-time — Last time a project was analyzed. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `deactivated` boolean — Indicates whether the project is deactivated. Deactivated projects are not scanned and are not visible to users in the UI by default.
    - `disable_automated_scan` boolean — This is a private package and it must not be scanned by the background scheduler. It will be scanned by an endorctl client instead. Default: false.
    - `metadata` V1ProcessingStatusMetadata
      - `full_history_scan_time` string, date-time
    - `queue_time` string, date-time — Last time a project was queued. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt.
    - `scan_state` 'SCAN_STATE_UNSPECIFIED' | 'SCAN_STATE_NOT_PROCESSED' | 'SCAN_STATE_IDLE' | 'SCAN_STATE_INGESTING' | 'SCAN_STATE_ANALYTIC' | 'SCAN_STATE_UNREACHABLE' | 'SCAN_STATE_REQUEST_FULL_RESCAN' | 'SCAN_STATE_REQUEST_INCREMENTAL_RESCAN' | 'SCAN_STATE_QUEUED' | 'SCAN_STATE_QUARANTINED' — Scan state for a project or package version. - SCAN_STATE_NOT_PROCESSED: Object has not been processed by the system yet. Set when the project or package is created for the first time. A new project or package version is automatically placed in this state. - SCAN_STATE_IDLE: Object has been scanned at least once. - SCAN_STATE_INGESTING: Object is being scanned. - SCAN_STATE_ANALYTIC: Object is being analyzed. - SCAN_STATE_UNREACHABLE: Object cannot be ingested because it is not reachable from the scheduler. - SCAN_STATE_REQUEST_FULL_RESCAN: Object is marked for a complete rescan. This only applies to OSS projects. - SCAN_STATE_REQUEST_INCREMENTAL_RESCAN: Object is marked for an incremental rescan, where only new packages discovered in the scan are added. Indicates that this project should be rescanned with a higher priority. Often because it is used by a customer and we need any new packages to be discovered and scanned with higher priority. If the project is put in this state, we will scan any new packages at high priority but we will not re-scan older packages. - SCAN_STATE_QUEUED: Object is queued to be scanned. - SCAN_STATE_QUARANTINED: Scan scheduling was unsuccessful due to a system errors. Object is quarantined from additional scheduling. Potentially object is an orphan or similar situations.
    - `scan_time` string, date-time — Last time a project was ingested. Format: 2017-01-15T01:30:15.01Z RFC 3339: https://www.ietf.org/rfc/rfc3339.txt
  - `spec` V1ImportedSBOMSpec — The internal specification of the object.
    - `cyclone_dx` string — CycloneDX is the cyclonedx bom struct serialized to a string.
    - `cyclone_dx_bytes` string, byte — CycloneDX bom struct encoded in zstd bytes.
    - `identifier` string — The unique identifer of the component of a SBOM. For example, a CycloneDX SBOM will have metadata.component.bom-ref as the identifier of the main component.
    - `kind` 'SBOM_KIND_UNSPECIFIED' | 'SBOM_KIND_CYCLONEDX' | 'SBOM_KIND_SPDX', required — SBOM type.
    - `main_component_purl` string — The PURL of the main component of a SBOM.
    - `spdx` string — SPDX is the spdx bom struct serialized to a string.
    - `spdx_bytes` string, byte — SPDX bom struct encoded in zstd bytes.
    - `supplier_name` string — The suplier name of the imported SBOM.
    - `version` integer — The version of the imported SBOM.
  - `tenant_meta` V1TenantMeta — Tenant related data for the tenant containing the resource.
    - `namespace` string, required — Namespaces are a way to organize organizational units into virtual groupings of resources. Namespaces must be a fully qualified name, for example, the child namespace of namespace "endor.prod" called "app" is called "endor.prod.app".
  - `uuid` string

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/endorlabs/apis/endor-labs-rest-api-reference.md) · [All operations](https://skmtc.net/endorlabs/apis/endor-labs-rest-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/endorlabs/endor-labs-rest-api-reference/versions/2fe1f84213b3/schema)
