-
Notifications
You must be signed in to change notification settings - Fork 607
Description
When using the API endpoint POST /api/assets/batch-create/, the request always fails with
404 {"error":"Folder not found"} even though the folder clearly exists and is accessible via the folders API.
What was done
1. List available folders
curl -s
-H "Authorization: Token "
https://ciso.example.com/api/folders/?limit=200
Output:
count: 2
12485200-ecef-4b43-964c-b455bba8ca6e | Global | GLOBAL
2e81f082-049e-4fb4-adbf-4f13877d5b8e | Starter | DOMAIN
Both folders exist and can be retrieved individually via
GET /api/folders// (HTTP 200).
2. Attempt batch-create using documented format
curl -i
-H "Authorization: Token "
-H "Content-Type: application/json"
-X POST https://ciso.example.com/api/assets/batch-create/
--data '{
"folder": "12485200-ecef-4b43-964c-b455bba8ca6e",
"assets_text": "PR:Parent Asset\n SP:Child Asset 1\n SP:Child Asset 2"
}'
Response:
HTTP/2 404
{"error":"Folder not found"}
The same error occurs when using the second folder
2e81f082-049e-4fb4-adbf-4f13877d5b8e.
Thnx Horst