Support Center > Search Results > SecureKnowledge Details
Use the Dome9 MSP REST API
Solution

Use the Dome MSP REST API 

URL: https://api-msp.dome9.com/msp/v2/

Create a Dome9 API Key

Login to the Dome9 root account and follow these instructions.

The account must be an MSP account.

Get all accounts

This returns all the child accounts for a parent MSP account.

Request

curl -X GET \

https://api-msp.dome9.com/msp/v2/account \

-H 'authorization: Basic '\

-H 'cache-control: no-cache' \

-H 'content-type: application/json'

Response

    {
        "accountId": 12345,
        "adminUserId": 99999,
        "trust": {
            "id": "55555555-7777-4444-9999-000000000000",
            "targetAccountName": "Dome9",
            "sourceAccountName": "Dome9 Main Account",
            "sourceAccountId": "88888888-3333-4444-9999-ffffffffffff",
            "description": "Trust 'Dome9 Main Demo Account'",
            "restrictions": {
                "roles": []
            }
        },
        "iconUrl": "http://assets.dome9.com/icons/52ZioIgTGbxC14ZFjBGVbSDHDQD-pTbEr32vZJ8MPQA",
        "trialExpiration": null,
        "companyName": "Dome9",
        "pointOfContact": "Offir",
        "adminEmail": "someone@dome9.com",
        "adminFirstName": "D",
        "adminLastName": "Someone",
        "parentAccountId": 301,
        "planName": "MSP",
        "licensingInfo": {
           ...
            },
            "complianceEnabled": {
               ...
            },
            "iamsafeEnabled": {
              ...
            },
            "enterpriseEnabled": {
            ...
            },
            "fimEnabled": {
             ...
            },
            "allowedUsers": {
        ...
            }
        }
    },
    

Create a new child account

This creates a child account in Dome9 for the parent account.

Request

curl -X POST \

https://api-msp.dome9.com/msp/v2/account \

-H 'authorization: Basic <your api key and secret in base64 encoding>' \

-H 'cache-control: no-cache' \

-H 'content-type: application/json' \

-d '{"parentAccountId":<parent-account-id>,"companyName":"account-name","pointOfContact":"email-addr@domain.com","adminEmail":"email-addr@domain.com","adminFirstName":"first-name","adminLastName":"last-name","planName":"Enterprise","trustMspAccount":true,"licensingInfo":{"networkEnabled":{"value":true},"enterpriseEnabled":{"value":true},"complianceEnabled":{"value":true},"iamsafeEnabled":{"value":true},"fimEnabled":{"value":false},"allowedUsers":{"value":null}}}'

Where:

Parent-account-id = the Dome9 cloud account id of the parent account (under which the child account will be created) - this account must be an MSP account in Dome9. In the response to the GET method, above, the parent account is the accountId (12345, in the example response above). This field is mandatory.

planName = "MSP" or "Enterprise". If set to MSP, the child account will itself be an MSP account (capable of creating its own children accounts). If set to Enterprise, the child account is an enterprise account managed by the parent account.

Response

The response will contain the child account id in the field accountId.


{
    "accountId": 123456,
    "adminUserId": 111111,
    "trust": {
        "id": "99999999-cccc-4444-bbbb-777777777777",
        "targetAccountName": "ABC",
        "sourceAccountName": "msp-reseller1",
        "sourceAccountId": "ffffffff-7777-4444-8888-222222222222",
        "description": "Trust 'msp-reseller1'",
        "restrictions": {
            "roles": []
        }
    },
    "iconUrl": null,
    "trialExpiration": null,
    "companyName": "ABC",
    "pointOfContact": "msp@domain.com",
    "adminEmail": "email@domain.com",
    "adminFirstName": "first-name",
    "adminLastName": "last-name",
    "parentAccountId": 12345,
    "planName": "Enterprise",
    "licensingInfo": {
      ...
        },
        "complianceEnabled": {
           ...
        },
        "iamsafeEnabled": {
          ...
        },
        "enterpriseEnabled": {
         ...
        },
        "fimEnabled": {
            ...
        },
        "allowedUsers": {
          ...
        }
    }
}

Delete Child Account

curl -X DELETE \

https://api-msp.dome9.com/msp/v2/account/{child-account-id} \

-H 'authorization: Basic <your api key and secret in base64 encoding>' \

-H 'cache-control: no-cache' \

-H 'content-type: application/json'

Where

Child-account-id = the cloud account id of the child account (from previous Create Child Account step)

This solution has been verified for the specific scenario, described by the combination of Product, Version and Symptoms. It may not work in other scenarios.

Give us Feedback
Please rate this document
[1=Worst,5=Best]
Comment