Prisma Cloud Compute: Download App Embedded defender docker file using API
446
Created On 02/05/25 16:47 PM - Last Modified 07/30/25 14:59 PM
Objective
Download the App Embedded Defender docker file using API.
Environment
- Prisma Cloud Compute Edition
Procedure
- Run the API call to download the docker file for app embedded defender. Refer to the below sample API command
- The docker file is downloaded as a zip file.
- Once you have the docker file, refer to the documentation to deploy the app embedded defenders: https://docs.prismacloud.io/en/enterprise-edition/content-collections/runtime-security/install/deploy-defender/app-embedded/app-embedded
curl -k \
-H "Authorization: Bearer <Bearer Token>" \
-H "Content-Type: application/json" \
-H 'Accept: application/json, text/plain, */*' \
-H "Connection: keep-alive" \
-d '{
"appID": "<app-id>",
"consoleAddr": "<console address>",
"dataFolder": "<path to data folder>",
"dockerfile": "dockerfile raw data"
}' \
"https://<path to console/api/v1/defenders/app-embedded?project=Central+Console" \
-o <filename.zip>
- Sample command with the required field.
curl -k \
-H "Authorization: Bearer <Bearer Token>" \
-H "Content-Type: application/json" \
-H 'Accept: application/json, text/plain, */*' \
-H "Connection: keep-alive" \
-d '{
"appID": "my-app",
"consoleAddr": "https://us-west1.cloud.twistlock.com",
"dataFolder": "/var/lib/docker/containers/twistlock/tmp",
"dockerfile": "FROM python:3.8-slim\nWORKDIR /app\nCOPY worker.py .\nRUN mkdir -p /var/lib/docker/containers/twistlock/tmp\nENTRYPOINT [\"/usr/bin/python3\", \"worker.py\"]"
}' \
"https://us-west1.cloud.twistlock.com/us-x-xxxxxx/api/v1/defenders/app-embedded?project=Central+Console" \
-o test.zip