Introduction
Application developers can access CloudGuard functionality from within applications using the CloudGuard API. With version 2 of this API, developers can access functions using RESTful HTTP requests.
The resources and methods listed in this API cover the CloudGuard functionality that developer applications need to onboard and manage their cloud accounts in CloudGuard.
The resources are grouped into CloudGuard entities and Cloud Inventory entities.
CloudGuard entities include functional features such as Clarity, Compliance, CloudGuard Alerts, and entities such as access leases, Compliance bundles and rules, and CloudGuard users and roles.
Cloud inventory includes entities such as Security Groups, instances, regions, and VPCs.
The API is based on HTTP requests and responses, and uses JSON blocks.
The base URL for the CloudGuard API is https://api.dome9.com/v2/
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Authentication
The CloudGuard REST API uses HTTP Basic Authentication.
You will need a V2 API key and a secret in order to use the API.
You can generate the key and secret in the CloudGuard web application (https://secure.dome9.com), under 'My Settings' section.
For detailed instructions see Create a CloudGuard API Key
Your permissions when using the REST API with the key will be the same as the permissions of the CloudGuard user who generated the key from the CloudGuard web application.
Example:
curl -u your-api-key-id:your-api-key-secret https://api.dome9.com/v2/CloudAccounts
AccessLease
The AccessLease resource has methods to create dynamic access leases, with which users can access resources in AWS accounts managed by CloudGuard.
Leases are for specific users (not necessarily CloudGuard users) and for specific periods of time.
Once a lease has been created, it can be sent to the user for whom it was created using the AccessLeaseInvitation resource.
Related resources
See also
Acquire Aws Lease
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/accesslease/aws \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"region": "us_east_1",
"securityGroupId": "string",
"id": "00000000-0000-0000-0000-000000000000",
"accountId": 0,
"name": "string",
"ip": "string",
"note": "string",
"created": "2021-04-13T17:37:24Z",
"user": "string",
"length": "string",
"protocol": "ALL",
"portFrom": 0,
"portTo": 0,
"srl": "string"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/accesslease/aws',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/accesslease/aws', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/accesslease/aws
Create a new Access Lease for an AWS service
Body parameter
{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"region": "us_east_1",
"securityGroupId": "string",
"id": "00000000-0000-0000-0000-000000000000",
"accountId": 0,
"name": "string",
"ip": "string",
"note": "string",
"created": "2021-04-13T17:37:24Z",
"user": "string",
"length": "string",
"protocol": "ALL",
"portFrom": 0,
"portTo": 0,
"srl": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AwsAccessLeasePost | true | details for the lease |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Get
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AccessLease \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AccessLease',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AccessLease', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AccessLease
Get a list of all active Access Leases
Example responses
200 Response
{
"aws": [
{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"region": "us_east_1",
"securityGroupId": 0,
"id": "00000000-0000-0000-0000-000000000000",
"accountId": 0,
"name": "string",
"ip": "string",
"note": "string",
"created": "2021-04-13T17:37:24Z",
"user": "string",
"length": "string",
"protocol": "ALL",
"portFrom": 0,
"portTo": 0,
"srl": "string"
}
],
"agents": [
{
"agentId": 0,
"id": "00000000-0000-0000-0000-000000000000",
"accountId": 0,
"name": "string",
"ip": "string",
"note": "string",
"created": "2021-04-13T17:37:24Z",
"user": "string",
"length": "string",
"protocol": "ALL",
"portFrom": 0,
"portTo": 0,
"srl": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AccessLeasesGrouped |
Delete
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/AccessLease/{id}
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AccessLease/{id}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/AccessLease/{id}', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/AccessLease/{id}
Terminate an Access Lease
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the id of the lease to terminate |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
AccessLeaseInvitation
The AcessLeaseInvitation resource has methods to create and view invitations to users to access managed AWS account resources (such as instances) using access leases.
Invitations are sent as emails. The recipient is the user of the lease. Typically they will use the lease from the location (host) on which the email is opened. The lease is time limited, and specific to a user.
Create access leases using the AccessLease resource.
Related resources
See also
Access Invitation
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/access-lease-invitation/access/{invitationId} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/access-lease-invitation/access/{invitationId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/access-lease-invitation/access/{invitationId}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/access-lease-invitation/access/{invitationId}
Get a specific invitation
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
invitationId | path | string(uuid) | true | the id of the invitation |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Get Pending Invitations
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AccessLeaseInvitation \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AccessLeaseInvitation',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AccessLeaseInvitation', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AccessLeaseInvitation
Get a list of pending invitations (invitations not yet activated)
These are invitations that have not yet been activated
Example responses
200 Response
[
{
"notifyEmail": "MyName@gmail.com",
"length": "string",
"recipientName": "string",
"targetSrl": "string",
"body": "string",
"id": "00000000-0000-0000-0000-000000000000",
"expirationTime": "2021-04-13T17:37:24Z",
"pivotEntity": "string",
"serviceName": "string",
"issuerName": "string",
"created": "2021-04-13T17:37:24Z"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AccessLeaseInvitation] | none |
Create Invitation
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AccessLeaseInvitation \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"notifyEmail": "MyName@gmail.com",
"length": "string",
"recipientName": "string",
"targetSrl": "string",
"body": "string",
"id": "00000000-0000-0000-0000-000000000000",
"expirationTime": "2021-04-13T17:37:24Z",
"pivotEntity": "string",
"serviceName": "string",
"issuerName": "string",
"created": "2021-04-13T17:37:24Z"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AccessLeaseInvitation',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AccessLeaseInvitation', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AccessLeaseInvitation
Create a new Lease Invitation
Body parameter
{
"notifyEmail": "MyName@gmail.com",
"length": "string",
"recipientName": "string",
"targetSrl": "string",
"body": "string",
"id": "00000000-0000-0000-0000-000000000000",
"expirationTime": "2021-04-13T17:37:24Z",
"pivotEntity": "string",
"serviceName": "string",
"issuerName": "string",
"created": "2021-04-13T17:37:24Z"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AccessLeaseInvitation | true | lease invitation details |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Delete
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/AccessLeaseInvitation/{id}
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AccessLeaseInvitation/{id}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/AccessLeaseInvitation/{id}', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/AccessLeaseInvitation/{id}
Delete a lease invitation
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the id of the lease to delete |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
AccountTrust
The AccountTrust resource has methods to define a trust relationship between CloudGuard accounts. This allows users in a one account to make changes and perform operations in another account.
Actions in the trustee account are performed using a role which is defined for it. The user from the trusted account assumes this role when signing in to the trustee account.
Related resources
See also
CloudGuard Managed Service Providers
Get Assumable Roles
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AccountTrust/assumable-roles \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AccountTrust/assumable-roles',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AccountTrust/assumable-roles', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AccountTrust/assumable-roles
Get a list of objects that represent a trusted account and its assumebale roles
Example responses
200 Response
[
{
"accountName": "string",
"accountId": 0,
"roles": [
"string"
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AccountTrustAssumableRoles] | none |
Get
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AccountTrust?trustDirection=MyAccountIsTarget \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AccountTrust?trustDirection=MyAccountIsTarget',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AccountTrust', params={
'trustDirection': 'MyAccountIsTarget'
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AccountTrust
Get a list of accounts which are trusted by or trust this account according to the given "trustDirection"
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
trustDirection | query | string | true | Determines whether the accounts result list are the trusted/trustee accounts |
Enumerated Values
Parameter | Value |
---|---|
trustDirection | MyAccountIsTarget |
trustDirection | MyAccountIsSource |
Example responses
200 Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"targetAccountName": "string",
"sourceAccountName": "string",
"sourceAccountId": "00000000-0000-0000-0000-000000000000",
"description": "string",
"restrictions": {
"roles": [
"string"
]
}
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AccountTrust] | none |
Post
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AccountTrust \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"sourceAccountId": "00000000-0000-0000-0000-000000000000",
"description": "string",
"restrictions": {
"roles": [
"string"
]
}
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AccountTrust',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AccountTrust', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AccountTrust
Create a new account trust where this account is the target based on the given "SourceAccountId", i.e. this account trusts the source account
Body parameter
{
"sourceAccountId": "00000000-0000-0000-0000-000000000000",
"description": "string",
"restrictions": {
"roles": [
"string"
]
}
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AccountTrustPost | true | none |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Put
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AccountTrust/{id} \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"description": "string",
"restrictions": {
"roles": [
"string"
]
}
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AccountTrust/{id}',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AccountTrust/{id}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AccountTrust/{id}
Update the account trust description or restrictions
Body parameter
{
"description": "string",
"restrictions": {
"roles": [
"string"
]
}
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | Account trust id |
body | body | AccountTrustPut | true | none |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Delete
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/AccountTrust/{id}
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AccountTrust/{id}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/AccountTrust/{id}', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/AccountTrust/{id}
Delete an account trust
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | The trust id |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
AlibabaCloudAccount
Alibaba Cloud Accounts
Delete Force
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/AlibabaCloudAccount/{id}/DeleteForce
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/DeleteForce',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/DeleteForce', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/AlibabaCloudAccount/{id}/DeleteForce
Delete an Alibaba account from a Dome9 account (the Alibaba account is not deleted from Alibaba) and linked entities
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the Dome9 account id for the account or the Subscription id |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Get Cloud Account Stats
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AlibabaCloudAccount/{cloudAccountId}/account-stats \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AlibabaCloudAccount/{cloudAccountId}/account-stats',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AlibabaCloudAccount/{cloudAccountId}/account-stats', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AlibabaCloudAccount/{cloudAccountId}/account-stats
Gets Cloud Account network statistics on cloud account page
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
cloudAccountId | path | string(uuid) | true | The Id of the Alibaba cloud account |
withData | query | boolean | false | Include raw data of networks, security groups and vms, default = false |
Example responses
200 Response
{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"name": "string",
"creationDate": "2021-04-13T17:37:24Z",
"alibabaAccountId": "string",
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"vendor": "aws"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AlibabaAccountStats |
Get Missing Permissions
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AlibabaCloudAccount/MissingPermissions \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AlibabaCloudAccount/MissingPermissions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AlibabaCloudAccount/MissingPermissions', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AlibabaCloudAccount/MissingPermissions
Get a list of missing permissions (needed by Dome9 to manage the accounts) for all Alibaba accounts in Dome9
Example responses
200 Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"actions": [
{
"type": "string",
"subType": "string",
"total": 0,
"error": {
"code": "string",
"message": "string"
}
}
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [CloudAccountMissingPermissions] | none |
Get Missing Permissions
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AlibabaCloudAccount/{id}/MissingPermissions \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/MissingPermissions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/MissingPermissions', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AlibabaCloudAccount/{id}/MissingPermissions
Get missing permissions for a specific Alibaba cloud account
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | The Alibaba Cloud Account Id |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"actions": [
{
"type": "string",
"subType": "string",
"total": 0,
"error": {
"code": "string",
"message": "string"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CloudAccountMissingPermissions |
Get Mising Permissions By Entity Type
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AlibabaCloudAccount/{id}/MissingPermissions/EntityType?entityType=string \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/MissingPermissions/EntityType?entityType=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/MissingPermissions/EntityType', params={
'entityType': 'string'
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AlibabaCloudAccount/{id}/MissingPermissions/EntityType
Get missing permissions for a specific entity type for a specific Alibaba Cloud account
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | The Dome9 Alibaba Cloud Account Id |
entityType | query | string | true | The entity type for which to get permission issues |
subType | query | string | false | none |
Example responses
200 Response
[
{
"srl": "string",
"consecutiveFails": 0,
"lastFail": "2021-04-13T17:37:24Z",
"lastSuccess": "2021-04-13T17:37:24Z",
"firstFail": "2021-04-13T17:37:24Z",
"lastFailErrorCode": "string",
"lastFailMessage": "string",
"id": "00000000-0000-0000-0000-000000000000",
"retryMetadata": {
"permissions": [
"string"
],
"entityType": "string",
"subType": "string"
},
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"vendor": "aws"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [MissingPermission] | none |
Enumerated Values
Property | Value |
---|---|
vendor | aws |
vendor | hp |
vendor | mellanox |
vendor | awsgov |
vendor | azure |
vendor | |
vendor | awschina |
vendor | azuregov |
vendor | kubernetes |
vendor | azurechina |
vendor | terraform |
vendor | generic |
vendor | kubernetesruntimeassurance |
vendor | shiftleft |
vendor | sourcecodeassurance |
vendor | imageassurance |
vendor | alibaba |
Reset Missing Permissions
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AlibabaCloudAccount/{id}/MissingPermissions/Reset
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/MissingPermissions/Reset',
{
method: 'PUT'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.put('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/MissingPermissions/Reset', params={
, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AlibabaCloudAccount/{id}/MissingPermissions/Reset
Reset (re-validate) a Alibaba Cloud account credentials in Dome9. Will cause all entities to retry fetching from the Alibaba cloud account.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the account id |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Update Account Name
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AlibabaCloudAccount/{id}/AccountName \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"name": "string"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/AccountName',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/AccountName', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AlibabaCloudAccount/{id}/AccountName
Update a Alibaba Cloud account name (as it appears in Dome9)
Body parameter
{
"name": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the account id |
body | body | AlibabaAccountName | true | the updated name as it will appear in Dome9 |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"creationDate": "2021-04-13T17:37:24Z",
"alibabaAccountId": "string",
"credentials": {
"accessKey": "string"
},
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AlibabaCloudAccountGet |
Update Alibaba Cloud Account Credentials
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AlibabaCloudAccount/{id}/Credentials \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"accessKey": "string",
"accessSecret": "string"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/Credentials',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/Credentials', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AlibabaCloudAccount/{id}/Credentials
Body parameter
{
"accessKey": "string",
"accessSecret": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | none |
body | body | AlibabaAccountCredentialsViewPostModel | true | none |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"creationDate": "2021-04-13T17:37:24Z",
"alibabaAccountId": "string",
"credentials": {
"accessKey": "string"
},
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AlibabaCloudAccountGet |
Sync Now
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AlibabaCloudAccount/{id}/SyncNow \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/SyncNow',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AlibabaCloudAccount/{id}/SyncNow', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AlibabaCloudAccount/{id}/SyncNow
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | none |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"creationDate": "2021-04-13T17:37:24Z",
"alibabaAccountId": "string",
"credentials": {
"accessKey": "string"
},
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AlibabaCloudAccountGet |
Get
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AlibabaCloudAccount/{id} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AlibabaCloudAccount/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AlibabaCloudAccount/{id}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AlibabaCloudAccount/{id}
Get details for a specific Alibaba Cloud Account
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the Alibaba cloud account id |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"creationDate": "2021-04-13T17:37:24Z",
"alibabaAccountId": "string",
"credentials": {
"accessKey": "string"
},
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AlibabaCloudAccountGet |
Post
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AlibabaCloudAccount \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"name": "string",
"credentials": {
"accessKey": "string",
"accessSecret": "string"
}
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AlibabaCloudAccount',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AlibabaCloudAccount', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AlibabaCloudAccount
Add (onboard) a new Alibaba cloud account to Dome9
Body parameter
{
"name": "string",
"credentials": {
"accessKey": "string",
"accessSecret": "string"
}
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AlibabaCloudAccountPost | true | details for the new account |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"creationDate": "2021-04-13T17:37:24Z",
"alibabaAccountId": "string",
"credentials": {
"accessKey": "string"
},
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AlibabaCloudAccountGet |
Delete
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/AlibabaCloudAccount/{id}
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AlibabaCloudAccount/{id}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/AlibabaCloudAccount/{id}', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/AlibabaCloudAccount/{id}
Delete an Alibaba account from a Dome9 account (the Alibaba account is not deleted from Alibaba)
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the Dome9 account id for the account or the Subscription id |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Assessment
The Assessment resource has methods to run compliance assessments on cloud accounts, and view the results.
An assessment runs a bundle, which consists of a collection of rules (or tests) that test the properties and capabilities of your cloud account and its entities.
The methods in this resource are synchronous; the response will be sent when the assessment is complete, and will include the results. The respose is typically sent within a few seconds, but for some assessments (on environments with a large number of entities, or bundles with a large number of tests), this could take several minutes.
Assessments can also be run on AWS CloudFormation Template (CFT) files.
You can get a list of all the available bundles for your account using the CompliancePolicy resource.
See results of previous assessments using the AssessmentHistoryV2 resource.
The response contains the results of the assessment.
Related resources
See also
Create a bundle and run an assessment with it
Run Bundle
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/assessment/bundleV2 \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"id": 0,
"name": "string",
"description": "string",
"dome9CloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalCloudAccountId": "string",
"cloudAccountId": "string",
"cloudAccountType": "Aws",
"requestId": "00000000-0000-0000-0000-000000000000",
"shouldMinimizeResult": true
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/assessment/bundleV2',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/assessment/bundleV2', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/assessment/bundleV2
Run an assessment on a cloud environment using a bundle (V2)
Body parameter
{
"id": 0,
"name": "string",
"description": "string",
"dome9CloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalCloudAccountId": "string",
"cloudAccountId": "string",
"cloudAccountType": "Aws",
"requestId": "00000000-0000-0000-0000-000000000000",
"shouldMinimizeResult": true
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AssessmentBundleRequest | true | The assessment request block |
Example responses
200 Response
{
"request": {
"dome9CloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalCloudAccountId": "string",
"cloudAccountId": "string",
"cloudAccountType": "Aws",
"requestId": "00000000-0000-0000-0000-000000000000",
"shouldMinimizeResult": true
},
"tests": [
{
"error": "string",
"testedCount": 0,
"relevantCount": 0,
"nonComplyingCount": 0,
"exclusionStats": {
"testedCount": 0,
"relevantCount": 0,
"nonComplyingCount": 0
},
"entityResults": [
{
"validationStatus": "Relevant",
"isRelevant": true,
"isValid": true,
"isExcluded": true,
"exclusionId": "00000000-0000-0000-0000-000000000000",
"remediationId": "00000000-0000-0000-0000-000000000000",
"error": "string",
"testObj": {}
}
],
"rule": {
"name": "string",
"severity": "Informational",
"logic": "string",
"description": "string",
"remediation": "string",
"complianceTag": "string",
"domain": "string",
"priority": "string",
"controlTitle": "string",
"ruleId": "string",
"category": "string",
"logicHash": "string",
"isDefault": true
},
"testPassed": true
}
],
"locationMetadata": {
"account": {
"srl": "string",
"name": "string",
"id": "string",
"externalId": "string"
}
},
"testEntities": {
"property1": [
{}
],
"property2": [
{}
]
},
"dataSyncStatus": [
{
"entityType": "string",
"recentlySuccessfulSync": true,
"generalFetchPermissionIssues": true,
"entitiesWithPermissionIssues": [
{
"externalId": "string",
"name": "string",
"cloudVendorIdentifier": "string"
}
]
}
],
"assessmentPassed": true,
"hasErrors": true,
"id": 0,
"assessmentId": "00000000-0000-0000-0000-000000000000"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | JRaw_ |
AssessmentHistoryV2
The AssessmentHistoryV2 resource has methods to retrieve lists of previous compliance assessments, and specific assessment results. The assessments returned are for the CloudGuard account of the user making the request, and can cover all cloud accounts for that user.
Assessments histories can be retrieved for a specified period of time (from, to), and can be filtered by assessment name. Each result has an id, which is used to then retrieve the specific assessment results.
Related resources
Get Bundle Results
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AssessmentHistoryV2/bundleResults?bundleId=0&cloudAccountIds=string&fromTime=2021-04-13T17%3A37%3A24Z \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AssessmentHistoryV2/bundleResults?bundleId=0&cloudAccountIds=string&fromTime=2021-04-13T17%3A37%3A24Z',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AssessmentHistoryV2/bundleResults', params={
'bundleId': '0', 'cloudAccountIds': 'string', 'fromTime': '2021-04-13T17:37:24Z'
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AssessmentHistoryV2/bundleResults
Get most recent assessment results for a specific bundle, for a list of cloud accounts
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
bundleId | query | integer(int64) | true | the bundle used for the assessment (for all the accounts in the list) |
cloudAccountIds | query | string | true | comma separated list of cloud accounts |
fromTime | query | string(date-time) | true | the time the assessment was done |
epsilonInMinutes | query | integer(int64) | false | period of time (in min) back from the fromTime to look for results; only results in this range will be returned |
requestId | query | string(uuid) | false | an optional request id; the same value will appear in the response |
Example responses
200 Response
[
{
"tests": [
{
"error": "string",
"testedCount": 0,
"relevantCount": 0,
"nonComplyingCount": 0,
"exclusionStats": {
"testedCount": 0,
"relevantCount": 0,
"nonComplyingCount": 0
},
"entityResults": [
{
"validationStatus": "Relevant",
"isRelevant": true,
"isValid": true,
"isExcluded": true,
"exclusionId": "00000000-0000-0000-0000-000000000000",
"remediationId": "00000000-0000-0000-0000-000000000000",
"error": "string",
"testObj": {}
}
],
"rule": {
"name": "string",
"severity": "Informational",
"logic": "string",
"description": "string",
"remediation": "string",
"complianceTag": "string",
"domain": "string",
"priority": "string",
"controlTitle": "string",
"ruleId": "string",
"category": "string",
"logicHash": "string",
"isDefault": true
},
"testPassed": true
}
],
"testEntities": {
"property1": [
{}
],
"property2": [
{}
]
},
"exclusions": [
{
"platform": "Aws",
"id": "00000000-0000-0000-0000-000000000000",
"rules": [
{
"logicHash": "string",
"id": "string",
"name": "string"
}
],
"logicExpressions": [
"string"
],
"rulesetId": 0,
"cloudAccountIds": [
"00000000-0000-0000-0000-000000000000"
],
"organizationalUnitIds": [
"00000000-0000-0000-0000-000000000000"
],
"comment": "string",
"dateRange": {
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
}
}
],
"remediations": [
{
"platform": "Aws",
"id": "00000000-0000-0000-0000-000000000000",
"rules": [
{
"logicHash": "string",
"id": "string",
"name": "string"
}
],
"logicExpressions": [
"string"
],
"rulesetId": 0,
"cloudAccountIds": [
"00000000-0000-0000-0000-000000000000"
],
"comment": "string",
"cloudBots": [
"string"
],
"organizationalUnitIds": [
"00000000-0000-0000-0000-000000000000"
],
"dateRange": {
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
}
}
],
"dataSyncStatus": [
{
"entityType": "string",
"recentlySuccessfulSync": true,
"generalFetchPermissionIssues": true,
"entitiesWithPermissionIssues": [
{
"externalId": "string",
"name": "string",
"cloudVendorIdentifier": "string"
}
]
}
],
"createdTime": "2021-04-13T17:37:24Z",
"id": 0,
"assessmentId": "00000000-0000-0000-0000-000000000000",
"triggeredBy": "Unknown",
"assessmentPassed": true,
"hasErrors": true,
"stats": {
"passed": 0,
"passedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"failed": 0,
"failedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"error": 0,
"failedTests": 0,
"logicallyTested": 0,
"failedEntities": 0,
"excludedTests": 0,
"excludedFailedTests": 0,
"excludedRules": 0,
"excludedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
}
},
"request": {
"isTemplate": true,
"id": 0,
"name": "string",
"description": "string",
"dome9CloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalCloudAccountId": "string",
"cloudAccountId": "string",
"cloudAccountType": "Aws",
"requestId": "00000000-0000-0000-0000-000000000000",
"shouldMinimizeResult": true
},
"hasDataSyncStatusIssues": true,
"comparisonCustomId": "string",
"additionalFields": {
"property1": "string",
"property2": "string"
}
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [JRaw_] | none |
Enumerated Values
Property | Value |
---|---|
validationStatus | Relevant |
validationStatus | Valid |
validationStatus | Excluded |
severity | Informational |
severity | Low |
severity | Medium |
severity | High |
severity | Critical |
platform | Aws |
platform | Azure |
platform | |
platform | Kubernetes |
platform | Terraform |
platform | Generic |
platform | KubernetesRuntimeAssurance |
platform | ShiftLeft |
platform | SourceCodeAssurance |
platform | ImageAssurance |
platform | Alibaba |
platform | Aws |
platform | Azure |
platform | |
platform | Kubernetes |
platform | Terraform |
platform | Generic |
platform | KubernetesRuntimeAssurance |
platform | ShiftLeft |
platform | SourceCodeAssurance |
platform | ImageAssurance |
platform | Alibaba |
triggeredBy | Unknown |
triggeredBy | ContinuousCompliancePolicy |
triggeredBy | Manual |
triggeredBy | SystemBundle |
triggeredBy | Serverless |
triggeredBy | Logic |
triggeredBy | Magellan |
triggeredBy | KubernetesRuntimeAssurance |
triggeredBy | ContainersRuntimeProtection |
triggeredBy | ExternalFinding |
cloudAccountType | Aws |
cloudAccountType | Azure |
cloudAccountType | |
cloudAccountType | Kubernetes |
cloudAccountType | Terraform |
cloudAccountType | Generic |
cloudAccountType | KubernetesRuntimeAssurance |
cloudAccountType | ShiftLeft |
cloudAccountType | SourceCodeAssurance |
cloudAccountType | ImageAssurance |
cloudAccountType | Alibaba |
Get Assessment Trend Organizational Unit
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AssessmentHistoryV2/assessmentTrendOrganizationalUnit?rulesetId=0&organizationalUnitId=string&from=2021-04-13T17%3A37%3A24Z&to=2021-04-13T17%3A37%3A24Z \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AssessmentHistoryV2/assessmentTrendOrganizationalUnit?rulesetId=0&organizationalUnitId=string&from=2021-04-13T17%3A37%3A24Z&to=2021-04-13T17%3A37%3A24Z',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AssessmentHistoryV2/assessmentTrendOrganizationalUnit', params={
'rulesetId': '0', 'organizationalUnitId': 'string', 'from': '2021-04-13T17:37:24Z', 'to': '2021-04-13T17:37:24Z'
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AssessmentHistoryV2/assessmentTrendOrganizationalUnit
Get the assessment trend for the selected time range (maximum of 93 days)
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
rulesetId | query | integer(int64) | true | Ruleset ID |
organizationalUnitId | query | string(uuid) | true | Organizational Unit ID |
from | query | string(date-time) | true | From Date |
to | query | string(date-time) | true | To Date |
Example responses
200 Response
[
{
"assessmentDate": "2021-04-13T17:37:24Z",
"failedTests": 0,
"totalTests": 0,
"passedTests": 0
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AssessmentTrendItem] | none |
Get Assessment Trend V 2
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AssessmentHistoryV2/assessmentTrendV2?bundleId=0&cloudAccountId=string&from=2021-04-13T17%3A37%3A24Z&to=2021-04-13T17%3A37%3A24Z \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AssessmentHistoryV2/assessmentTrendV2?bundleId=0&cloudAccountId=string&from=2021-04-13T17%3A37%3A24Z&to=2021-04-13T17%3A37%3A24Z',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AssessmentHistoryV2/assessmentTrendV2', params={
'bundleId': '0', 'cloudAccountId': 'string', 'from': '2021-04-13T17:37:24Z', 'to': '2021-04-13T17:37:24Z'
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AssessmentHistoryV2/assessmentTrendV2
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
bundleId | query | integer(int64) | true | none |
cloudAccountId | query | string(uuid) | true | none |
from | query | string(date-time) | true | none |
to | query | string(date-time) | true | none |
Example responses
200 Response
[
{
"assessmentDate": "2021-04-13T17:37:24Z",
"failedTests": 0,
"totalTests": 0,
"passedTests": 0
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AssessmentTrendItem] | none |
Get Last Assessment Results View
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AssessmentHistoryV2/LastAssessmentResults/view \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"cloudAccountBundleFilters": [
{
"bundleIds": [
0
],
"cloudAccountIds": [
"00000000-0000-0000-0000-000000000000"
],
"cloudAccountType": "Aws"
}
],
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AssessmentHistoryV2/LastAssessmentResults/view',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AssessmentHistoryV2/LastAssessmentResults/view', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AssessmentHistoryV2/LastAssessmentResults/view
Get last assessment results for selected cloud accounts and bundles. Does not return details for the tests or test entities.
Body parameter
{
"cloudAccountBundleFilters": [
{
"bundleIds": [
0
],
"cloudAccountIds": [
"00000000-0000-0000-0000-000000000000"
],
"cloudAccountType": "Aws"
}
],
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AssessmentsRequestFilter | true | block that specifies the accounts and bundles |
Example responses
200 Response
[
{
"createdTime": "2021-04-13T17:37:24Z",
"id": 0,
"assessmentId": "00000000-0000-0000-0000-000000000000",
"triggeredBy": "Unknown",
"assessmentPassed": true,
"hasErrors": true,
"stats": {
"passed": 0,
"passedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"failed": 0,
"failedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"error": 0,
"failedTests": 0,
"logicallyTested": 0,
"failedEntities": 0,
"excludedTests": 0,
"excludedFailedTests": 0,
"excludedRules": 0,
"excludedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
}
},
"request": {
"isTemplate": true,
"id": 0,
"name": "string",
"description": "string",
"dome9CloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalCloudAccountId": "string",
"cloudAccountId": "string",
"cloudAccountType": "Aws",
"requestId": "00000000-0000-0000-0000-000000000000",
"shouldMinimizeResult": true
},
"hasDataSyncStatusIssues": true,
"comparisonCustomId": "string",
"additionalFields": {
"property1": "string",
"property2": "string"
}
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AssessmentHistoryViewResultV2] | none |
Enumerated Values
Property | Value |
---|---|
triggeredBy | Unknown |
triggeredBy | ContinuousCompliancePolicy |
triggeredBy | Manual |
triggeredBy | SystemBundle |
triggeredBy | Serverless |
triggeredBy | Logic |
triggeredBy | Magellan |
triggeredBy | KubernetesRuntimeAssurance |
triggeredBy | ContainersRuntimeProtection |
triggeredBy | ExternalFinding |
cloudAccountType | Aws |
cloudAccountType | Azure |
cloudAccountType | |
cloudAccountType | Kubernetes |
cloudAccountType | Terraform |
cloudAccountType | Generic |
cloudAccountType | KubernetesRuntimeAssurance |
cloudAccountType | ShiftLeft |
cloudAccountType | SourceCodeAssurance |
cloudAccountType | ImageAssurance |
cloudAccountType | Alibaba |
Get Last Assessment Results
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AssessmentHistoryV2/LastAssessmentResults \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"cloudAccountBundleFilters": [
{
"bundleIds": [
0
],
"cloudAccountIds": [
"00000000-0000-0000-0000-000000000000"
],
"cloudAccountType": "Aws"
}
],
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AssessmentHistoryV2/LastAssessmentResults',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AssessmentHistoryV2/LastAssessmentResults', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AssessmentHistoryV2/LastAssessmentResults
Get last assessment results for selected cloud accounts and bundles. Includes details of tests and test entities.
Body parameter
{
"cloudAccountBundleFilters": [
{
"bundleIds": [
0
],
"cloudAccountIds": [
"00000000-0000-0000-0000-000000000000"
],
"cloudAccountType": "Aws"
}
],
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AssessmentsRequestFilter | true | block that specifies the accounts and bundles |
Example responses
200 Response
[
{
"tests": [
{
"error": "string",
"testedCount": 0,
"relevantCount": 0,
"nonComplyingCount": 0,
"exclusionStats": {
"testedCount": 0,
"relevantCount": 0,
"nonComplyingCount": 0
},
"entityResults": [
{
"validationStatus": "Relevant",
"isRelevant": true,
"isValid": true,
"isExcluded": true,
"exclusionId": "00000000-0000-0000-0000-000000000000",
"remediationId": "00000000-0000-0000-0000-000000000000",
"error": "string",
"testObj": {}
}
],
"rule": {
"name": "string",
"severity": "Informational",
"logic": "string",
"description": "string",
"remediation": "string",
"complianceTag": "string",
"domain": "string",
"priority": "string",
"controlTitle": "string",
"ruleId": "string",
"category": "string",
"logicHash": "string",
"isDefault": true
},
"testPassed": true
}
],
"testEntities": {
"property1": [
{}
],
"property2": [
{}
]
},
"exclusions": [
{
"platform": "Aws",
"id": "00000000-0000-0000-0000-000000000000",
"rules": [
{
"logicHash": "string",
"id": "string",
"name": "string"
}
],
"logicExpressions": [
"string"
],
"rulesetId": 0,
"cloudAccountIds": [
"00000000-0000-0000-0000-000000000000"
],
"organizationalUnitIds": [
"00000000-0000-0000-0000-000000000000"
],
"comment": "string",
"dateRange": {
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
}
}
],
"remediations": [
{
"platform": "Aws",
"id": "00000000-0000-0000-0000-000000000000",
"rules": [
{
"logicHash": "string",
"id": "string",
"name": "string"
}
],
"logicExpressions": [
"string"
],
"rulesetId": 0,
"cloudAccountIds": [
"00000000-0000-0000-0000-000000000000"
],
"comment": "string",
"cloudBots": [
"string"
],
"organizationalUnitIds": [
"00000000-0000-0000-0000-000000000000"
],
"dateRange": {
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
}
}
],
"dataSyncStatus": [
{
"entityType": "string",
"recentlySuccessfulSync": true,
"generalFetchPermissionIssues": true,
"entitiesWithPermissionIssues": [
{
"externalId": "string",
"name": "string",
"cloudVendorIdentifier": "string"
}
]
}
],
"createdTime": "2021-04-13T17:37:24Z",
"id": 0,
"assessmentId": "00000000-0000-0000-0000-000000000000",
"triggeredBy": "Unknown",
"assessmentPassed": true,
"hasErrors": true,
"stats": {
"passed": 0,
"passedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"failed": 0,
"failedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"error": 0,
"failedTests": 0,
"logicallyTested": 0,
"failedEntities": 0,
"excludedTests": 0,
"excludedFailedTests": 0,
"excludedRules": 0,
"excludedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
}
},
"request": {
"isTemplate": true,
"id": 0,
"name": "string",
"description": "string",
"dome9CloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalCloudAccountId": "string",
"cloudAccountId": "string",
"cloudAccountType": "Aws",
"requestId": "00000000-0000-0000-0000-000000000000",
"shouldMinimizeResult": true
},
"hasDataSyncStatusIssues": true,
"comparisonCustomId": "string",
"additionalFields": {
"property1": "string",
"property2": "string"
}
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [JRaw_] | none |
Enumerated Values
Property | Value |
---|---|
validationStatus | Relevant |
validationStatus | Valid |
validationStatus | Excluded |
severity | Informational |
severity | Low |
severity | Medium |
severity | High |
severity | Critical |
platform | Aws |
platform | Azure |
platform | |
platform | Kubernetes |
platform | Terraform |
platform | Generic |
platform | KubernetesRuntimeAssurance |
platform | ShiftLeft |
platform | SourceCodeAssurance |
platform | ImageAssurance |
platform | Alibaba |
platform | Aws |
platform | Azure |
platform | |
platform | Kubernetes |
platform | Terraform |
platform | Generic |
platform | KubernetesRuntimeAssurance |
platform | ShiftLeft |
platform | SourceCodeAssurance |
platform | ImageAssurance |
platform | Alibaba |
triggeredBy | Unknown |
triggeredBy | ContinuousCompliancePolicy |
triggeredBy | Manual |
triggeredBy | SystemBundle |
triggeredBy | Serverless |
triggeredBy | Logic |
triggeredBy | Magellan |
triggeredBy | KubernetesRuntimeAssurance |
triggeredBy | ContainersRuntimeProtection |
triggeredBy | ExternalFinding |
cloudAccountType | Aws |
cloudAccountType | Azure |
cloudAccountType | |
cloudAccountType | Kubernetes |
cloudAccountType | Terraform |
cloudAccountType | Generic |
cloudAccountType | KubernetesRuntimeAssurance |
cloudAccountType | ShiftLeft |
cloudAccountType | SourceCodeAssurance |
cloudAccountType | ImageAssurance |
cloudAccountType | Alibaba |
Get Organizational Units Last Assessment Statistics
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AssessmentHistoryV2/OrganizationalUnitsLastAssessmentStatistics \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"organizationalUnitIds": [
"00000000-0000-0000-0000-000000000000"
],
"bundleIds": [
0
]
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AssessmentHistoryV2/OrganizationalUnitsLastAssessmentStatistics',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AssessmentHistoryV2/OrganizationalUnitsLastAssessmentStatistics', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AssessmentHistoryV2/OrganizationalUnitsLastAssessmentStatistics
Get last assessment statistics for selected Organizational Units and bundles.
Body parameter
{
"organizationalUnitIds": [
"00000000-0000-0000-0000-000000000000"
],
"bundleIds": [
0
]
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | OrganizationalUnitAssessmentHistoryRequestModel | true | none |
Example responses
200 Response
[
{
"organizationalUnitPaths": [
"string"
],
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"bundleId": 0,
"statistics": {
"passed": 0,
"passedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"logicallyTested": 0,
"failed": 0,
"failedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"failedTests": 0,
"error": 0,
"failedEntities": 0,
"totalEntities": 0,
"excludedTests": 0,
"excludedFailedTests": 0,
"excludedRules": 0,
"excludedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
}
},
"resultId": 0,
"resultDate": "2021-04-13T17:37:24Z",
"triggeredBy": "Unknown"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [OrganizationalUnitAssessmentHistory] | none |
Enumerated Values
Property | Value |
---|---|
triggeredBy | Unknown |
triggeredBy | ContinuousCompliancePolicy |
triggeredBy | Manual |
triggeredBy | SystemBundle |
triggeredBy | Serverless |
triggeredBy | Logic |
triggeredBy | Magellan |
triggeredBy | KubernetesRuntimeAssurance |
triggeredBy | ContainersRuntimeProtection |
triggeredBy | ExternalFinding |
Find Result Views By Time Range
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AssessmentHistoryV2/view/timeRange \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"creationTime": {
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
},
"pageSize": 1,
"pageNumber": 1,
"requestId": "00000000-0000-0000-0000-000000000000",
"filterFields": [
{
"name": "string",
"value": "string"
}
],
"rulesetTypes": [
"aws"
],
"sorting": {
"fieldName": "string",
"direction": 0
}
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AssessmentHistoryV2/view/timeRange',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AssessmentHistoryV2/view/timeRange', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AssessmentHistoryV2/view/timeRange
Get assessment history (list of assessments) for specified time range and filters
Body parameter
{
"creationTime": {
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
},
"pageSize": 1,
"pageNumber": 1,
"requestId": "00000000-0000-0000-0000-000000000000",
"filterFields": [
{
"name": "string",
"value": "string"
}
],
"rulesetTypes": [
"aws"
],
"sorting": {
"fieldName": "string",
"direction": 0
}
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AssessmentViewsByTimeRangeRequest | true | details of the results to get (filters, time range) |
Example responses
200 Response
{
"results": [
{
"createdTime": "2021-04-13T17:37:24Z",
"id": 0,
"assessmentId": "00000000-0000-0000-0000-000000000000",
"triggeredBy": "Unknown",
"assessmentPassed": true,
"hasErrors": true,
"stats": {
"passed": 0,
"passedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"failed": 0,
"failedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"error": 0,
"failedTests": 0,
"logicallyTested": 0,
"failedEntities": 0,
"excludedTests": 0,
"excludedFailedTests": 0,
"excludedRules": 0,
"excludedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
}
},
"request": {
"isTemplate": true,
"id": 0,
"name": "string",
"description": "string",
"dome9CloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalCloudAccountId": "string",
"cloudAccountId": "string",
"cloudAccountType": "Aws",
"requestId": "00000000-0000-0000-0000-000000000000",
"shouldMinimizeResult": true
},
"hasDataSyncStatusIssues": true,
"comparisonCustomId": "string",
"additionalFields": {
"property1": "string",
"property2": "string"
}
}
],
"totalResultsCount": 0,
"pageNumber": 0,
"pageSize": 0,
"requestId": "00000000-0000-0000-0000-000000000000"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AssessnentHistoryViewResultsTimeRange |
Get View History
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AssessmentHistoryV2/view/{id} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AssessmentHistoryV2/view/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AssessmentHistoryV2/view/{id}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AssessmentHistoryV2/view/{id}
Get result statistics for a specific assessment
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | The ID of the assessment |
Example responses
200 Response
{
"createdTime": "2021-04-13T17:37:24Z",
"id": 0,
"assessmentId": "00000000-0000-0000-0000-000000000000",
"triggeredBy": "Unknown",
"assessmentPassed": true,
"hasErrors": true,
"stats": {
"passed": 0,
"passedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"failed": 0,
"failedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"error": 0,
"failedTests": 0,
"logicallyTested": 0,
"failedEntities": 0,
"excludedTests": 0,
"excludedFailedTests": 0,
"excludedRules": 0,
"excludedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
}
},
"request": {
"isTemplate": true,
"id": 0,
"name": "string",
"description": "string",
"dome9CloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalCloudAccountId": "string",
"cloudAccountId": "string",
"cloudAccountType": "Aws",
"requestId": "00000000-0000-0000-0000-000000000000",
"shouldMinimizeResult": true
},
"hasDataSyncStatusIssues": true,
"comparisonCustomId": "string",
"additionalFields": {
"property1": "string",
"property2": "string"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AssessmentHistoryViewResultV2 |
Get Assessment Result Csv
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AssessmentHistoryV2/csv/{assessmentResultId} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AssessmentHistoryV2/csv/{assessmentResultId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AssessmentHistoryV2/csv/{assessmentResultId}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AssessmentHistoryV2/csv/{assessmentResultId}
Get assessment result CSV
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
assessmentResultId | path | integer(int64) | true | Assessment result ID |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Get Assessment Result
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AssessmentHistoryV2/{id} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AssessmentHistoryV2/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AssessmentHistoryV2/{id}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AssessmentHistoryV2/{id}
Get results for a specific assessment
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | the id of the assessment |
Example responses
200 Response
{
"tests": [
{
"error": "string",
"testedCount": 0,
"relevantCount": 0,
"nonComplyingCount": 0,
"exclusionStats": {
"testedCount": 0,
"relevantCount": 0,
"nonComplyingCount": 0
},
"entityResults": [
{
"validationStatus": "Relevant",
"isRelevant": true,
"isValid": true,
"isExcluded": true,
"exclusionId": "00000000-0000-0000-0000-000000000000",
"remediationId": "00000000-0000-0000-0000-000000000000",
"error": "string",
"testObj": {}
}
],
"rule": {
"name": "string",
"severity": "Informational",
"logic": "string",
"description": "string",
"remediation": "string",
"complianceTag": "string",
"domain": "string",
"priority": "string",
"controlTitle": "string",
"ruleId": "string",
"category": "string",
"logicHash": "string",
"isDefault": true
},
"testPassed": true
}
],
"testEntities": {
"property1": [
{}
],
"property2": [
{}
]
},
"exclusions": [
{
"platform": "Aws",
"id": "00000000-0000-0000-0000-000000000000",
"rules": [
{
"logicHash": "string",
"id": "string",
"name": "string"
}
],
"logicExpressions": [
"string"
],
"rulesetId": 0,
"cloudAccountIds": [
"00000000-0000-0000-0000-000000000000"
],
"organizationalUnitIds": [
"00000000-0000-0000-0000-000000000000"
],
"comment": "string",
"dateRange": {
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
}
}
],
"remediations": [
{
"platform": "Aws",
"id": "00000000-0000-0000-0000-000000000000",
"rules": [
{
"logicHash": "string",
"id": "string",
"name": "string"
}
],
"logicExpressions": [
"string"
],
"rulesetId": 0,
"cloudAccountIds": [
"00000000-0000-0000-0000-000000000000"
],
"comment": "string",
"cloudBots": [
"string"
],
"organizationalUnitIds": [
"00000000-0000-0000-0000-000000000000"
],
"dateRange": {
"from": "2021-04-13T17:37:24Z",
"to": "2021-04-13T17:37:24Z"
}
}
],
"dataSyncStatus": [
{
"entityType": "string",
"recentlySuccessfulSync": true,
"generalFetchPermissionIssues": true,
"entitiesWithPermissionIssues": [
{
"externalId": "string",
"name": "string",
"cloudVendorIdentifier": "string"
}
]
}
],
"createdTime": "2021-04-13T17:37:24Z",
"id": 0,
"assessmentId": "00000000-0000-0000-0000-000000000000",
"triggeredBy": "Unknown",
"assessmentPassed": true,
"hasErrors": true,
"stats": {
"passed": 0,
"passedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"failed": 0,
"failedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
},
"error": 0,
"failedTests": 0,
"logicallyTested": 0,
"failedEntities": 0,
"excludedTests": 0,
"excludedFailedTests": 0,
"excludedRules": 0,
"excludedRulesBySeverity": {
"informational": 0,
"low": 0,
"medium": 0,
"high": 0,
"critical": 0
}
},
"request": {
"isTemplate": true,
"id": 0,
"name": "string",
"description": "string",
"dome9CloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalCloudAccountId": "string",
"cloudAccountId": "string",
"cloudAccountType": "Aws",
"requestId": "00000000-0000-0000-0000-000000000000",
"shouldMinimizeResult": true
},
"hasDataSyncStatusIssues": true,
"comparisonCustomId": "string",
"additionalFields": {
"property1": "string",
"property2": "string"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | JRaw_ |
Delete Assessment Result
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/AssessmentHistoryV2?historyId=0
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AssessmentHistoryV2?historyId=0',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/AssessmentHistoryV2', params={
'historyId': '0'
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/AssessmentHistoryV2
Delete an assessment
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
historyId | query | integer(int64) | true | the id of the assessment |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Audit
The Audit resource has methods to retrieve CloudGuard audit events. Audit events are issues such as alerts, that can be generated as a result of activity on one of a user's managed cloud accounts, or as a result of a compliance assessment on a cloud account or environment.
There are different types of audit events, and different severities.
Audit events are retrieved in pages, from earliest to latest, according to the time period, and page size set in the request. Typically the GET method should be repeated for each page of the request, until all the requested events are retrieved. A user can only retrieve audit events for their own cloud accounts.
See also
Get Event Types
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/audit/event-types \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/audit/event-types',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/audit/event-types', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/audit/event-types
Get a list of available audit event types
Example responses
200 Response
{
"property1": "string",
"property2": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|
Get Audit Events For Aws Sec Group
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/audit/awsgroup/{groupId} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/audit/awsgroup/{groupId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/audit/awsgroup/{groupId}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/audit/awsgroup/{groupId}
Get audit events for a specific AWS Security Group
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
groupId | path | integer(int64) | true | the Security Group id |
startTimestamp | query | string(date-time) | false | the time of the first event to be fetched |
endTimestamp | query | string(date-time) | false | the time of the last event to be fetched |
Example responses
200 Response
[
{
"id": {},
"cell": [
{}
],
"metadata": {
"property1": "string",
"property2": "string"
}
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AuditEntry] | none |
Export
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/audit/export \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/audit/export',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/audit/export', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/audit/export
Export an audit events report in a csv format
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
startTimestamp | query | string(date-time) | false | the time of the first event to be exported in the report |
endTimestamp | query | string(date-time) | false | the time of the last event to be exported in the report |
userNameFilter | query | string | false | only events for this specific user will be exported |
eventType | query | string | false | only events of this specific type will be exported |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Get
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/Audit?pageNum=0&eventsPerPage=0 \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/Audit?pageNum=0&eventsPerPage=0',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/Audit', params={
'pageNum': '0', 'eventsPerPage': '0'
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/Audit
Get audit events with optional filters
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
pageNum | query | integer(int32) | true | page # in the sequence of audit pages |
eventsPerPage | query | integer(int32) | true | no. of audit events in the page |
startTimestamp | query | string(date-time) | false | the time of first audit to be fetched |
endTimestamp | query | string(date-time) | false | the time of the last audit to be fetched |
userName | query | string | false | only events for this specific user will be fetched |
eventType | query | string | false | only events of this specific type will be fetched |
fim | query | boolean | false | none |
Example responses
200 Response
{
"total": 0,
"page": 0,
"records": 0,
"rows": [
{
"id": {},
"cell": [
{}
],
"metadata": {
"property1": "string",
"property2": "string"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Audit |
Get Audit Event Metadata
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/Audit/{id} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/Audit/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/Audit/{id}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/Audit/{id}
Get audit metadata
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | The audit event id |
Example responses
200 Response
{
"id": {},
"cell": [
{}
],
"metadata": {
"property1": "string",
"property2": "string"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AuditEntry |
AwsCloudConfiguration
Get By Id
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AwsCloudConfiguration/{cloudAccountId} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsCloudConfiguration/{cloudAccountId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AwsCloudConfiguration/{cloudAccountId}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AwsCloudConfiguration/{cloudAccountId}
Get cloud configuration by cloud account id
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
cloudAccountId | path | string(uuid) | true | none |
Example responses
200 Response
{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"enabled": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AwsCloudConfiguration |
Post
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AwsCloudConfiguration/{cloudAccountId} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsCloudConfiguration/{cloudAccountId}',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AwsCloudConfiguration/{cloudAccountId}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AwsCloudConfiguration/{cloudAccountId}
Add new cloud configuration
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
cloudAccountId | path | string(uuid) | true | none |
Example responses
200 Response
{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"enabled": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AwsCloudConfiguration |
Get
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AwsCloudConfiguration \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsCloudConfiguration',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AwsCloudConfiguration', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AwsCloudConfiguration
Get all cloud accounts with cloud configuration enabled or disabled
Example responses
200 Response
[
{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"enabled": true
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AwsCloudConfiguration] | none |
AwsSecurityGroup
Get All Referenced Security Groups
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AwsSecurityGroup/{id}/ReferencingGroups \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsSecurityGroup/{id}/ReferencingGroups',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AwsSecurityGroup/{id}/ReferencingGroups', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AwsSecurityGroup/{id}/ReferencingGroups
Get all referenced security groups
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Aws security group id |
Example responses
200 Response
[
{
"externalId": "string",
"regionId": "us_east_1",
"securityGroupName": "string",
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"cloudAccountName": "string",
"vpcId": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AwsSecurityGroup] | none |
Enumerated Values
Property | Value |
---|---|
regionId | us_east_1 |
regionId | us_west_1 |
regionId | eu_west_1 |
regionId | ap_southeast_1 |
regionId | ap_northeast_1 |
regionId | us_west_2 |
regionId | sa_east_1 |
regionId | az_1_region_a_geo_1 |
regionId | az_2_region_a_geo_1 |
regionId | az_3_region_a_geo_1 |
regionId | ap_southeast_2 |
regionId | mellanox_region |
regionId | us_gov_west_1 |
regionId | eu_central_1 |
regionId | ap_northeast_2 |
regionId | ap_south_1 |
regionId | us_east_2 |
regionId | ca_central_1 |
regionId | eu_west_2 |
regionId | eu_west_3 |
regionId | eu_north_1 |
regionId | cn_north_1 |
regionId | cn_northwest_1 |
regionId | us_gov_east_1 |
regionId | ap_east_1 |
regionId | me_south_1 |
regionId | af_south_1 |
regionId | eu_south_1 |
regionId | westus |
regionId | eastus |
regionId | eastus2 |
regionId | northcentralus |
regionId | westus2 |
regionId | southcentralus |
regionId | centralus |
regionId | usgovlowa |
regionId | usgovvirginia |
regionId | northeurope |
regionId | westeurope |
regionId | eastasia |
regionId | southeastasia |
regionId | japaneast |
regionId | japanwest |
regionId | brazilsouth |
regionId | australiaeast |
regionId | australiasoutheast |
regionId | centralindia |
regionId | southindia |
regionId | westindia |
regionId | canadaeast |
regionId | westcentralus |
regionId | chinaeast |
regionId | chinanorth |
regionId | canadacentral |
regionId | germanycentral |
regionId | germanynortheast |
regionId | koreacentral |
regionId | uksouth |
regionId | ukwest |
regionId | koreasouth |
regionId | francecentral |
regionId | francesouth |
regionId | germanywestcentral |
regionId | usdodcentral |
regionId | usdodeast |
regionId | usgovarizona |
regionId | usgovtexas |
regionId | australiacentral |
regionId | australiacentral2 |
regionId | chinaeast2 |
regionId | chinanorth2 |
regionId | southafricanorth |
regionId | southafricawest |
regionId | uaecentral |
regionId | uaenorth |
regionId | ussecwest |
regionId | usseceast |
regionId | germanynorth |
regionId | switzerlandwest |
regionId | norwaywest |
regionId | norwayeast |
regionId | switzerlandnorth |
regionId | asia |
regionId | asia_east1 |
regionId | asia_northeast1 |
regionId | asia_south1 |
regionId | asia_southeast1 |
regionId | australia_southeast1 |
regionId | europe |
regionId | europe_north1 |
regionId | europe_west1 |
regionId | europe_west2 |
regionId | europe_west3 |
regionId | europe_west4 |
regionId | northamerica_northeast1 |
regionId | southamerica_east1 |
regionId | us |
regionId | us_central1 |
regionId | us_east1 |
regionId | us_east4 |
regionId | us_west1 |
regionId | us_west2 |
regionId | global |
regionId | asia_east2 |
regionId | eur4 |
regionId | nam4 |
regionId | europe_west6 |
regionId | japan_west |
Get All Security Groups
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AwsSecurityGroup \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsSecurityGroup',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AwsSecurityGroup', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AwsSecurityGroup
Get all Aws security group Entities
Example responses
200 Response
[
{
"externalId": "string",
"regionId": "us_east_1",
"securityGroupName": "string",
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"cloudAccountName": "string",
"vpcId": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AwsSecurityGroup] | none |
Enumerated Values
Property | Value |
---|---|
regionId | us_east_1 |
regionId | us_west_1 |
regionId | eu_west_1 |
regionId | ap_southeast_1 |
regionId | ap_northeast_1 |
regionId | us_west_2 |
regionId | sa_east_1 |
regionId | az_1_region_a_geo_1 |
regionId | az_2_region_a_geo_1 |
regionId | az_3_region_a_geo_1 |
regionId | ap_southeast_2 |
regionId | mellanox_region |
regionId | us_gov_west_1 |
regionId | eu_central_1 |
regionId | ap_northeast_2 |
regionId | ap_south_1 |
regionId | us_east_2 |
regionId | ca_central_1 |
regionId | eu_west_2 |
regionId | eu_west_3 |
regionId | eu_north_1 |
regionId | cn_north_1 |
regionId | cn_northwest_1 |
regionId | us_gov_east_1 |
regionId | ap_east_1 |
regionId | me_south_1 |
regionId | af_south_1 |
regionId | eu_south_1 |
regionId | westus |
regionId | eastus |
regionId | eastus2 |
regionId | northcentralus |
regionId | westus2 |
regionId | southcentralus |
regionId | centralus |
regionId | usgovlowa |
regionId | usgovvirginia |
regionId | northeurope |
regionId | westeurope |
regionId | eastasia |
regionId | southeastasia |
regionId | japaneast |
regionId | japanwest |
regionId | brazilsouth |
regionId | australiaeast |
regionId | australiasoutheast |
regionId | centralindia |
regionId | southindia |
regionId | westindia |
regionId | canadaeast |
regionId | westcentralus |
regionId | chinaeast |
regionId | chinanorth |
regionId | canadacentral |
regionId | germanycentral |
regionId | germanynortheast |
regionId | koreacentral |
regionId | uksouth |
regionId | ukwest |
regionId | koreasouth |
regionId | francecentral |
regionId | francesouth |
regionId | germanywestcentral |
regionId | usdodcentral |
regionId | usdodeast |
regionId | usgovarizona |
regionId | usgovtexas |
regionId | australiacentral |
regionId | australiacentral2 |
regionId | chinaeast2 |
regionId | chinanorth2 |
regionId | southafricanorth |
regionId | southafricawest |
regionId | uaecentral |
regionId | uaenorth |
regionId | ussecwest |
regionId | usseceast |
regionId | germanynorth |
regionId | switzerlandwest |
regionId | norwaywest |
regionId | norwayeast |
regionId | switzerlandnorth |
regionId | asia |
regionId | asia_east1 |
regionId | asia_northeast1 |
regionId | asia_south1 |
regionId | asia_southeast1 |
regionId | australia_southeast1 |
regionId | europe |
regionId | europe_north1 |
regionId | europe_west1 |
regionId | europe_west2 |
regionId | europe_west3 |
regionId | europe_west4 |
regionId | northamerica_northeast1 |
regionId | southamerica_east1 |
regionId | us |
regionId | us_central1 |
regionId | us_east1 |
regionId | us_east4 |
regionId | us_west1 |
regionId | us_west2 |
regionId | global |
regionId | asia_east2 |
regionId | eur4 |
regionId | nam4 |
regionId | europe_west6 |
regionId | japan_west |
AwsSecurityGroupPolicy
Get By Cloud Account
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{id} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{id}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AwsSecurityGroupPolicy/CloudAccount/{id}
Get all security groups policies of cloud account by cloud account id
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | cloud account id |
Example responses
200 Response
[
{
"externalId": "string",
"isProtected": true,
"securityGroupName": "string",
"description": "string",
"vpcId": "string",
"vpcName": "string",
"regionId": "us_east_1",
"cloudAccountId": "string",
"cloudAccountName": "string",
"tags": {
"property1": "string",
"property2": "string"
},
"securityGroupId": "00000000-0000-0000-0000-000000000000",
"srl": "string",
"inboundServices": [
{
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
],
"outboundServices": [
{
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [CloudSecurityGroupPolicy] | none |
Enumerated Values
Property | Value |
---|---|
regionId | us_east_1 |
regionId | us_west_1 |
regionId | eu_west_1 |
regionId | ap_southeast_1 |
regionId | ap_northeast_1 |
regionId | us_west_2 |
regionId | sa_east_1 |
regionId | az_1_region_a_geo_1 |
regionId | az_2_region_a_geo_1 |
regionId | az_3_region_a_geo_1 |
regionId | ap_southeast_2 |
regionId | mellanox_region |
regionId | us_gov_west_1 |
regionId | eu_central_1 |
regionId | ap_northeast_2 |
regionId | ap_south_1 |
regionId | us_east_2 |
regionId | ca_central_1 |
regionId | eu_west_2 |
regionId | eu_west_3 |
regionId | eu_north_1 |
regionId | cn_north_1 |
regionId | cn_northwest_1 |
regionId | us_gov_east_1 |
regionId | ap_east_1 |
regionId | me_south_1 |
regionId | af_south_1 |
regionId | eu_south_1 |
regionId | westus |
regionId | eastus |
regionId | eastus2 |
regionId | northcentralus |
regionId | westus2 |
regionId | southcentralus |
regionId | centralus |
regionId | usgovlowa |
regionId | usgovvirginia |
regionId | northeurope |
regionId | westeurope |
regionId | eastasia |
regionId | southeastasia |
regionId | japaneast |
regionId | japanwest |
regionId | brazilsouth |
regionId | australiaeast |
regionId | australiasoutheast |
regionId | centralindia |
regionId | southindia |
regionId | westindia |
regionId | canadaeast |
regionId | westcentralus |
regionId | chinaeast |
regionId | chinanorth |
regionId | canadacentral |
regionId | germanycentral |
regionId | germanynortheast |
regionId | koreacentral |
regionId | uksouth |
regionId | ukwest |
regionId | koreasouth |
regionId | francecentral |
regionId | francesouth |
regionId | germanywestcentral |
regionId | usdodcentral |
regionId | usdodeast |
regionId | usgovarizona |
regionId | usgovtexas |
regionId | australiacentral |
regionId | australiacentral2 |
regionId | chinaeast2 |
regionId | chinanorth2 |
regionId | southafricanorth |
regionId | southafricawest |
regionId | uaecentral |
regionId | uaenorth |
regionId | ussecwest |
regionId | usseceast |
regionId | germanynorth |
regionId | switzerlandwest |
regionId | norwaywest |
regionId | norwayeast |
regionId | switzerlandnorth |
regionId | asia |
regionId | asia_east1 |
regionId | asia_northeast1 |
regionId | asia_south1 |
regionId | asia_southeast1 |
regionId | australia_southeast1 |
regionId | europe |
regionId | europe_north1 |
regionId | europe_west1 |
regionId | europe_west2 |
regionId | europe_west3 |
regionId | europe_west4 |
regionId | northamerica_northeast1 |
regionId | southamerica_east1 |
regionId | us |
regionId | us_central1 |
regionId | us_east1 |
regionId | us_east4 |
regionId | us_west1 |
regionId | us_west2 |
regionId | global |
regionId | asia_east2 |
regionId | eur4 |
regionId | nam4 |
regionId | europe_west6 |
regionId | japan_west |
protocolType | ALL |
protocolType | HOPOPT |
protocolType | ICMP |
protocolType | IGMP |
protocolType | GGP |
protocolType | IPV4 |
protocolType | ST |
protocolType | TCP |
protocolType | CBT |
protocolType | EGP |
protocolType | IGP |
protocolType | BBN_RCC_MON |
protocolType | NVP2 |
protocolType | PUP |
protocolType | ARGUS |
protocolType | EMCON |
protocolType | XNET |
protocolType | CHAOS |
protocolType | UDP |
protocolType | MUX |
protocolType | DCN_MEAS |
protocolType | HMP |
protocolType | PRM |
protocolType | XNS_IDP |
protocolType | TRUNK1 |
protocolType | TRUNK2 |
protocolType | LEAF1 |
protocolType | LEAF2 |
protocolType | RDP |
protocolType | IRTP |
protocolType | ISO_TP4 |
protocolType | NETBLT |
protocolType | MFE_NSP |
protocolType | MERIT_INP |
protocolType | DCCP |
protocolType | ThreePC |
protocolType | IDPR |
protocolType | XTP |
protocolType | DDP |
protocolType | IDPR_CMTP |
protocolType | TPplusplus |
protocolType | IL |
protocolType | IPV6 |
protocolType | SDRP |
protocolType | IPV6_ROUTE |
protocolType | IPV6_FRAG |
protocolType | IDRP |
protocolType | RSVP |
protocolType | GRE |
protocolType | DSR |
protocolType | BNA |
protocolType | ESP |
protocolType | AH |
protocolType | I_NLSP |
protocolType | SWIPE |
protocolType | NARP |
protocolType | MOBILE |
protocolType | TLSP |
protocolType | SKIP |
protocolType | ICMPV6 |
protocolType | IPV6_NONXT |
protocolType | IPV6_OPTS |
protocolType | CFTP |
protocolType | SAT_EXPAK |
protocolType | KRYPTOLAN |
protocolType | RVD |
protocolType | IPPC |
protocolType | SAT_MON |
protocolType | VISA |
protocolType | IPCV |
protocolType | CPNX |
protocolType | CPHB |
protocolType | WSN |
protocolType | PVP |
protocolType | BR_SAT_MON |
protocolType | SUN_ND |
protocolType | WB_MON |
protocolType | WB_EXPAK |
protocolType | ISO_IP |
protocolType | VMTP |
protocolType | SECURE_VMTP |
protocolType | VINES |
protocolType | TTP |
protocolType | NSFNET_IGP |
protocolType | DGP |
protocolType | TCF |
protocolType | EIGRP |
protocolType | OSPFIGP |
protocolType | SPRITE_RPC |
protocolType | LARP |
protocolType | MTP |
protocolType | AX25 |
protocolType | IPIP |
protocolType | MICP |
protocolType | SCC_SP |
protocolType | ETHERIP |
protocolType | ENCAP |
protocolType | GMTP |
protocolType | IFMP |
protocolType | PNNI |
protocolType | PIM |
protocolType | ARIS |
protocolType | SCPS |
protocolType | QNX |
protocolType | AN |
protocolType | IPCOMP |
protocolType | SNP |
protocolType | COMPAQ_PEER |
protocolType | IPX_IN_IP |
protocolType | VRRP |
protocolType | PGM |
protocolType | L2TP |
protocolType | DDX |
protocolType | IATP |
protocolType | STP |
protocolType | SRP |
protocolType | UTI |
protocolType | SMP |
protocolType | SM |
protocolType | PTP |
protocolType | ISIS |
protocolType | FIRE |
protocolType | CRTP |
protocolType | CRUDP |
protocolType | SSCOPMCE |
protocolType | IPLT |
protocolType | SPS |
protocolType | PIPE |
protocolType | SCTP |
protocolType | FC |
protocolType | RSVP_E2E_IGNORE |
protocolType | MOBILITY_HEADER |
protocolType | UDPLITE |
protocolType | MPLS_IN_IP |
protocolType | MANET |
protocolType | HIP |
protocolType | SHIM6 |
protocolType | WESP |
protocolType | ROHC |
type | CIDR |
type | DNS |
type | IPList |
type | MagicIP |
type | AWS |
type | Tag |
type | ASG |
type | CIDRv6 |
type | PrefixList |
icmpType | All |
icmpType | EchoReply |
icmpType | DestinationUnreachable |
icmpType | SourceQuench |
icmpType | Redirect |
icmpType | AlternateHostAddress |
icmpType | Echo |
icmpType | RouterAdvertisement |
icmpType | RouterSelection |
icmpType | TimeExceeded |
icmpType | ParameterProblem |
icmpType | Timestamp |
icmpType | TimestampReply |
icmpType | InformationRequest |
icmpType | InformationReply |
icmpType | AddressMaskRequest |
icmpType | AddressMaskReply |
icmpType | Traceroute |
icmpType | DatagramConversionError |
icmpType | MobileHostRedirect |
icmpType | IPv6WhereAreYou |
icmpType | IPv6IAmHere |
icmpType | MobileRegistrationRequest |
icmpType | MobileRegistrationReply |
icmpType | DomainNameRequest |
icmpType | DomainNameReply |
icmpType | SKIP |
icmpType | Photuris |
icmpv6Type | All |
Get By External Security Group Id
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}
Get security group policy by external security group id and cloud account id
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
cloudAccountId | path | string(uuid) | true | Cloud account id |
externalId | path | string | true | Aws security group id |
Example responses
200 Response
{
"externalId": "string",
"isProtected": true,
"securityGroupName": "string",
"description": "string",
"vpcId": "string",
"vpcName": "string",
"regionId": "us_east_1",
"cloudAccountId": "string",
"cloudAccountName": "string",
"tags": {
"property1": "string",
"property2": "string"
},
"securityGroupId": "00000000-0000-0000-0000-000000000000",
"srl": "string",
"inboundServices": [
{
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
],
"outboundServices": [
{
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CloudSecurityGroupPolicy |
Delete Cloud Security Group
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}
Delete an AWS security group
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
cloudAccountId | path | string(uuid) | true | Cloud account id |
externalId | path | string | true | Aws security group id |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Post Protection Mode
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/ProtectionMode \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"protectionMode": "FullManage"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/ProtectionMode',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/ProtectionMode', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/ProtectionMode
Update protection mode to security group
Body parameter
{
"protectionMode": "FullManage"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
cloudAccountId | path | string(uuid) | true | Cloud account id |
externalId | path | string | true | Aws security group id |
body | body | CloudSecurityGroupProtectionModeChange | true | protectionMode: FullManage / ReadOnly |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Update Service In Security Group
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType} \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType}',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType}
Update a service (rule) for an AWS security group
Body parameter
{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
cloudAccountId | path | string(uuid) | true | Cloud account id |
externalId | path | string | true | Aws security group id |
policyType | path | string | true | the service type (Inbound / Outbound) |
body | body | CloudSecurityGroupService | true | updated details for the service |
Enumerated Values
Parameter | Value |
---|---|
policyType | Inbound |
policyType | Outbound |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Add Service To Security Group
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType} \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType}',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType}
Creat a new Service (rule) for the security group
Body parameter
{
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
cloudAccountId | path | string(uuid) | true | Cloud account id |
externalId | path | string | true | Aws security group id |
policyType | path | string | true | the service type (Inbound / Outbound)) |
body | body | CloudSecurityGroupPolicyService | true | details for the service |
Enumerated Values
Parameter | Value |
---|---|
policyType | Inbound |
policyType | Outbound |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Delete Service From Security Group
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType}/{serviceId}
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType}/{serviceId}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType}/{serviceId}', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/Services/{policyType}/{serviceId}
Delete a service (rule) from an AWS security group
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
cloudAccountId | path | string(uuid) | true | Cloud account id |
externalId | path | string | true | Aws security group id |
policyType | path | string | true | the service type (Inbound / Outbound) |
serviceId | path | string | true | the service id |
Enumerated Values
Parameter | Value |
---|---|
policyType | Inbound |
policyType | Outbound |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Update Tags
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/tags \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"tags": {
"property1": "string",
"property2": "string"
}
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/tags',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/tags', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AwsSecurityGroupPolicy/CloudAccount/{cloudAccountId}/Policy/{externalId}/tags
Update tags
Body parameter
{
"tags": {
"property1": "string",
"property2": "string"
}
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
cloudAccountId | path | string(uuid) | true | Cloud account id |
externalId | path | string | true | Aws security group id |
body | body | CloudSecurityGroupTagsChange | true | Tags model - {{ "key" : "value" }} |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Get All Security Groups Of Account
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AwsSecurityGroupPolicy \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsSecurityGroupPolicy',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AwsSecurityGroupPolicy', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AwsSecurityGroupPolicy
Get a list of all security groups
Example responses
200 Response
[
{
"externalId": "string",
"isProtected": true,
"securityGroupName": "string",
"description": "string",
"vpcId": "string",
"vpcName": "string",
"regionId": "us_east_1",
"cloudAccountId": "string",
"cloudAccountName": "string",
"tags": {
"property1": "string",
"property2": "string"
},
"securityGroupId": "00000000-0000-0000-0000-000000000000",
"srl": "string",
"inboundServices": [
{
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
],
"outboundServices": [
{
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
]
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [CloudSecurityGroupPolicy] | none |
Enumerated Values
Property | Value |
---|---|
regionId | us_east_1 |
regionId | us_west_1 |
regionId | eu_west_1 |
regionId | ap_southeast_1 |
regionId | ap_northeast_1 |
regionId | us_west_2 |
regionId | sa_east_1 |
regionId | az_1_region_a_geo_1 |
regionId | az_2_region_a_geo_1 |
regionId | az_3_region_a_geo_1 |
regionId | ap_southeast_2 |
regionId | mellanox_region |
regionId | us_gov_west_1 |
regionId | eu_central_1 |
regionId | ap_northeast_2 |
regionId | ap_south_1 |
regionId | us_east_2 |
regionId | ca_central_1 |
regionId | eu_west_2 |
regionId | eu_west_3 |
regionId | eu_north_1 |
regionId | cn_north_1 |
regionId | cn_northwest_1 |
regionId | us_gov_east_1 |
regionId | ap_east_1 |
regionId | me_south_1 |
regionId | af_south_1 |
regionId | eu_south_1 |
regionId | westus |
regionId | eastus |
regionId | eastus2 |
regionId | northcentralus |
regionId | westus2 |
regionId | southcentralus |
regionId | centralus |
regionId | usgovlowa |
regionId | usgovvirginia |
regionId | northeurope |
regionId | westeurope |
regionId | eastasia |
regionId | southeastasia |
regionId | japaneast |
regionId | japanwest |
regionId | brazilsouth |
regionId | australiaeast |
regionId | australiasoutheast |
regionId | centralindia |
regionId | southindia |
regionId | westindia |
regionId | canadaeast |
regionId | westcentralus |
regionId | chinaeast |
regionId | chinanorth |
regionId | canadacentral |
regionId | germanycentral |
regionId | germanynortheast |
regionId | koreacentral |
regionId | uksouth |
regionId | ukwest |
regionId | koreasouth |
regionId | francecentral |
regionId | francesouth |
regionId | germanywestcentral |
regionId | usdodcentral |
regionId | usdodeast |
regionId | usgovarizona |
regionId | usgovtexas |
regionId | australiacentral |
regionId | australiacentral2 |
regionId | chinaeast2 |
regionId | chinanorth2 |
regionId | southafricanorth |
regionId | southafricawest |
regionId | uaecentral |
regionId | uaenorth |
regionId | ussecwest |
regionId | usseceast |
regionId | germanynorth |
regionId | switzerlandwest |
regionId | norwaywest |
regionId | norwayeast |
regionId | switzerlandnorth |
regionId | asia |
regionId | asia_east1 |
regionId | asia_northeast1 |
regionId | asia_south1 |
regionId | asia_southeast1 |
regionId | australia_southeast1 |
regionId | europe |
regionId | europe_north1 |
regionId | europe_west1 |
regionId | europe_west2 |
regionId | europe_west3 |
regionId | europe_west4 |
regionId | northamerica_northeast1 |
regionId | southamerica_east1 |
regionId | us |
regionId | us_central1 |
regionId | us_east1 |
regionId | us_east4 |
regionId | us_west1 |
regionId | us_west2 |
regionId | global |
regionId | asia_east2 |
regionId | eur4 |
regionId | nam4 |
regionId | europe_west6 |
regionId | japan_west |
protocolType | ALL |
protocolType | HOPOPT |
protocolType | ICMP |
protocolType | IGMP |
protocolType | GGP |
protocolType | IPV4 |
protocolType | ST |
protocolType | TCP |
protocolType | CBT |
protocolType | EGP |
protocolType | IGP |
protocolType | BBN_RCC_MON |
protocolType | NVP2 |
protocolType | PUP |
protocolType | ARGUS |
protocolType | EMCON |
protocolType | XNET |
protocolType | CHAOS |
protocolType | UDP |
protocolType | MUX |
protocolType | DCN_MEAS |
protocolType | HMP |
protocolType | PRM |
protocolType | XNS_IDP |
protocolType | TRUNK1 |
protocolType | TRUNK2 |
protocolType | LEAF1 |
protocolType | LEAF2 |
protocolType | RDP |
protocolType | IRTP |
protocolType | ISO_TP4 |
protocolType | NETBLT |
protocolType | MFE_NSP |
protocolType | MERIT_INP |
protocolType | DCCP |
protocolType | ThreePC |
protocolType | IDPR |
protocolType | XTP |
protocolType | DDP |
protocolType | IDPR_CMTP |
protocolType | TPplusplus |
protocolType | IL |
protocolType | IPV6 |
protocolType | SDRP |
protocolType | IPV6_ROUTE |
protocolType | IPV6_FRAG |
protocolType | IDRP |
protocolType | RSVP |
protocolType | GRE |
protocolType | DSR |
protocolType | BNA |
protocolType | ESP |
protocolType | AH |
protocolType | I_NLSP |
protocolType | SWIPE |
protocolType | NARP |
protocolType | MOBILE |
protocolType | TLSP |
protocolType | SKIP |
protocolType | ICMPV6 |
protocolType | IPV6_NONXT |
protocolType | IPV6_OPTS |
protocolType | CFTP |
protocolType | SAT_EXPAK |
protocolType | KRYPTOLAN |
protocolType | RVD |
protocolType | IPPC |
protocolType | SAT_MON |
protocolType | VISA |
protocolType | IPCV |
protocolType | CPNX |
protocolType | CPHB |
protocolType | WSN |
protocolType | PVP |
protocolType | BR_SAT_MON |
protocolType | SUN_ND |
protocolType | WB_MON |
protocolType | WB_EXPAK |
protocolType | ISO_IP |
protocolType | VMTP |
protocolType | SECURE_VMTP |
protocolType | VINES |
protocolType | TTP |
protocolType | NSFNET_IGP |
protocolType | DGP |
protocolType | TCF |
protocolType | EIGRP |
protocolType | OSPFIGP |
protocolType | SPRITE_RPC |
protocolType | LARP |
protocolType | MTP |
protocolType | AX25 |
protocolType | IPIP |
protocolType | MICP |
protocolType | SCC_SP |
protocolType | ETHERIP |
protocolType | ENCAP |
protocolType | GMTP |
protocolType | IFMP |
protocolType | PNNI |
protocolType | PIM |
protocolType | ARIS |
protocolType | SCPS |
protocolType | QNX |
protocolType | AN |
protocolType | IPCOMP |
protocolType | SNP |
protocolType | COMPAQ_PEER |
protocolType | IPX_IN_IP |
protocolType | VRRP |
protocolType | PGM |
protocolType | L2TP |
protocolType | DDX |
protocolType | IATP |
protocolType | STP |
protocolType | SRP |
protocolType | UTI |
protocolType | SMP |
protocolType | SM |
protocolType | PTP |
protocolType | ISIS |
protocolType | FIRE |
protocolType | CRTP |
protocolType | CRUDP |
protocolType | SSCOPMCE |
protocolType | IPLT |
protocolType | SPS |
protocolType | PIPE |
protocolType | SCTP |
protocolType | FC |
protocolType | RSVP_E2E_IGNORE |
protocolType | MOBILITY_HEADER |
protocolType | UDPLITE |
protocolType | MPLS_IN_IP |
protocolType | MANET |
protocolType | HIP |
protocolType | SHIM6 |
protocolType | WESP |
protocolType | ROHC |
type | CIDR |
type | DNS |
type | IPList |
type | MagicIP |
type | AWS |
type | Tag |
type | ASG |
type | CIDRv6 |
type | PrefixList |
icmpType | All |
icmpType | EchoReply |
icmpType | DestinationUnreachable |
icmpType | SourceQuench |
icmpType | Redirect |
icmpType | AlternateHostAddress |
icmpType | Echo |
icmpType | RouterAdvertisement |
icmpType | RouterSelection |
icmpType | TimeExceeded |
icmpType | ParameterProblem |
icmpType | Timestamp |
icmpType | TimestampReply |
icmpType | InformationRequest |
icmpType | InformationReply |
icmpType | AddressMaskRequest |
icmpType | AddressMaskReply |
icmpType | Traceroute |
icmpType | DatagramConversionError |
icmpType | MobileHostRedirect |
icmpType | IPv6WhereAreYou |
icmpType | IPv6IAmHere |
icmpType | MobileRegistrationRequest |
icmpType | MobileRegistrationReply |
icmpType | DomainNameRequest |
icmpType | DomainNameReply |
icmpType | SKIP |
icmpType | Photuris |
icmpv6Type | All |
Create Aws Security Group
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AwsSecurityGroupPolicy \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"externalId": "string",
"isProtected": true,
"securityGroupName": "string",
"description": "string",
"vpcId": "string",
"vpcName": "string",
"regionId": "us_east_1",
"cloudAccountId": "string",
"cloudAccountName": "string",
"tags": {
"property1": "string",
"property2": "string"
}
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AwsSecurityGroupPolicy',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AwsSecurityGroupPolicy', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AwsSecurityGroupPolicy
Create a new AWS security group
Body parameter
{
"externalId": "string",
"isProtected": true,
"securityGroupName": "string",
"description": "string",
"vpcId": "string",
"vpcName": "string",
"regionId": "us_east_1",
"cloudAccountId": "string",
"cloudAccountName": "string",
"tags": {
"property1": "string",
"property2": "string"
}
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | CloudSecurityGroupBase | true | details for the new AWS security group |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
AzureCloudAccount
The AzureCloudAccounts resource has methods to onboard Azure cloud accounts to CloudGuard and to manage some of their settings. It is can be used to automatically or programatically onboard Azure accounts into a CloudGuard account, or to set global settings such as the Region Configuration (used for network security management).
See also
Onboard an Azure Subscription to CloudGuard
Onboard an Azure account using the CloudGuard API
Delete Force
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/AzureCloudAccount/{id}/DeleteForce
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AzureCloudAccount/{id}/DeleteForce',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/AzureCloudAccount/{id}/DeleteForce', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/AzureCloudAccount/{id}/DeleteForce
Delete an Azure account from a Dome9 account (the Azure account is not deleted from Azure) and linked entities
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the Dome9 account id for the account or the Subscription id |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Get Missing Permissions
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AzureCloudAccount/{id}/MissingPermissions \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount/{id}/MissingPermissions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AzureCloudAccount/{id}/MissingPermissions', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AzureCloudAccount/{id}/MissingPermissions
Get a list of missing permissions for a specific Azure account in a Dome9 account
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the account id for the Azure account in Dome9 |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"actions": [
{
"type": "string",
"subType": "string",
"total": 0,
"error": {
"code": "string",
"message": "string"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CloudAccountMissingPermissions |
Get Mising Permissions By Entity Type
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AzureCloudAccount/{id}/MissingPermissions/EntityType?entityType=string \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount/{id}/MissingPermissions/EntityType?entityType=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AzureCloudAccount/{id}/MissingPermissions/EntityType', params={
'entityType': 'string'
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AzureCloudAccount/{id}/MissingPermissions/EntityType
Get a list of missing permissions for a specific cloud entity type and Azure cloud account
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the account id for the Azure account in Dome9 |
entityType | query | string | true | the entity type |
subType | query | string | false | the entity subtype |
Example responses
200 Response
[
{
"srl": "string",
"consecutiveFails": 0,
"lastFail": "2021-04-13T17:37:24Z",
"lastSuccess": "2021-04-13T17:37:24Z",
"firstFail": "2021-04-13T17:37:24Z",
"lastFailErrorCode": "string",
"lastFailMessage": "string",
"id": "00000000-0000-0000-0000-000000000000",
"retryMetadata": {
"permissions": [
"string"
],
"entityType": "string",
"subType": "string"
},
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"vendor": "aws"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [MissingPermission] | none |
Enumerated Values
Property | Value |
---|---|
vendor | aws |
vendor | hp |
vendor | mellanox |
vendor | awsgov |
vendor | azure |
vendor | |
vendor | awschina |
vendor | azuregov |
vendor | kubernetes |
vendor | azurechina |
vendor | terraform |
vendor | generic |
vendor | kubernetesruntimeassurance |
vendor | shiftleft |
vendor | sourcecodeassurance |
vendor | imageassurance |
vendor | alibaba |
Reset Missing Permissions
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AzureCloudAccount/{id}/MissingPermissions/Reset
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AzureCloudAccount/{id}/MissingPermissions/Reset',
{
method: 'PUT'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.put('https://api.dome9.com/v2/AzureCloudAccount/{id}/MissingPermissions/Reset', params={
, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AzureCloudAccount/{id}/MissingPermissions/Reset
Reset (re-validate) the missing permissions indication for an Azure account in Dome9
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the account id for the Azure account in Dome9 |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Update Operation Mode
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AzureCloudAccount/{id}/OperationMode \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"operationMode": "Read"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount/{id}/OperationMode',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AzureCloudAccount/{id}/OperationMode', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AzureCloudAccount/{id}/OperationMode
Update the operations mode for an Azure account in Dome9. Modes can be Read-Only or Manage
Body parameter
{
"operationMode": "Read"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the account id for the Azure account in Dome9 |
body | body | AzureAccountOperationMode | true | updated details for the account, including the operations mode |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"subscriptionId": "string",
"tenantId": "string",
"credentials": {
"clientId": "string",
"clientPassword": "string"
},
"operationMode": "Read",
"error": "string",
"creationDate": "2021-04-13T17:37:24Z",
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws",
"magellan": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AzureCloudAccount |
Update Account Name
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AzureCloudAccount/{id}/AccountName \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"name": "string"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount/{id}/AccountName',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AzureCloudAccount/{id}/AccountName', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AzureCloudAccount/{id}/AccountName
Update the account name (in Dome9) for an Azure account
Body parameter
{
"name": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the account id in Dome9 |
body | body | AzureAccountNameMode | true | the new name for the account |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"subscriptionId": "string",
"tenantId": "string",
"credentials": {
"clientId": "string",
"clientPassword": "string"
},
"operationMode": "Read",
"error": "string",
"creationDate": "2021-04-13T17:37:24Z",
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws",
"magellan": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AzureCloudAccount |
Update Cloud Account Credentials
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AzureCloudAccount/{id}/Credentials \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"applicationId": "string",
"applicationKey": "string"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount/{id}/Credentials',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AzureCloudAccount/{id}/Credentials', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AzureCloudAccount/{id}/Credentials
Body parameter
{
"applicationId": "string",
"applicationKey": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | none |
body | body | AzureCloudAccountCredentialsPut | true | none |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Sync Now
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AzureCloudAccount/{id}/SyncNow \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount/{id}/SyncNow',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AzureCloudAccount/{id}/SyncNow', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AzureCloudAccount/{id}/SyncNow
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | none |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"subscriptionId": "string",
"tenantId": "string",
"credentials": {
"clientId": "string",
"clientPassword": "string"
},
"operationMode": "Read",
"error": "string",
"creationDate": "2021-04-13T17:37:24Z",
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws",
"magellan": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AzureCloudAccount |
Update Organziational Id
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AzureCloudAccount/{id}/organizationalUnit \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount/{id}/organizationalUnit',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AzureCloudAccount/{id}/organizationalUnit', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AzureCloudAccount/{id}/organizationalUnit
Update the ID of the Organizational Unit that this cloud account will be attached to. Use 'null' for th root organizational unit
Body parameter
{
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | The Dome9 Guid ID of the Azure cloud account |
body | body | UpdateIdViewModel3 | true | The Guid ID of the Organizational Unit to attach to. Use 'null' to attach to the root Organizational Unit |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"subscriptionId": "string",
"tenantId": "string",
"credentials": {
"clientId": "string",
"clientPassword": "string"
},
"operationMode": "Read",
"error": "string",
"creationDate": "2021-04-13T17:37:24Z",
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws",
"magellan": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AzureCloudAccount |
Move Cloud Accounts To Organizational Unit
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AzureCloudAccount/organizationalUnit/move \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"sourceOrganizationalUnitId": "00000000-0000-0000-0000-000000000000",
"targetOrganizationalUnitId": "00000000-0000-0000-0000-000000000000"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount/organizationalUnit/move',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AzureCloudAccount/organizationalUnit/move', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AzureCloudAccount/organizationalUnit/move
Detach cloud accounts from an Organizational unit and attach them to another Organizational unit. Use 'null' for root organizational unit
Body parameter
{
"sourceOrganizationalUnitId": "00000000-0000-0000-0000-000000000000",
"targetOrganizationalUnitId": "00000000-0000-0000-0000-000000000000"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | MoveOrganizationalUnit | true | The guids of the source organizational unit to detach from and the target organizational unit to attach to. Use null for root organizational unit. |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Move All Cloud Accounts To Organizational Unit
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AzureCloudAccount/organizationalUnit/moveAll \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount/organizationalUnit/moveAll',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AzureCloudAccount/organizationalUnit/moveAll', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AzureCloudAccount/organizationalUnit/moveAll
Detach all cloud accounts from their current organizational unit and attach them to a new one. Default is to root organizational unit
Body parameter
{
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | UpdateIdViewModel2 | true | none |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Post Attach Multi
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AzureCloudAccount/organizationalUnit/attach \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"entries": [
"string"
],
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount/organizationalUnit/attach',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AzureCloudAccount/organizationalUnit/attach', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AzureCloudAccount/organizationalUnit/attach
Attach several cloud accounts to a specific Organizational Unit. User 'null' as root Organizational Unit as target
Body parameter
{
"entries": [
"string"
],
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AttachCloudAccounts | true | none |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Get
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AzureCloudAccount \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AzureCloudAccount', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AzureCloudAccount
Get details for all Azure accounts for the Dome9 user
Example responses
200 Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"subscriptionId": "string",
"tenantId": "string",
"credentials": {
"clientId": "string",
"clientPassword": "string"
},
"operationMode": "Read",
"error": "string",
"creationDate": "2021-04-13T17:37:24Z",
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws",
"magellan": true
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AzureCloudAccount] | none |
Enumerated Values
Property | Value |
---|---|
operationMode | Read |
operationMode | Manage |
vendor | aws |
vendor | hp |
vendor | mellanox |
vendor | awsgov |
vendor | azure |
vendor | |
vendor | awschina |
vendor | azuregov |
vendor | kubernetes |
vendor | azurechina |
vendor | terraform |
vendor | generic |
vendor | kubernetesruntimeassurance |
vendor | shiftleft |
vendor | sourcecodeassurance |
vendor | imageassurance |
vendor | alibaba |
Delete
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/AzureCloudAccount/{id}
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AzureCloudAccount/{id}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/AzureCloudAccount/{id}', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/AzureCloudAccount/{id}
Delete an Azure account from a Dome9 account (the Azure account is not deleted from Azure)
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the Dome9 account id for the account or the Subscription id |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Post
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AzureCloudAccount \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"subscriptionId": "string",
"tenantId": "string",
"credentials": {
"clientId": "string",
"clientPassword": "string"
},
"operationMode": "Read",
"error": "string",
"creationDate": "2021-04-13T17:37:24Z",
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws",
"magellan": true
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureCloudAccount',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AzureCloudAccount', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AzureCloudAccount
Add (onboard) an Azure account to the user's Dome9 account
Body parameter
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"subscriptionId": "string",
"tenantId": "string",
"credentials": {
"clientId": "string",
"clientPassword": "string"
},
"operationMode": "Read",
"error": "string",
"creationDate": "2021-04-13T17:37:24Z",
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"vendor": "aws",
"magellan": true
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AzureCloudAccount | true | details for the Azure account |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
AzureSecurityGroupPolicy
The AzureSecurityGroupPolicy resource has methods to add and manage Azure security group policies for Azure cloud accounts that are managed by CloudGuard. Among the managment operations are methods to add services (rules) to security groups.
See also
Get
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AzureSecurityGroupPolicy \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureSecurityGroupPolicy',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AzureSecurityGroupPolicy', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AzureSecurityGroupPolicy
Get a list of all Network Security Group Policies for the Azure accounts in the Dome9 account
Example responses
200 Response
[
{
"tags": [
{
"key": "string",
"value": "string"
}
],
"id": "00000000-0000-0000-0000-000000000000",
"externalSecurityGroupId": "string",
"accountId": 0,
"cloudAccountName": "string",
"lastUpdatedByDome9": true,
"error": {
"action": "string",
"errorMessage": "string"
},
"inboundServices": [
{
"direction": "string",
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"outboundServices": [
{
"direction": "string",
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"region": "string",
"resourceGroup": "string",
"isTamperProtected": true
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AzureSgPolicyGet] | none |
Enumerated Values
Property | Value |
---|---|
type | CIDR |
type | DNS |
type | IPList |
type | MagicIP |
type | AWS |
type | Tag |
type | ASG |
type | CIDRv6 |
type | PrefixList |
Put
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AzureSecurityGroupPolicy/{id} \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"tags": [
{
"key": "string",
"value": "string"
}
],
"inboundServices": [
{
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"outboundServices": [
{
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"region": "string",
"resourceGroup": "string",
"isTamperProtected": true
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureSecurityGroupPolicy/{id}',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AzureSecurityGroupPolicy/{id}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AzureSecurityGroupPolicy/{id}
Update a security group policy
Body parameter
{
"tags": [
{
"key": "string",
"value": "string"
}
],
"inboundServices": [
{
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"outboundServices": [
{
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"region": "string",
"resourceGroup": "string",
"isTamperProtected": true
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the security group policy id |
body | body | AzureSgPolicyPost | true | details for the policy, including the changes |
Example responses
200 Response
{
"tags": [
{
"key": "string",
"value": "string"
}
],
"id": "00000000-0000-0000-0000-000000000000",
"externalSecurityGroupId": "string",
"accountId": 0,
"cloudAccountName": "string",
"lastUpdatedByDome9": true,
"error": {
"action": "string",
"errorMessage": "string"
},
"inboundServices": [
{
"direction": "string",
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"outboundServices": [
{
"direction": "string",
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"region": "string",
"resourceGroup": "string",
"isTamperProtected": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AzureSgPolicyGet |
Delete
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/AzureSecurityGroupPolicy/{id}
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/AzureSecurityGroupPolicy/{id}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/AzureSecurityGroupPolicy/{id}', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/AzureSecurityGroupPolicy/{id}
Delete a security group policy
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | the security group policy id |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Update Protection Mode
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/AzureSecurityGroupPolicy/{policyId}/TamperProtected?tamperProtected=true \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureSecurityGroupPolicy/{policyId}/TamperProtected?tamperProtected=true',
{
method: 'PUT',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/AzureSecurityGroupPolicy/{policyId}/TamperProtected', params={
'tamperProtected': 'true'
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/AzureSecurityGroupPolicy/{policyId}/TamperProtected
Enable or disable Tamper Protetion for a specific security group policy
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
policyId | path | string(uuid) | true | the security group policy id> |
tamperProtected | query | boolean | true | enable/disable Tamper protection |
Example responses
200 Response
{
"tags": [
{
"key": "string",
"value": "string"
}
],
"id": "00000000-0000-0000-0000-000000000000",
"externalSecurityGroupId": "string",
"accountId": 0,
"cloudAccountName": "string",
"lastUpdatedByDome9": true,
"error": {
"action": "string",
"errorMessage": "string"
},
"inboundServices": [
{
"direction": "string",
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"outboundServices": [
{
"direction": "string",
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"region": "string",
"resourceGroup": "string",
"isTamperProtected": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AzureSgPolicyGet |
Get Stats
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/AzureSecurityGroupPolicy/Stats \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureSecurityGroupPolicy/Stats',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/AzureSecurityGroupPolicy/Stats', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/AzureSecurityGroupPolicy/Stats
Get statistics for the security group policies for the Dome9 user
Example responses
200 Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"resourceGroup": "string",
"region": "string",
"cloudAccountName": "string",
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"isTamperProtected": true,
"alertsCount": 0
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [AzureSgPolicyStats] | none |
Post
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/AzureSecurityGroupPolicy \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"tags": [
{
"key": "string",
"value": "string"
}
],
"inboundServices": [
{
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"outboundServices": [
{
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"region": "string",
"resourceGroup": "string",
"isTamperProtected": true
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/AzureSecurityGroupPolicy',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/AzureSecurityGroupPolicy', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/AzureSecurityGroupPolicy
Create a security group policy
Body parameter
{
"tags": [
{
"key": "string",
"value": "string"
}
],
"inboundServices": [
{
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"outboundServices": [
{
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"region": "string",
"resourceGroup": "string",
"isTamperProtected": true
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AzureSgPolicyPost | true | details for the policy |
Example responses
200 Response
{
"tags": [
{
"key": "string",
"value": "string"
}
],
"id": "00000000-0000-0000-0000-000000000000",
"externalSecurityGroupId": "string",
"accountId": 0,
"cloudAccountName": "string",
"lastUpdatedByDome9": true,
"error": {
"action": "string",
"errorMessage": "string"
},
"inboundServices": [
{
"direction": "string",
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"outboundServices": [
{
"direction": "string",
"name": "string",
"description": "string",
"priority": 0,
"access": "string",
"protocol": "string",
"sourcePortRanges": [
"string"
],
"sourceScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"destinationPortRanges": [
"string"
],
"destinationScopes": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"isDefault": true
}
],
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"region": "string",
"resourceGroup": "string",
"isTamperProtected": true
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AzureSgPolicyGet |
CloudAccounts
The CloudAccounts resource has methods to onboard AWS cloud accounts to CloudGuard and to manage some of their settings. It is can be used to automatically or programatically onboard AWS accounts into a CloudGuard account, or to set global settings such as the Region Configuration (used for network security management).
See also
Use-Case: Onboard an AWS account to CloudGuard
Onboard an AWS account to CloudGuard using the REST API
Use the Dome9 REST API to obtain Compliance Assessment Trends
Delete Force
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/cloudaccounts/{id}/DeleteForce
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/cloudaccounts/{id}/DeleteForce',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/cloudaccounts/{id}/DeleteForce', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/cloudaccounts/{id}/DeleteForce
Delete an AWS cloud account and linked entities.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | The Dome9 AWS account id (UUID) |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Update Cloud Account Name
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/cloudaccounts/name \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalAccountNumber": "string",
"data": "string"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/cloudaccounts/name',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/cloudaccounts/name', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/cloudaccounts/name
Update an AWS cloud account name.
Body parameter
{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalAccountNumber": "string",
"data": "string"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | String_ | true | the new name for the account |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Update Cloud Account Region Conf
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/cloudaccounts/region-conf \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalAccountNumber": "string",
"data": {
"region": "us_east_1",
"name": "string",
"hidden": true,
"newGroupBehavior": "ReadOnly"
}
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/cloudaccounts/region-conf',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/cloudaccounts/region-conf', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/cloudaccounts/region-conf
Update an AWS cloud account region configuration.
Body parameter
{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalAccountNumber": "string",
"data": {
"region": "us_east_1",
"name": "string",
"hidden": true,
"newGroupBehavior": "ReadOnly"
}
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | CloudAccountRegionConfigurationViewModel_ | true | updated Regional Configuration parameters for the account |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Update Cloud Account Credentials
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/cloudaccounts/credentials \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalAccountNumber": "string",
"data": {
"apikey": "string",
"arn": "string",
"secret": "string",
"iamUser": "string",
"type": "UserBased",
"isReadOnly": true
}
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/cloudaccounts/credentials',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/cloudaccounts/credentials', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/cloudaccounts/credentials
Update credentials for an AWS cloud account in Dome9. At least one of the following properties must be provided: "cloudAccountId", "externalAccountNumber"
Body parameter
{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"externalAccountNumber": "string",
"data": {
"apikey": "string",
"arn": "string",
"secret": "string",
"iamUser": "string",
"type": "UserBased",
"isReadOnly": true
}
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | CloudAccountCredentialsViewModel_ | true | credentials block |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Get Missing Permissions
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/cloudaccounts/{id}/MissingPermissions \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/cloudaccounts/{id}/MissingPermissions',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/cloudaccounts/{id}/MissingPermissions', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/cloudaccounts/{id}/MissingPermissions
Get a list of missing permissions for a specific account. These are permissions needed by Dome9 to manage accounts.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | none |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"actions": [
{
"type": "string",
"subType": "string",
"total": 0,
"error": {
"code": "string",
"message": "string"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CloudAccountMissingPermissions |
Get Mising Permissions By Entity Type
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/cloudaccounts/{id}/MissingPermissions/EntityType?entityType=string \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/cloudaccounts/{id}/MissingPermissions/EntityType?entityType=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/cloudaccounts/{id}/MissingPermissions/EntityType', params={
'entityType': 'string'
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/cloudaccounts/{id}/MissingPermissions/EntityType
Get a list of missing permissions for a specific cloud entity type and cloud account
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | The account id |
entityType | query | string | true | The entity type |
subType | query | string | false | The entity subtype (optional) |
Example responses
200 Response
[
{
"srl": "string",
"consecutiveFails": 0,
"lastFail": "2021-04-13T17:37:24Z",
"lastSuccess": "2021-04-13T17:37:24Z",
"firstFail": "2021-04-13T17:37:24Z",
"lastFailErrorCode": "string",
"lastFailMessage": "string",
"id": "00000000-0000-0000-0000-000000000000",
"retryMetadata": {
"permissions": [
"string"
],
"entityType": "string",
"subType": "string"
},
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"vendor": "aws"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [MissingPermission] | none |
Enumerated Values
Property | Value |
---|---|
vendor | aws |
vendor | hp |
vendor | mellanox |
vendor | awsgov |
vendor | azure |
vendor | |
vendor | awschina |
vendor | azuregov |
vendor | kubernetes |
vendor | azurechina |
vendor | terraform |
vendor | generic |
vendor | kubernetesruntimeassurance |
vendor | shiftleft |
vendor | sourcecodeassurance |
vendor | imageassurance |
vendor | alibaba |
Reset Missing Permissions
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/cloudaccounts/{id}/MissingPermissions/Reset
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/cloudaccounts/{id}/MissingPermissions/Reset',
{
method: 'PUT'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.put('https://api.dome9.com/v2/cloudaccounts/{id}/MissingPermissions/Reset', params={
, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/cloudaccounts/{id}/MissingPermissions/Reset
reset (re-validate) an account
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | The account id |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Sync Now
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/cloudaccounts/{id}/SyncNow \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/cloudaccounts/{id}/SyncNow',
{
method: 'POST',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/cloudaccounts/{id}/SyncNow', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/cloudaccounts/{id}/SyncNow
Send a data sync command to immediately fetch cloud account data into Dome9's system caches. This API is used in conjunction with EntityFetchStatus API resource to query the fetch status. Read more and see a full example here: https://github.com/Dome9/Python_API_SDK/blob/master/implementation/runSyncAssessment.md
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | The account id. |
Example responses
200 Response
{
"cloudAccountId": "00000000-0000-0000-0000-000000000000",
"name": "string",
"externalAccountNumber": "string",
"workFlowId": "00000000-0000-0000-0000-000000000000"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | AwsSyncNowResult |
Update Organziational Id
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/cloudaccounts/{id}/organizationalUnit \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/cloudaccounts/{id}/organizationalUnit',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/cloudaccounts/{id}/organizationalUnit', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/cloudaccounts/{id}/organizationalUnit
Update the ID of the Organizational Unit that this cloud account will be attached to. Use 'null' for the root Organizational Unit
Body parameter
{
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | The Dome9 Guid ID of the AWS cloud account |
body | body | UpdateIdViewModel3 | true | The Guid ID of the Organizational Unit to attach to. Use 'null' to attach to the root Organizational Unit |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"vendor": "aws",
"name": "string",
"externalAccountNumber": "string",
"error": "string",
"isFetchingSuspended": true,
"creationDate": "2021-04-13T17:37:24Z",
"credentials": {
"apikey": "string",
"arn": "string",
"secret": "string",
"iamUser": "string",
"type": "UserBased",
"isReadOnly": true
},
"iamSafe": {
"awsGroupArn": "string",
"awsPolicyArn": "string",
"mode": "OptIn",
"state": "Enabled",
"excludedIamEntities": {
"rolesArns": [
"string"
],
"usersArns": [
"string"
]
},
"restrictedIamEntities": {
"rolesArns": [
"string"
],
"usersArns": [
"string"
]
}
},
"netSec": {
"regions": [
{
"region": "us_east_1",
"name": "string",
"hidden": true,
"newGroupBehavior": "ReadOnly"
}
]
},
"magellan": true,
"fullProtection": true,
"allowReadOnly": true,
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"lambdaScanner": true,
"serverless": {
"codeAnalyzerEnabled": true,
"codeDependencyAnalyzerEnabled": true
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CloudAccount |
Move Cloud Accounts To Organizational Unit
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/cloudaccounts/organizationalUnit/move \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"sourceOrganizationalUnitId": "00000000-0000-0000-0000-000000000000",
"targetOrganizationalUnitId": "00000000-0000-0000-0000-000000000000"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/cloudaccounts/organizationalUnit/move',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/cloudaccounts/organizationalUnit/move', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/cloudaccounts/organizationalUnit/move
Detach cloud accounts from an Organizational unit and attach them to another Organizational unit Use 'null' for root organizational unit
Body parameter
{
"sourceOrganizationalUnitId": "00000000-0000-0000-0000-000000000000",
"targetOrganizationalUnitId": "00000000-0000-0000-0000-000000000000"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | MoveOrganizationalUnit | true | none |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Move All Cloud Accounts To Organizational Unit
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/cloudaccounts/organizationalUnit/moveAll \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/cloudaccounts/organizationalUnit/moveAll',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/cloudaccounts/organizationalUnit/moveAll', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/cloudaccounts/organizationalUnit/moveAll
Detach all cloud accounts from their current organizational unit and attach them to a new one. Default is to root organizational unit
Body parameter
{
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | UpdateIdViewModel2 | true | none |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Post Attach Multi
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/cloudaccounts/organizationalUnit/attach \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"entries": [
"string"
],
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/cloudaccounts/organizationalUnit/attach',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/cloudaccounts/organizationalUnit/attach', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/cloudaccounts/organizationalUnit/attach
Attach several cloud accounts to a specific Organizational Unit. User 'null' as root Organizational Unit as target
Body parameter
{
"entries": [
"string"
],
"organizationalUnitId": "00000000-0000-0000-0000-000000000000"
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | AttachCloudAccounts | true | none |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Get
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/CloudAccounts/{id} \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/CloudAccounts/{id}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/CloudAccounts/{id}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/CloudAccounts/{id}
Fetch a specific AWS cloud account
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | The Dome9 AWS account id (UUID) or the AWS external account number (12 digit number) |
Example responses
200 Response
{
"id": "00000000-0000-0000-0000-000000000000",
"vendor": "aws",
"name": "string",
"externalAccountNumber": "string",
"error": "string",
"isFetchingSuspended": true,
"creationDate": "2021-04-13T17:37:24Z",
"credentials": {
"apikey": "string",
"arn": "string",
"secret": "string",
"iamUser": "string",
"type": "UserBased",
"isReadOnly": true
},
"iamSafe": {
"awsGroupArn": "string",
"awsPolicyArn": "string",
"mode": "OptIn",
"state": "Enabled",
"excludedIamEntities": {
"rolesArns": [
"string"
],
"usersArns": [
"string"
]
},
"restrictedIamEntities": {
"rolesArns": [
"string"
],
"usersArns": [
"string"
]
}
},
"netSec": {
"regions": [
{
"region": "us_east_1",
"name": "string",
"hidden": true,
"newGroupBehavior": "ReadOnly"
}
]
},
"magellan": true,
"fullProtection": true,
"allowReadOnly": true,
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"lambdaScanner": true,
"serverless": {
"codeAnalyzerEnabled": true,
"codeDependencyAnalyzerEnabled": true
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CloudAccount |
Post
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/CloudAccounts \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"id": "00000000-0000-0000-0000-000000000000",
"vendor": "aws",
"name": "string",
"externalAccountNumber": "string",
"error": "string",
"isFetchingSuspended": true,
"creationDate": "2021-04-13T17:37:24Z",
"credentials": {
"apikey": "string",
"arn": "string",
"secret": "string",
"iamUser": "string",
"type": "UserBased",
"isReadOnly": true
},
"iamSafe": {
"awsGroupArn": "string",
"awsPolicyArn": "string",
"mode": "OptIn",
"state": "Enabled",
"excludedIamEntities": {
"rolesArns": [
"string"
],
"usersArns": [
"string"
]
},
"restrictedIamEntities": {
"rolesArns": [
"string"
],
"usersArns": [
"string"
]
}
},
"netSec": {
"regions": [
{
"region": "us_east_1",
"name": "string",
"hidden": true,
"newGroupBehavior": "ReadOnly"
}
]
},
"magellan": true,
"fullProtection": true,
"allowReadOnly": true,
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"lambdaScanner": true,
"serverless": {
"codeAnalyzerEnabled": true,
"codeDependencyAnalyzerEnabled": true
}
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/CloudAccounts',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/CloudAccounts', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/CloudAccounts
Add a new AWS cloud account to Dome9
Onboarding an AWS cloud account requires granting Dome9 permissions to access the account.
The following document describes the required procedure:
https://helpcenter.dome9.com/hc/en-us/articles/360003994613-Onboard-an-AWS-Account
Body parameter
{
"id": "00000000-0000-0000-0000-000000000000",
"vendor": "aws",
"name": "string",
"externalAccountNumber": "string",
"error": "string",
"isFetchingSuspended": true,
"creationDate": "2021-04-13T17:37:24Z",
"credentials": {
"apikey": "string",
"arn": "string",
"secret": "string",
"iamUser": "string",
"type": "UserBased",
"isReadOnly": true
},
"iamSafe": {
"awsGroupArn": "string",
"awsPolicyArn": "string",
"mode": "OptIn",
"state": "Enabled",
"excludedIamEntities": {
"rolesArns": [
"string"
],
"usersArns": [
"string"
]
},
"restrictedIamEntities": {
"rolesArns": [
"string"
],
"usersArns": [
"string"
]
}
},
"netSec": {
"regions": [
{
"region": "us_east_1",
"name": "string",
"hidden": true,
"newGroupBehavior": "ReadOnly"
}
]
},
"magellan": true,
"fullProtection": true,
"allowReadOnly": true,
"organizationalUnitId": "00000000-0000-0000-0000-000000000000",
"organizationalUnitPath": "string",
"organizationalUnitName": "string",
"lambdaScanner": true,
"serverless": {
"codeAnalyzerEnabled": true,
"codeDependencyAnalyzerEnabled": true
}
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | CloudAccount | true | The new AWS account data |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Delete
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/CloudAccounts/{id}
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/CloudAccounts/{id}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/CloudAccounts/{id}', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/CloudAccounts/{id}
Delete an AWS cloud account.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string(uuid) | true | The Dome9 AWS account id (UUID) |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
CloudInfraUser
CloudInfra Users
Get
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/CloudInfraUser \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/CloudInfraUser',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/CloudInfraUser', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/CloudInfraUser
Example responses
200 Response
[
{
"id": "string",
"email": "MyName@gmail.com",
"name": "string",
"role": "string",
"phone": "string",
"lastLogin": "2021-04-13T17:37:24Z",
"createdAt": "2021-04-13T17:37:24Z",
"existInDome9": true
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [CloudInfraUser] | none |
Post
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/CloudInfraUser \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"usersToCreate": [
{
"id": "string",
"email": "MyName@gmail.com",
"name": "string",
"role": "string",
"phone": "string",
"lastLogin": "2021-04-13T17:37:24Z",
"createdAt": "2021-04-13T17:37:24Z",
"existInDome9": true
}
],
"roleIds": [
0
]
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/CloudInfraUser',
{
method: 'POST',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.dome9.com/v2/CloudInfraUser', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
POST /v2/CloudInfraUser
Body parameter
{
"usersToCreate": [
{
"id": "string",
"email": "MyName@gmail.com",
"name": "string",
"role": "string",
"phone": "string",
"lastLogin": "2021-04-13T17:37:24Z",
"createdAt": "2021-04-13T17:37:24Z",
"existInDome9": true
}
],
"roleIds": [
0
]
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
body | body | CreateDome9CloudInfraUserRequest | true | none |
Example responses
200 Response
{
"failedRecords": [
{
"user": {
"id": "string",
"email": "MyName@gmail.com",
"name": "string",
"role": "string",
"phone": "string",
"lastLogin": "2021-04-13T17:37:24Z",
"createdAt": "2021-04-13T17:37:24Z",
"existInDome9": true
},
"errorMessage": "string"
}
],
"totalFailedRecords": 0,
"totalSuccessfulRecords": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | CreateDome9CloudInfraUserResponse |
CloudSecurityGroup
The CloudSecurityGroup resource has methods to add and manage security groups in a cloud account that is managed by CloudGuard. Among the managment operations are methods to add services (rules) to security groups.
Use the CloudAccounts resource to set a cloud account to Protected (managed).
Related resources
See also
Attach a Security Group to an Instance using the CloudGuard API
Get
Code samples
# You can also use wget
curl -X GET https://api.dome9.com/v2/CloudSecurityGroup?cloudAccountId=string®ionId=string \
--basic -u <key-id>:<key-secret> \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const headers = {
'Authorization': 'Basic ' + auth,
'Accept':'application/json'
};
request('https://api.dome9.com/v2/CloudSecurityGroup?cloudAccountId=string®ionId=string',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.dome9.com/v2/CloudSecurityGroup', params={
'cloudAccountId': 'string', 'regionId': 'string'
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
GET /v2/CloudSecurityGroup
Get AWS security groups for a specific cloud account and region
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
cloudAccountId | query | string(uuid) | true | the cloud account id |
regionId | query | string | true | the region |
Example responses
200 Response
[
{
"securityGroupId": 0,
"services": {
"inbound": [
{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
],
"outbound": [
{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
]
},
"externalId": "string",
"isProtected": true,
"securityGroupName": "string",
"description": "string",
"vpcId": "string",
"vpcName": "string",
"regionId": "us_east_1",
"cloudAccountId": "string",
"cloudAccountName": "string",
"tags": {
"property1": "string",
"property2": "string"
}
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Status Code 200
Name | Type | Description |
---|---|---|
anonymous | [CloudSecurityGroup] | none |
Enumerated Values
Property | Value |
---|---|
protocolType | ALL |
protocolType | HOPOPT |
protocolType | ICMP |
protocolType | IGMP |
protocolType | GGP |
protocolType | IPV4 |
protocolType | ST |
protocolType | TCP |
protocolType | CBT |
protocolType | EGP |
protocolType | IGP |
protocolType | BBN_RCC_MON |
protocolType | NVP2 |
protocolType | PUP |
protocolType | ARGUS |
protocolType | EMCON |
protocolType | XNET |
protocolType | CHAOS |
protocolType | UDP |
protocolType | MUX |
protocolType | DCN_MEAS |
protocolType | HMP |
protocolType | PRM |
protocolType | XNS_IDP |
protocolType | TRUNK1 |
protocolType | TRUNK2 |
protocolType | LEAF1 |
protocolType | LEAF2 |
protocolType | RDP |
protocolType | IRTP |
protocolType | ISO_TP4 |
protocolType | NETBLT |
protocolType | MFE_NSP |
protocolType | MERIT_INP |
protocolType | DCCP |
protocolType | ThreePC |
protocolType | IDPR |
protocolType | XTP |
protocolType | DDP |
protocolType | IDPR_CMTP |
protocolType | TPplusplus |
protocolType | IL |
protocolType | IPV6 |
protocolType | SDRP |
protocolType | IPV6_ROUTE |
protocolType | IPV6_FRAG |
protocolType | IDRP |
protocolType | RSVP |
protocolType | GRE |
protocolType | DSR |
protocolType | BNA |
protocolType | ESP |
protocolType | AH |
protocolType | I_NLSP |
protocolType | SWIPE |
protocolType | NARP |
protocolType | MOBILE |
protocolType | TLSP |
protocolType | SKIP |
protocolType | ICMPV6 |
protocolType | IPV6_NONXT |
protocolType | IPV6_OPTS |
protocolType | CFTP |
protocolType | SAT_EXPAK |
protocolType | KRYPTOLAN |
protocolType | RVD |
protocolType | IPPC |
protocolType | SAT_MON |
protocolType | VISA |
protocolType | IPCV |
protocolType | CPNX |
protocolType | CPHB |
protocolType | WSN |
protocolType | PVP |
protocolType | BR_SAT_MON |
protocolType | SUN_ND |
protocolType | WB_MON |
protocolType | WB_EXPAK |
protocolType | ISO_IP |
protocolType | VMTP |
protocolType | SECURE_VMTP |
protocolType | VINES |
protocolType | TTP |
protocolType | NSFNET_IGP |
protocolType | DGP |
protocolType | TCF |
protocolType | EIGRP |
protocolType | OSPFIGP |
protocolType | SPRITE_RPC |
protocolType | LARP |
protocolType | MTP |
protocolType | AX25 |
protocolType | IPIP |
protocolType | MICP |
protocolType | SCC_SP |
protocolType | ETHERIP |
protocolType | ENCAP |
protocolType | GMTP |
protocolType | IFMP |
protocolType | PNNI |
protocolType | PIM |
protocolType | ARIS |
protocolType | SCPS |
protocolType | QNX |
protocolType | AN |
protocolType | IPCOMP |
protocolType | SNP |
protocolType | COMPAQ_PEER |
protocolType | IPX_IN_IP |
protocolType | VRRP |
protocolType | PGM |
protocolType | L2TP |
protocolType | DDX |
protocolType | IATP |
protocolType | STP |
protocolType | SRP |
protocolType | UTI |
protocolType | SMP |
protocolType | SM |
protocolType | PTP |
protocolType | ISIS |
protocolType | FIRE |
protocolType | CRTP |
protocolType | CRUDP |
protocolType | SSCOPMCE |
protocolType | IPLT |
protocolType | SPS |
protocolType | PIPE |
protocolType | SCTP |
protocolType | FC |
protocolType | RSVP_E2E_IGNORE |
protocolType | MOBILITY_HEADER |
protocolType | UDPLITE |
protocolType | MPLS_IN_IP |
protocolType | MANET |
protocolType | HIP |
protocolType | SHIM6 |
protocolType | WESP |
protocolType | ROHC |
type | CIDR |
type | DNS |
type | IPList |
type | MagicIP |
type | AWS |
type | Tag |
type | ASG |
type | CIDRv6 |
type | PrefixList |
icmpType | All |
icmpType | EchoReply |
icmpType | DestinationUnreachable |
icmpType | SourceQuench |
icmpType | Redirect |
icmpType | AlternateHostAddress |
icmpType | Echo |
icmpType | RouterAdvertisement |
icmpType | RouterSelection |
icmpType | TimeExceeded |
icmpType | ParameterProblem |
icmpType | Timestamp |
icmpType | TimestampReply |
icmpType | InformationRequest |
icmpType | InformationReply |
icmpType | AddressMaskRequest |
icmpType | AddressMaskReply |
icmpType | Traceroute |
icmpType | DatagramConversionError |
icmpType | MobileHostRedirect |
icmpType | IPv6WhereAreYou |
icmpType | IPv6IAmHere |
icmpType | MobileRegistrationRequest |
icmpType | MobileRegistrationReply |
icmpType | DomainNameRequest |
icmpType | DomainNameReply |
icmpType | SKIP |
icmpType | Photuris |
icmpv6Type | All |
regionId | us_east_1 |
regionId | us_west_1 |
regionId | eu_west_1 |
regionId | ap_southeast_1 |
regionId | ap_northeast_1 |
regionId | us_west_2 |
regionId | sa_east_1 |
regionId | az_1_region_a_geo_1 |
regionId | az_2_region_a_geo_1 |
regionId | az_3_region_a_geo_1 |
regionId | ap_southeast_2 |
regionId | mellanox_region |
regionId | us_gov_west_1 |
regionId | eu_central_1 |
regionId | ap_northeast_2 |
regionId | ap_south_1 |
regionId | us_east_2 |
regionId | ca_central_1 |
regionId | eu_west_2 |
regionId | eu_west_3 |
regionId | eu_north_1 |
regionId | cn_north_1 |
regionId | cn_northwest_1 |
regionId | us_gov_east_1 |
regionId | ap_east_1 |
regionId | me_south_1 |
regionId | af_south_1 |
regionId | eu_south_1 |
regionId | westus |
regionId | eastus |
regionId | eastus2 |
regionId | northcentralus |
regionId | westus2 |
regionId | southcentralus |
regionId | centralus |
regionId | usgovlowa |
regionId | usgovvirginia |
regionId | northeurope |
regionId | westeurope |
regionId | eastasia |
regionId | southeastasia |
regionId | japaneast |
regionId | japanwest |
regionId | brazilsouth |
regionId | australiaeast |
regionId | australiasoutheast |
regionId | centralindia |
regionId | southindia |
regionId | westindia |
regionId | canadaeast |
regionId | westcentralus |
regionId | chinaeast |
regionId | chinanorth |
regionId | canadacentral |
regionId | germanycentral |
regionId | germanynortheast |
regionId | koreacentral |
regionId | uksouth |
regionId | ukwest |
regionId | koreasouth |
regionId | francecentral |
regionId | francesouth |
regionId | germanywestcentral |
regionId | usdodcentral |
regionId | usdodeast |
regionId | usgovarizona |
regionId | usgovtexas |
regionId | australiacentral |
regionId | australiacentral2 |
regionId | chinaeast2 |
regionId | chinanorth2 |
regionId | southafricanorth |
regionId | southafricawest |
regionId | uaecentral |
regionId | uaenorth |
regionId | ussecwest |
regionId | usseceast |
regionId | germanynorth |
regionId | switzerlandwest |
regionId | norwaywest |
regionId | norwayeast |
regionId | switzerlandnorth |
regionId | asia |
regionId | asia_east1 |
regionId | asia_northeast1 |
regionId | asia_south1 |
regionId | asia_southeast1 |
regionId | australia_southeast1 |
regionId | europe |
regionId | europe_north1 |
regionId | europe_west1 |
regionId | europe_west2 |
regionId | europe_west3 |
regionId | europe_west4 |
regionId | northamerica_northeast1 |
regionId | southamerica_east1 |
regionId | us |
regionId | us_central1 |
regionId | us_east1 |
regionId | us_east4 |
regionId | us_west1 |
regionId | us_west2 |
regionId | global |
regionId | asia_east2 |
regionId | eur4 |
regionId | nam4 |
regionId | europe_west6 |
regionId | japan_west |
Put
Code samples
# You can also use wget
curl -X PUT https://api.dome9.com/v2/cloudsecuritygroup/{id} \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"securityGroupId": 0,
"services": {
"inbound": [
{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
],
"outbound": [
{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
]
},
"externalId": "string",
"isProtected": true,
"securityGroupName": "string",
"description": "string",
"vpcId": "string",
"vpcName": "string",
"regionId": "us_east_1",
"cloudAccountId": "string",
"cloudAccountName": "string",
"tags": {
"property1": "string",
"property2": "string"
}
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json',
'Accept':'application/json'
};
request('https://api.dome9.com/v2/cloudsecuritygroup/{id}',
{
method: 'PUT',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.put('https://api.dome9.com/v2/cloudsecuritygroup/{id}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PUT /v2/cloudsecuritygroup/{id}
Update an AWS security group
Body parameter
{
"securityGroupId": 0,
"services": {
"inbound": [
{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
],
"outbound": [
{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
]
},
"externalId": "string",
"isProtected": true,
"securityGroupName": "string",
"description": "string",
"vpcId": "string",
"vpcName": "string",
"regionId": "us_east_1",
"cloudAccountId": "string",
"cloudAccountName": "string",
"tags": {
"property1": "string",
"property2": "string"
}
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | the AWS security group id (Dome9 Internal Id / AWS Security group id) |
body | body | CloudSecurityGroup | true | updated details for the security group |
Example responses
200 Response
{}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
Response Schema
Delete Cloud Security Group
Code samples
# You can also use wget
curl -X DELETE https://api.dome9.com/v2/cloudsecuritygroup/{id}
--basic -u <key-id>:<key-secret> \
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
request('https://api.dome9.com/v2/cloudsecuritygroup/{id}',
{
method: 'DELETE'
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
r = requests.delete('https://api.dome9.com/v2/cloudsecuritygroup/{id}', params={
, auth=(apiKey, apiSecret))
print(r.json())
DELETE /v2/cloudsecuritygroup/{id}
Delete an AWS security group
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | the AWS security group id (Dome9 Internal Id / AWS Security group id) |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Update Sec Group
Code samples
# You can also use wget
curl -X PATCH https://api.dome9.com/v2/cloudsecuritygroup/{id} \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // Set data if needed
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Authorization": []string{"Basic "+basicAuth(apiKey, apiSecret)},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.dome9.com/v2/AccessLease", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
body, err := ioutil.ReadAll(resp.Body)
fmt.Printf(string(body))
_ = err
}
func basicAuth(username string, password string) string {
auth := username + ":" + password
return base64.StdEncoding.EncodeToString([]byte(auth))
}
const request = require('node-fetch');
var apiKey = // Your API key
var apiSecret = // Your API secret
var auth = (new Buffer(apiKey + ":" + apiSecret)).toString('base64')
const inputBody = '{
"securityGroupId": 0,
"services": {
"inbound": [
{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
],
"outbound": [
{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
]
},
"externalId": "string",
"isProtected": true,
"securityGroupName": "string",
"description": "string",
"vpcId": "string",
"vpcName": "string",
"regionId": "us_east_1",
"cloudAccountId": "string",
"cloudAccountName": "string",
"tags": {
"property1": "string",
"property2": "string"
}
}';
const headers = {
'Authorization': 'Basic ' + auth,
'Content-Type':'application/json'
};
request('https://api.dome9.com/v2/cloudsecuritygroup/{id}',
{
method: 'PATCH',
body: inputBody, headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
import requests
# Your API key
apiKey =
# Your API secret
apiSecret =
headers = {
'Content-Type': 'application/json'
}
r = requests.patch('https://api.dome9.com/v2/cloudsecuritygroup/{id}', params={
}, headers = headers, auth=(apiKey, apiSecret))
print(r.json())
PATCH /v2/cloudsecuritygroup/{id}
Updates an AWS security group protection mode
Body parameter
{
"securityGroupId": 0,
"services": {
"inbound": [
{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
],
"outbound": [
{
"inbound": true,
"id": "string",
"name": "string",
"description": "string",
"protocolType": "ALL",
"port": "string",
"openForAll": true,
"scope": [
{
"type": "CIDR",
"data": {
"property1": "string",
"property2": "string"
}
}
],
"icmpType": "All",
"icmpv6Type": "All"
}
]
},
"externalId": "string",
"isProtected": true,
"securityGroupName": "string",
"description": "string",
"vpcId": "string",
"vpcName": "string",
"regionId": "us_east_1",
"cloudAccountId": "string",
"cloudAccountName": "string",
"tags": {
"property1": "string",
"property2": "string"
}
}
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
id | path | integer(int64) | true | the AWS security group id |
body | body | CloudSecurityGroup | true | updated details for the security group. only 'IsProtected' is used in this call which defines whether to protect or unprotect the security group. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No Content | None |
Change Protection Mode
Code samples
# You can also use wget
curl -X POST https://api.dome9.com/v2/cloudsecuritygroup/{id}/protection-mode \
--basic -u <key-id>:<key-secret> \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
package main
import (
"bytes"
"encoding/base64"
"net/http"
"fmt"
"io/ioutil"
)
func main() {
apiKey := // Your API key
apiSecret := // Your API secret
jsonReq := `` // S