Step 3: Create and scan a Cloud Environment (API)
Find the role ARN
Send the Snyk API request
curl -X POST \
'https://api.snyk.io/rest/orgs/YOUR-ORGANIZATION-ID/cloud/environments?version=2022-12-21~beta' \
-H 'Authorization: token YOUR-API-TOKEN' \
-H 'Content-Type:application/vnd.api+json' -d '{
"data": {
"attributes": {
"kind": "aws",
"name": "Example AWS Environment",
"options": {
"role_arn": "YOUR-ROLE-ARN"
}
},
"type": "environment"
}
}'Understand the API response
Check to see if the scan is finished
What's next?
Last updated
Was this helpful?

