filter[asset_type] 파라미터는 초기 요청( page[token]이 제공되지 않은 경우)에 필요합니다.
후속 페이지는 페이지 매김 토큰에 자산 유형을 인코딩하므로 페이지 지정 요청에 filter[asset_type]이
필요하지 않습니다. 동일한 요청에서 인프라 자산 유형(Host, HostImage, Image, ServerlessFunction)을
코드 자산 유형(Repository, Service)과 혼합하는 것은 지원되지 않으며 이렇게 하면 400 오류가 반환됩니다.
This endpoint requires the appsec_vm_read permission.
인수
쿼리 문자열
이름
유형
설명
page[token]
string
Its value must come from the links section of the response of the first request. Do not manually edit it.
page[number]
integer
The page number to be retrieved. It should be equal to or greater than 1.
filter[asset_type]
enum
The type of the assets for the SBOM request. Required for initial requests (when no page[token] is provided). Infrastructure types (Host, HostImage, Image, ServerlessFunction) and code types (Repository, Service) cannot be mixed in the same request. Allowed enum values: Repository, Service, Host, HostImage, Image, ServerlessFunction
filter[asset_name]
string
The name of the asset for the SBOM request.
filter[package_name]
string
The name of the component that is a dependency of an asset.
filter[package_version]
string
The version of the component that is a dependency of an asset.
filter[license_name]
string
The software license name of the component that is a dependency of an asset.
filter[license_type]
enum
The software license type of the component that is a dependency of an asset. Allowed enum values: network_strong_copyleft, non_standard_copyleft, other_non_free, other_non_standard, permissive, public_domain, strong_copyleft, weak_copyleft
The expected response schema when listing assets SBOMs.
Expand All
항목
유형
설명
data [required]
[object]
List of assets SBOMs.
attributes
object
The JSON:API attributes of the SBOM.
bomFormat [required]
string
Specifies the format of the BOM. This helps to identify the file as CycloneDX since BOM do not have a filename convention nor does JSON schema support namespaces. This value MUST be CycloneDX.
components [required]
[object]
A list of software and hardware components.
bom-ref
string
An optional identifier that can be used to reference the component elsewhere in the BOM.
licenses
[object]
The software licenses of the SBOM component.
license [required]
object
The software license of the component of the SBOM.
name [required]
string
The name of the software license of the component of the SBOM.
name [required]
string
The name of the component. This will often be a shortened, single name of the component.
properties
[object]
The custom properties of the component of the SBOM.
name [required]
string
The name of the custom property of the component of the SBOM.
value [required]
string
The value of the custom property of the component of the SBOM.
purl
string
Specifies the package-url (purl). The purl, if specified, MUST be valid and conform to the specification.
supplier [required]
object
The supplier of the component.
name [required]
string
Identifier of the supplier of the component.
type [required]
enum
The SBOM component type
Allowed enum values: application,container,data,device,device-driver,file,firmware,framework,library,machine-learning-modelShow 2 more,operating-system,platform
version [required]
string
The component version.
dependencies [required]
[object]
List of dependencies between components of the SBOM.
dependsOn
[string]
The components that are dependencies of the ref component.
ref
string
The identifier for the related component.
metadata [required]
object
Provides additional information about a BOM.
authors
[object]
List of authors of the SBOM.
name
string
The identifier of the Author of the SBOM.
component
object
The component that the BOM describes.
name
string
The name of the component. This will often be a shortened, single name of the component.
type
string
Specifies the type of the component.
timestamp
string
The timestamp of the SBOM creation.
serialNumber [required]
string
Every BOM generated has a unique serial number, even if the contents of the BOM have not changed overt time. The serial number follows RFC-4122
specVersion [required]
enum
The version of the CycloneDX specification a BOM conforms to.
Allowed enum values: 1.0,1.1,1.2,1.3,1.4,1.5,1.6
version [required]
int64
It increments when a BOM is modified. The default value is 1.
id
string
The unique ID for this SBOM (it is equivalent to the asset_name or asset_name@repo_digest (Image)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"python3"example.py"
# List assets SBOMs returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.access_token=ENV["DD_BEARER_TOKEN"]endapi_instance=DatadogAPIClient::V2::SecurityMonitoringAPI.newopts={filter_package_name:"pandas",filter_asset_type:AssetType::SERVICE,}papi_instance.list_assets_sbo_ms(opts)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"rb"example.rb"
// List assets SBOMs returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())ctx=context.WithValue(ctx,datadog.ContextAccessToken,os.Getenv("DD_BEARER_TOKEN"))configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewSecurityMonitoringApi(apiClient)resp,r,err:=api.ListAssetsSBOMs(ctx,*datadogV2.NewListAssetsSBOMsOptionalParameters().WithFilterPackageName("pandas").WithFilterAssetType(datadogV2.ASSETTYPE_SERVICE))iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `SecurityMonitoringApi.ListAssetsSBOMs`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `SecurityMonitoringApi.ListAssetsSBOMs`:\n%s\n",responseContent)}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"go run"main.go"
// List assets SBOMs returns "OK" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.SecurityMonitoringApi;importcom.datadog.api.client.v2.api.SecurityMonitoringApi.ListAssetsSBOMsOptionalParameters;importcom.datadog.api.client.v2.model.AssetType;importcom.datadog.api.client.v2.model.ListAssetsSBOMsResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));SecurityMonitoringApiapiInstance=newSecurityMonitoringApi(defaultClient);try{ListAssetsSBOMsResponseresult=apiInstance.listAssetsSBOMs(newListAssetsSBOMsOptionalParameters().filterPackageName("pandas").filterAssetType(AssetType.SERVICE));System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling SecurityMonitoringApi#listAssetsSBOMs");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"java"Example.java"
// List assets SBOMs returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_security_monitoring::ListAssetsSBOMsOptionalParams;usedatadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI;usedatadog_api_client::datadogV2::model::AssetType;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=SecurityMonitoringAPI::with_config(configuration);letresp=api.list_assets_sbo_ms(ListAssetsSBOMsOptionalParams::default().filter_package_name("pandas".to_string()).filter_asset_type(AssetType::SERVICE),).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* List assets SBOMs returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration({authMethods:{AuthZ:{accessToken: process.env.DD_BEARER_TOKENasstring,},},});constapiInstance=newv2.SecurityMonitoringApi(configuration);constparams: v2.SecurityMonitoringApiListAssetsSBOMsRequest={filterAssetType:"Service",filterPackageName:"pandas",};apiInstance.listAssetsSBOMs(params).then((data: v2.ListAssetsSBOMsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"tsc"example.ts"
맞춤형 데모 요청
Datadog 시작하기
Ask AI
AI-generated responses may be inaccurate. Verify important info.