You are here:... (Miscellaneous) > Appendix > Custom Ingest

Custom Ingest

Options are sent to custom ingest via HTTP Request Headers. The name of the request header is X-Netuitive-Api-Options and it takes a comma separated list of options.

The table below describes the implemented options.

Option Description

When present, the custom ingest service sends a detailed "Success Response" body. See the sample Success Response below. When this option is not present, no response body is sent.

Note   A response body is always sent when there is an error.
INJECT_TIMESTAMP When present, the custom ingest service injects the current server timestamp into the element sample's "timestamp" property. This will overwrite any passed-in timestamps if they exist.Ws

Table 1-14: Implemented custom ingest options.

Ingest Responses

There are two types (not including 500 errors) of responses returned from the custom ingest service:

  • 202 : ACCEPTED
    • Netuitive has received the request and queued it for processing. This does not mean the Element will appear in Netuitive. The service is not validating if the timestamp sent to Netuitive is in a valid time range.
  • 400 : BAD_REQUEST
    • Netuitive is not able to process the request due to some sort of error in the message:
      • Validation Error: There was an error in validating the message. The error will be returned in the message.
      • Parsing Error: There was an error parsing the message passed into Netuitive.

The responses delivered to the client have been standardized. Except for the case of a 500 error, the responses are the same minus one exception: the Error Response contains a field named "errors" that has an array of error messages. The format of the messages can be seen in examples below.

Note   On a 202 : ACCEPTED response, the response body is only returned when the client requests it via the HTTP header option SEND_RESPONSE_BODY. On a 400 : BAD_REQUEST response, a response body is always returned. There is no option to turn this off.

Sample Responses