API - Audit

Description

These APIs are used to get runtime API history.

Get API Audit by Session ID
GET/interact/v2/APIhistory/session/{sessionID}?audiencelevel={audienceLevel} &startTime={startTime}&endTime={endTime}
Parameters
Parameters Description
audienceLevel Audience level (mandatory)
sessionID Interact Runtime Session ID (mandatory)
startTime Start Time (optional)
endTime End Time (optional)
Output
Table 1. Response Codes
Success 200 Ok
Error 400 Bad Request
Server Error 500 Internal Server Error
Example: Content-Type: application/json
[
    {
        "audienceId": [
            "CustomerID":4
        ],
        "rtURL": "192.168.1.11:7001",
        "batchId": "8a65967d-9d29-47d9-84eb-c2a86817c35c",
        "sessionId": "{s12}",
        "apiTime": 1607775983000,
        "api": "startSession",
        "processTime": 61,
        "status": 0,
        "message": null,
        "intChannel": "Auto_PVT_IC",
        "intPoint": null,
        "relyOnExistingSession": 0,
        "noOfofferRequested": 0,
        "event": null,
        "offerRequest": null,
        "parametersCount": 0,
        "parameters": null,
        "response": null
    },
    {
        "audienceId": [
            "CustomerID":100
        ],
        "rtURL": "192.168.1.11:7001",
        "batchId": "e46ab5f9-976e-4c77-b379-35119568dea7",
        "sessionId": "{s12}",
        "apiTime": 1607775965000,
        "api": "startSession",
        "processTime": 136,
        "status": 1,
        "message": "{\"messages\":[\"Audience: AudienceId (Customer) [CUSTOMERID=100.0] not found in profile table for sessionID: {s12}.\"]}",
        "intChannel": "Auto_PVT_IC",
        "intPoint": null,
        "relyOnExistingSession": 0,
        "noOfofferRequested": 0,
        "event": null,
        "offerRequest": null,
        "parametersCount": 0,
        "parameters": null,
        "response": null
    }
]
Get API Audit by Audience ID
GET/interact/v2/APIhistory/audience?audienceLevel={audienceLevel}&audienceIDField= {audienceIDField}&startTime={startTime}&endTime={endTime}&offerArbitration=false
Parameters
Parameters Description
audienceLevel Audience Level (mandatory)
audienceIDField Audience ID (mandatory)
startTime Start time (optional)
endTime End time (optional)
offerArbitration Offer Arbitration Flag (optional) – if set (value= false)
Output
Table 2. Response Codes
Success 200 Ok
Error 400 Bad Request
Server Error 500 Internal Server Error
Example: Content-Type: application/json
[

{
 "audienceId": [
            "CustomerID":100
        ],
        "rtURL": "192.168.1.11:7001",
        "batchId": "e46ab5f9-976e-4c77-b379-35119568dea7",
        "sessionId": "{s12}",
        "apiTime": 1607775965000,
        "api": "startSession",
        "processTime": 136,
        "status": 1,
        "message": "{\"messages\":[\"Audience: AudienceId (Customer) [CUSTOMERID=100.0] not found in profile table for sessionID: {s12}.\"]}",
        "intChannel": "Auto_PVT_IC",
        "intPoint": null,
        "relyOnExistingSession": 0,
        "noOfofferRequested": 0,
        "event": null,
        "offerRequest": null,
        "parametersCount": 0,
        "parameters": null,
        "response": null
    }
]
Get Offer Arbitration information by Audience ID
GET/interact/v2/APIhistory/audience?audienceLevel={audienceLevel}&audienceIDField= {audienceIDField}&startTime={startTime}&endTime={endTime}&offerArbitration=true
Parameters
Parameters Description
audienceLevel Audience level (mandatory)
audienceIDField Audience ID (mandatory)
startTime Start Time (optional)
endTime End Time (optional)
offerArbitration Offer Arbitration Flag (mandatory– value= true)
Output
Table 3. Response Codes
Success 200 Ok
Error 400 Bad Request
Server Error 500 Internal Server Error
Example: Content-Type: application/json
[
    {
        "audienceId": [
           "CustomerID":5
        ],
        "rtURL": "10.190.94.179:7001",
        "batchId": "ad2146cc-9b38-4ce2-8d62-ebd7a8fad0fd",
        "sessionId": "S5",
        "apiTime": 1606115027000,
        "api": "getOffers",
        "processTime": 31,
        "status": 0,
        "message": "{\"messages\":[\"{\\\"candidates\\\":[{\\\"code\\\":\\\"000000041,oooooo,pppppppppp,
        qqqqqqqqqqqq\\\",\\\"name\\\":\\\"PVT_Offer_50K\\\",\\\"source\\\":\\\"Strategy:IS:rule_6\\\"}],
        \\\"suppression\\\":[],\\\"segments\\\":[\\\"seg1\\\"]}\"]}",
        "intChannel": null,
        "intPoint": "IP1",
        "relyOnExistingSession": 0,
        "noOfofferRequested": 5,
        "event": null,
        "offerRequest": null,
        "parametersCount": 0,
        "parameters": null,
        "response": 
        "{\"offers\":[{\"score\":50,\"code\":[\"000000041\",\"oooooo\",\"pppppppppp\",\"qqqqqqqqqqqq\"],
        \"attributes\":[{\"t\":\"string\",\"v\":\"AudienceId (Customer) [CUSTOMERID=5.0]\",\"n\":\"AudienceID\"},
        {\"t\":\"string\",\"v\":\"2500\",\"n\":\"Course_Fees\"},{\"t\":\"numeric\",\"v\":50.0,\"n\":\"Course_INR\"},
        {\"t\":\"string\",\"v\":\"http:\/\/www.udemy.com\/course\/java\",\"n\":\"CourseDetailInfo1\"},{\"t\":\"numeric\",
        \"v\":11.0,\"n\":\"CourseId\"},{\"t\":\"datetime\",\"v\":\"10\/10\/2020 00:00:00\",\"n\":\"CSDate\"},
        {\"t\":\"string\",\"v\":\"false\",\"n\":\"DiscountAvailable1\"},{\"t\":\"datetime\",\"v\":\"09\/28\/2020 00:00:00\",
        \"n\":\"EffectiveDate\"},{\"t\":\"datetime\",\"v\":\"01\/30\/2021 00:00:00\",\"n\":\"ExpirationDate\"},{\"t\":\"numeric\",
        \"v\":1.0,\"n\":\"IPID\"},{\"t\":\"string\",\"v\":\"IP1\",\"n\":\"IPName\"},{\"t\":\"string\",\"v\":\"Spring Core\",
        \"n\":\"ModulesCovered1\"},{\"t\":\"numeric\",\"v\":0.0,\"n\":\"RTSelectionMethod\"},{\"t\":\"numeric\",
        \"v\":50.0,\"n\":\"ScoreInDouble\"},{\"t\":\"string\",\"v\":\"A000000073\",\"n\":\"UACICellCode\"},
        {\"t\":\"numeric\",\"v\":43.0,\"n\":\"UACIOfferID\"},{\"t\":\"numeric\",\"v\":1.0,\"n\":\"UACISegmentID\"},
        {\"t\":\"numeric\",\"v\":12.0,\"n\":\"UACIZoneID\"}],\"treatmentCode\":\"48.2b.5778f2b0.ffffffffb195cc50\",
        \"n\":\"PVT_Offer_50K\",\"desc\":\"\"}]}"
    }
]