Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core rest api: Changed the installPack from version 8.9.0 to install as custom content. #37005

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions Packs/DemistoRESTAPI/Integrations/CoreRESTAPI/CoreRESTAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,23 +269,29 @@ var installPack = function(pack_url, entry_id, skip_verify, skip_validation){
file_path = res.Path;
}

let upload_url = 'contentpacks/installed/upload?'

// set the skipVerify parameter
if(isDemistoVersionGE('6.5.0')){
if (skip_verify && skip_verify === 'false') {
upload_url+='skipVerify=false'
}else{
upload_url+='skipVerify=true'
}
let upload_url = 'contentpacks/installed/upload'

// from version 8.9.0 we will upload as custom content
if(isDemistoVersionGE('8.9.0')){
upload_url+='/custom'
}
else{
// set the skipVerify parameter
if(isDemistoVersionGE('6.5.0')){
if (skip_verify && skip_verify === 'false') {
upload_url+='?skipVerify=false'
}else{
upload_url+='?skipVerify=true'
}
}

// set the skipValidation parameter
if(isDemistoVersionGE('6.6.0')){
if (skip_validation && skip_validation === 'false') {
upload_url+='&skipValidation=false'
}else{
upload_url+='&skipValidation=true'
// set the skipValidation parameter
if(isDemistoVersionGE('6.6.0')){
if (skip_validation && skip_validation === 'false') {
upload_url+='&skipValidation=false'
}else{
upload_url+='&skipValidation=true'
}
}
}
// upload the pack
Expand Down
6 changes: 6 additions & 0 deletions Packs/DemistoRESTAPI/ReleaseNotes/1_3_62.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### Core REST API

- Changed the ***installPack*** from version 8.9.0 to install as custom content.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the same for XSIAM:

Suggested change
- Changed the ***installPack*** from version 8.9.0 to install as custom content.
<~XSOAR_SAAS>
- From XSOAR 8.9 the ***core-api-install-packs*** command will install packs as custom content.
</~XSOAR_SAAS>

2 changes: 1 addition & 1 deletion Packs/DemistoRESTAPI/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Cortex REST API",
"description": "Use Demisto REST APIs",
"support": "xsoar",
"currentVersion": "1.3.61",
"currentVersion": "1.3.62",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
Loading