Configuration Archive API に deviceId と ZIP ファイル暗号化用パスワードを HTTP POST して ZIP ファイル作成タスクを実行します。パスワードは大文字小文字数字記号を含む 8 文字以上にする必要があります。下記例のように複数の機器の deviceId を含む JSON データを HTTP POST することができます。
// パスワード要件を満たさない場合
curl -k -X POST -H "X-Auth-Token:$DNACJWT" -H "Content-Type:application/json" -H "Accept: application/json" https:///xxx.xxx.xxx.xxx/dna/intent/api/v1/network-device-archive/cleartext --data '{"deviceId": ["3fd2ee44-9f1b-41da-8c79-8efbf57229a4"],"password": "cisco"}'
{"response":{"errorCode":"NCAR80003","message":"Invalid input as Invalid password. Min password length is 8 and it should contain atleast one lower case letter, one uppercase letter, one digit and one special characters from -=\\\\;,./~!@#$%^&*()_+{}[]|:?","href":"/network-device-archive/cleartext"},"version":"1.0"
% curl -k -X POST -H "X-Auth-Token:$DNACJWT" -H "Content-Type:application/json" -H "Accept: application/json" https:///xxx.xxx.xxx.xxx/dna/intent/api/v1/network-device-archive/cleartext --data '{"deviceId": ["3fd2ee44-9f1b-41da-8c79-8efbf57229a4","e2431825-7196-43dd-a16f-b0a2aa5cac82"],"password": "XXXXXXXXXX"}'
{"response":{"taskId":"516415cd-0d20-4ca3-8bdc-ffab9743626f","url":"/api/v1/task/516415cd-0d20-4ca3-8bdc-ffab9743626f"},"version":"1.0"}
fileId 確認
https://developer.cisco.com/docs/dna-center/#!get-task-by-id
"url" に /dna/intent を付加して HTTP GET を行い、taskId のステータスを確認します。ZIP ファイル作成が完了していれば "progress":"Device configuration Successfully exported as password protected ZIP." となります。
% curl -k -H "X-Auth-Token:$DNACJWT" -H "Content-Type:application/json" -X GET https://xxx.xxx.xxx.xxx/dna/intent/api/v1/task/516415cd-0d20-4ca3-8bdc-ffab9743626f
{"response":{"startTime":1650977155458,"lastUpdate":1650977155460,"version":1650977155460,"endTime":1650977156760,"rootId":"516415cd-0d20-4ca3-8bdc-ffab9743626f","additionalStatusURL":"/api/v1/file/02609b36-c75a-40a1-aca1-6952b3601231","serviceType":"NCAR","progress":"Device configuration Successfully exported as password protected ZIP.","isError":false,"username":"NCAR88888","instanceTenantId":"615a856f55e5f725bde8867d","id":"516415cd-0d20-4ca3-8bdc-ffab9743626f"},"version":"1.0"}
ZIP ファイルのダウンロード
https://developer.cisco.com/docs/dna-center/#!download-a-file-by-file-id
"additionalStatusURL" に ZIP ファイルの fileId が記載されていますので、/data/intent を付加し、File API を用いて ZIP ファイルをダウンロードします。 なお、Intenet API の File API では DELETE メソッドが実装されていませんので作成したファイルは削除できません。
% curl -k -H "X-Auth-Token:$DNACJWT" -H "Content-Type:application/gzip" -X GET https://xxx.xxx.xxx.xxx/api/v1/file/02609b36-c75a-40a1-aca1-6952b3601231 -o config.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 32298 0 32298 0 0 99445 0 --:--:-- --:--:-- --:--:-- 100k
ZIP ファイルの展開
ダウンロードした暗号化 ZIP ファイルを展開するとシークレットのマスクされていない running-config, startup-config, vlan.dat を取得できます。

参考情報
DevNet DNA Center Platform Overview