Modify an exception
URI - PUT
To use this endpoint, send a PUT request to update existing exception with specific type (excType) and ID: /exceptions/{excType}/{excId}
Request
The request includes HTTP headers (obtained in the authentication/authorization process and used to sign the request) with request parameters posted on the request body.
Request Headers
|
Header |
Type |
Required |
Format |
Description/Sample |
|---|---|---|---|---|
|
x-av-req-id |
String |
Yes |
UUID – Generated and supplied on the request. |
d290f1ee-6c54-4b01-90e6-d701748f085 1 |
|
x-av-token |
String |
Yes |
Token |
Token obtained in the authentication sequence. tkn8546ffffggd9d8934593 |
|
x-av-app-id |
String |
Yes |
Avanan Application ID |
US:myapp29 |
|
x-av-date |
String |
Yes |
Date-time in GMT |
'2021-04-10T00:00:00.000Z' |
|
x-av-sig |
String |
Yes |
Calculated signature |
tkn8jmveolrrtertr9d8934593 For more details, see Modify an exception. |
Request String Parameters
|
Parameter |
Type |
Required |
Format |
Description/Sample |
|---|---|---|---|---|
|
excType |
String |
Yes |
|
Exception type:
|
|
excId |
String |
Yes |
|
Exception entity ID |
Request Body
All applicable request parameters are posted on the request body JSON:
{
"requestData":
{
"attachmentMd5": "string",
"senderEmail": "string",
"senderName": "string",
"recipient": "string",
"senderClientIp": "string",
"senderDomain": "string",
"senderIp": "string",
"linkDomains": "string",
"subject": "string",
"comment": "string",
"actionNeeded": "string",
"matchOnlyFuture": "string",
"quarantineAll": "string",
"ignoringSpfCheck": "boolean",
"subjectMatching": "string",
"linkDomainMatching": "string",
"senderNameMatching": "string",
"senderDomainMatching": "string",
"senderEmailMatching": "string",
"recipientMatching": "string"
}
}
Request Body Parameters
The JSON parameters:
|
Parameter |
Type |
Required |
Format |
Description/Sample |
|---|---|---|---|---|
|
requestData |
Object |
|
|
A container for action request |
|
attachmentMd5 |
String |
No |
|
4437981ad343f816a65030504bed0e7d |
|
senderEmail |
String |
No |
|
|
|
senderName |
String |
No |
|
Test User |
|
recipient |
String |
No |
|
|
|
senderClientIp |
String |
No |
|
192.168.1.1 |
|
senderDomain |
Integer |
No |
|
email.com |
|
senderIp |
Boolean |
No |
|
192.168.1.2 |
|
linkDomains |
String |
No |
|
domain.com |
|
subject |
String |
No |
|
Block this email |
|
comment |
String |
No |
|
|
|
actionNeeded |
String |
No |
|
phishing |
|
subjectMatching |
String |
No |
|
contains |
|
linkDomainMatching |
String |
No |
|
contains |
|
senderNameMatching |
String |
No |
|
contains |
|
senderDomainMatching |
String |
No |
|
endswith |
|
recipientMatching |
String |
No |
|
match |
Request sample (CURL) format
This request sample shows URI base in USA region. For URI base in other regions, see URLs and URL Base.
curl -X PUT -H "Accept: application/json" \
-H "x-av-req-id: d290f1ee-6c54-4b01-90e6-d701748f3351" \
-H "x-av-token: tkn8546ffffggd9d8934593" \
-H "x-av-app-id: myapp29" \
-H "x-av-date: 2016-08-29T09:12:33.001Z" \
-H "x-av-sig: tkn8jmveolrrtertr9d8934593" \
-d "{"requestData":
{
"subject": "Allow this email v2l",
"senderEmail": "user@email.com",
"senderIp": "192.168.1.1",
"senderDomain": "email.com",
"senderName": "Test User",
"recipient": "user1@email.com",
"subjectMatching": "contains",
"linkDomainMatching": "contains",
"senderEmailMatching": "contains",
"senderDomainMatching": "contains",
"comment": "created_by_smartapi",
"actionNeeded": "phishing"
}
}" \
https://smart-api-production-1-us.avanan.net/v1.0/exceptions/whitelist/126802091
This sample request updates the existing whitelist exception rule with the specified payload.
Response
The response obtained from the service includes an HTTP response code and JSON formatted structure.
Response Structure
No response data structure
Response Parameters
The response parameters:
|
Parameter |
Type |
Description |
|
|---|---|---|---|
|
responseEnvelope |
Object |
A container of metadata properties |
|
|
|
requestId |
String |
Request ID (from the request header x-av-req-id value) |
|
|
responseCode |
Integer |
0 = Success Other values = Failure |
|
|
responseText |
String |
The text value of the response |
|
|
additionalText |
String |
Additional information |
|
|
recordsNumber |
Integer |
Number of records in response |
|
|
totalRecordsNumber |
Integer |
Total number of records |
|
|
scrollId |
String |
Unique ID used for scrolling |
Response Sample
A valid response from the service:
{
"responseEnvelope":
{
"requestId": "d290f1ee-6c54-4b01-90e6",
"responseCode": 200,
"responseText": "",
"additionalText": "",
"recordsNumber": 1, "scrollId": ""
},
"responseData":[]
}