Hi David,
My API guru says:
The name and role-ids for the service-account must be provided in the request as described in the body parameter section of the documentation.
With curl:
curl
'https://api.dome9.com/v2/service-account' \
--basic -u <key-id>:<key-secret> \
-H
'Content-Type: application/json' \
-H
'Accept: application/json'
--data-raw
'{"name":"<SERVICE_ACCOUNT_NAME>","roleIds":[<LIST,OF,ROLE,IDS>]}'
The response will contain all relevant information about the newly created service-account:
{"name":
"SERVICE_ACCOUNT_NAME",
"id":
"b72019f5-e5af-4ad5-a6a3-27c6a89079cd",
"apiKeyId":
"6b83cacf-d2dd-4f55-8811-c75ec879791e",
"apiKeySecret":
"26ycmazsqblt1owufed7kxhg",
"roleIds": [
LIST,
OF,
ROLE,
IDS
]
}
To get a list of all roles and their ids:
curl
'https://api.dome9.com/v2/role' \
--basic -u <key-id>:<key-secret> \
-H
'Content-Type: application/json' \
-H
'Accept: application/json'