Replies: 2 comments 2 replies
-
The shell will not interpret At the moment, what the API server receives, is literally the string This should work: curl -X 'PUT' \
-d '{"project":"project_uuid","bom":'"\"$(base64 ./sbom.json)\""'}' \
'http://localhost:8081/api/v1/bom' \
-H 'accept: application/json' \
-H 'X-Api-Key: API_KEY' \
-H 'Content-Type: application/json' |
Beta Was this translation helpful? Give feedback.
-
The problem was the line feeds in the generated base64 file. You must precise it in the base64 command. So the following command work for me : |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I'm trying to send my SBOM to the Dependency track API but I have the following error :
["message":"The BOM must be Base64 encoded","messageTemplate":"The BOM must be Base64 encoded"]
Yet I try to send my SBOM encoded in base64 with the following curl request :
curl -X 'PUT' -d '{"project":"project_uuid","bom":"$(base64 ./sbom.json)"}' 'http://localhost:8081/api/v1/bom' -H 'accept: application/json' -H 'X-Api-Key: API_KEY' -H 'Content-Type: application/json'
Does anyone know why it consider that my SBOM is not encoded ?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions