Table of Contents |
---|
Code Block | ||||
---|---|---|---|---|
| ||||
<CODE>
:W_FORCE_EMPTY_EXTRACTFILE: := 'Y';
</CODE> |
After adding the code shown above, you need to reinitialize the MC2 rule cache.When the empty extract file option is enabled as shown, the REST simple extract requests returns an empty result:
Code Block | ||||
---|---|---|---|---|
| ||||
<protocol>://<host>:<port>/eagle/v2/entities?entityselectiontype=EntityID&entityselectionvalue=NOTEXISTINGID&outputFormat=json |
This results in an empty body response because the result has been read from an empty extract file.The example below shows how you can change the W_FORCE_EMPTY_EXTRACTFILE parameter value to N.
Code Block | ||||
---|---|---|---|---|
| ||||
<CODE>
:W_FORCE_EMPTY_EXTRACTFILE: := 'N';
</CODE> |
After adding the code above, you need to reinitialize the Extract Service. If the Force Empty Extract File option is not set or disabled, the Extract Service returns a NO_DATA TSR response:
Code Block | ||||
---|---|---|---|---|
| ||||
{
"header": {
"messageId": "MRX2FM3V9IVHXD9U",
"inReplyTo": "http://10.80.220.212:20220/extractservicerest/reply",
"sentBy": "http://www.eagleinvsys.com/",
"creationTimestamp": "2019-10-28T12:48:11-04:00"
},
"statusItem": [
{
"taskIdentifier": {
"correlationId": {
"value": "H7T1T1XP5Z574886X",
"correlationIdScheme": "correlationIdScheme"
},
"businessTaskId": {
"value": "H7T1T1XP5Z574886X",
"businessTaskIdScheme": "businessTaskIdScheme"
}
},
"status": "NO_DATA",
"severityCode": "0"
}
]
} |
ForceExtractFileCreation HTTP Parameter
Another way to control an empty extractfile generation is to use forceExtractFileCreation HTTP parameter with values Y or N for the specific request. The example below is an HTTP request example using the forceExtractFileCreation parameter:
Code Block | ||||
---|---|---|---|---|
| ||||
<protocol>://<host>:<port>/eagle/v2/entities?entityselectiontype=EntityID&entityselectionvalue=NOTEXISTINGID&outputFormat=json&forceExtractFileCreation=Y |