This URL imports the domain name exceptions to the Manager.
Resource URL
POST /domainnameexceptions/import
Content-type value
multipart/form-data; boundary=<x>
Request Parameters
URL Parameters: None
Payload Request Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Holds the body part objects | Object | Yes |
Details of BodyPart[0]:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Holds the DNE file element object | Application/json object | Yes |
Details of DNE file element:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Name of the file | String | Yes |
| File type should be .csv | String | No |
Details of BodyPart[1]:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Holds the file as input stream | Application/octet-stream | Yes |
Details of .csv file:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Domain name exceptions input stream | ByteArrayInput stream | Yes |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Set to 1 if the operation was successful | Number |
Example
Request
POST https://<NSM_IP>/sdkapi/domainnameexceptions/import
Payload
----Boundary_1_12424925_1353496814940
Content-Type: application/json
{"fileType": null, "fileName": "dne"}
----Boundary_1_12424925_1353496814940
Content-Type: application/octet-stream
www.google.com,
www.yahoo.com,
www.abc.com,
www.test1.com,
www.test2.com
----Boundary_1_12424925_1353496814940--
Response
{
"status": 1
}
Error Information
Following error code s returned by this URL:
No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 400 | 2202 | Input stream read error |