Hello,
I would like to programatically export and import XaaS content, using the REST API endpoints. I want to transfer all my XaaS workflows, resource actions etc. between tenants.
The documantation on that matter seems not to be complete.
First I have generated a new package, with the content type xaas-bundle-content, and saved the package ID.
Afterwards I use a command documented in the programming guide under "Export XaaS Content Example". Then I have added the token, tenant id (tenant name), package ID and a path to the output file at the end:
curl -X PUT -H "Authorization: Bearer $token" -H "Content-Type: application/json"-d'{"jsonAccepted" : true, "tenantId" : "$tenantId", "data" : [$packageID] }' 'https://$vRA/advanced-designer-service/api/content/bundles/filters' -o /var/lib/vco/app-server/temp/XAASonFilesystem3107.zip
The execution is successful, however the file generated is only 197 Bytes.
Importing the generated package results in an error: Import failed for tenant dataport. Uploaded file is not a valid content.
I get the same errors, when trying to use the Content service API instead of the XaaS API. I've also tried it with the other xaas-* types.
What is the correct way to import\export XaaS content using the REST API?