This URL creates a new domain.
Resource URL
POST /domain
Request Parameters
Payload Parameters:
Field Name | Description | Data Type |
|---|---|---|
| Object that contains the details of the field to be sent | Object |
Details of fields in SubscriberDescriptor:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Domain Id | Number | No |
| Parent domain Id | Number | No |
| Domain name | String | Yes |
| Contact person | String | Yes |
| Email address | String | Yes |
| Title | String | No |
| Contact phone number | String | No |
| Company phone number | String | No |
| Organization | String | No |
| Address | Object | No |
| City | String | No |
| State | String | No |
| Country | String | No |
| Allow child admin domain | Boolean | No |
| Allow devices | Boolean | No |
| Default IPS policy | String | Yes |
| Default recon policy | String | Yes |
Details of fields in Address:
Field Name | Description | Data Type |
|---|---|---|
| Address1 | String |
| Address2 | String |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Unique ID of the created domain | Number |
Example
Request
POST https://<NSM_IP>/sdkapi/domain
Payload
{
"parentDomainId": 0,
"domainName": "Test Child Domain 1",
"contactPerson": "Trellix",
"emailAddress": "abc@xyz.com",
"title": "Intel",
"contactPhoneNumber": "9999999999",
"companyPhoneNumber": "080-12345678",
"organization": "Trellix",
"address":
{
"address1": "Bangalore",
"address2": "India"
},
"city": "Bangalore",
"state": "Karnataka",
"country": "India",
"allowChildAdminDomain": true,
"allowDevices": true,
"defaultIPSPolicy": "Default Inline IPS",
"defaultReconPolicy": "Default Reconnaissance Policy"
}
Response
{
"createdResourceId": 101
}
Error Information
Following error codes are returned by this URL:
No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 400 | 4415 | Invalid parent domain id |
2 | 400 | 4418 | No child domain can be added to domain |
3 | 400 | 4401 | Domain name is required |
4 | 400 | 4402 | Domain name exceeding maximum size (55) |
5 | 400 | 4416 | Duplicate admin domain name detected |
6 | 400 | 4403 | Invalid domain name |
7 | 400 | 4422 | IPS policy is required |
8 | 400 | 4417 | Invalid IPS policy |
9 | 400 | 4423 | Recon policy is required |
10 | 400 | 1112 | Invalid recon policy |
11 | 400 | 4402 | Company name exceeding maximum size (55) |
12 | 400 | 4409 | Invalid company name |
13 | 400 | 4402 | Address1 exceeding maximum size (55) |
14 | 400 | 4402 | Address2 exceeding maximum size (55) |
15 | 400 | 4402 | Company phone number exceeding maximum size (20) |
16 | 400 | 4404 | Invalid company phone number |
17 | 400 | 4405 | Contact person required |
18 | 400 | 4402 | Contact person exceeding maximum size (55) |
19 | 400 | 4406 | Invalid contact person |
20 | 400 | 4407 | Email address required |
21 | 400 | 4408 | Invalid email address |
22 | 400 | 4402 | Country name exceeding maximum size (30) |
23 | 400 | 4410 | Invalid country |
24 | 400 | 4402 | Contact phone number exceeding maximum size (20) |
25 | 400 | 4411 | Invalid contact phone number |
26 | 400 | 4402 | State name exceeding maximum size (20) |
27 | 400 | 4412 | Invalid state |
28 | 400 | 4402 | Title exceeding maximum size (55) |
28 | 400 | 4413 | Invalid title |
29 | 400 | 4402 | City exceeding maximum size (55) |
30 | 400 | 4414 | Invalid city |