Practice

XRAY: Offline Rest API of Xray SCA DB Sync

AuthorFullName__c
Jian Sun
articleNumber
000005954
ft:sourceType
Salesforce
FirstPublishedDate
2024-01-04T12:09:38Z
lastModifiedDate
2024-01-04T12:27:58Z
VersionNumber
1
The complete process consists of the following steps:

1. Get the jf command from the Rest API, then run the command to download the offline sync files
$ curl http://xx:xx/xray/api/v1/updates/generateDownloadCommand -XGET  -uadmin:'xx'
{"snippet":"jf xr offline-update --license-id=xx xxxx xxxx"}

2. Copy the files the "jf" client downloaded to these folders (Xray <=3.79.11)
$ {JFROG_HOME}/xray/data/updates/component
$ {JFROG_HOME}/xray/data/updates/vulnerability

3. Invoke the "Sync Now" Xray Rest API
$ curl http://xx:xx/xray/api/v1/updates/startOfflineSync -XPOST  -uadmin:'xx'
{"info":"Local updates started"}

4. Get progress by UI
User-added image