DataFlex Dynamics CRM: Get All Incidents

Back to Index

Gets all incidents, and gets the account name and accountid by expanding the customerid_account lookup property.

Documentation: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/incident?view=dynamics-ce-odata-9

CURL Command

curl -X GET https://my-dynamics-domain.api.crm.dynamics.com/api/data/v9.0/incidents \
  -H "Accept: application/json" \
  -H "OData-MaxVersion: 4.0"  \
  -H "OData-Version: 4.0" \
  -d "$select=title,ticketnumber,description,createdon,emailaddress,statuscode,statecode" \
  -d "$expand=customerid_account($select=name,accountid)" \
  -H "Authorization: Bearer DYNAMICS_CRM_ACCESS_TOKEN"

DataFlex Example

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoRest
    Boolean iSuccess
    Boolean iBTls
    Integer iPort
    Boolean iBAutoReconnect
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Integer iRespStatusCode
    Handle hoJsonResponse
    Integer i
    Integer iCount_i
    String sOdataContext
    String sOdataEtag
    String sTitle
    String sTicketnumber
    String sDescription
    String sCreatedon
    String sEmailaddress
    Integer iStatuscode
    Integer iStatecode
    String sIncidentid
    String sCustomerid_accountName
    String sCustomerid_accountAccountid
    String sCustomerid_account
    String sTemp1
    Integer iTemp1

    Get Create (RefClass(cComChilkatRest)) To hoRest
    If (Not(IsComObjectCreated(hoRest))) Begin
        Send CreateComObject of hoRest
    End

    //  URL: https://my-dynamics-domain.api.crm.dynamics.com/api/data/v9.0/incidents
    Move True To iBTls
    Move 443 To iPort
    Move True To iBAutoReconnect
    Get ComConnect Of hoRest "my-dynamics-domain.api.crm.dynamics.com" iPort iBTls iBAutoReconnect To iSuccess
    If (iSuccess <> True) Begin
        Get ComConnectFailReason Of hoRest To iTemp1
        Showln "ConnectFailReason: " iTemp1
        Get ComLastErrorText Of hoRest To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get ComAddQueryParam Of hoRest "$select" "title,ticketnumber,description,createdon,emailaddress,statuscode,statecode" To iSuccess
    Get ComAddQueryParam Of hoRest "$expand" "customerid_account($select=name,accountid)" To iSuccess

    Get ComAddHeader Of hoRest "OData-MaxVersion" "4.0" To iSuccess
    Get ComAddHeader Of hoRest "Accept" "application/json" To iSuccess
    Get ComAddHeader Of hoRest "OData-Version" "4.0" To iSuccess
    Get ComAddHeader Of hoRest "Authorization" "Bearer DYNAMICS_CRM_ACCESS_TOKEN" To iSuccess

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComFullRequestNoBodySb Of hoRest "GET" "/api/data/v9.0/incidents" vSbResponseBody To iSuccess
    If (iSuccess <> True) Begin
        Get ComLastErrorText Of hoRest To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get ComResponseStatusCode Of hoRest To iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Status Code = " iRespStatusCode
        Showln "Response Header:"
        Get ComResponseHeader Of hoRest To sTemp1
        Showln sTemp1
        Showln "Response Body:"
        Get ComGetAsString Of hoSbResponseBody To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatJsonObject)) To hoJsonResponse
    If (Not(IsComObjectCreated(hoJsonResponse))) Begin
        Send CreateComObject of hoJsonResponse
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJsonResponse vSbResponseBody To iSuccess

    Get ComStringOf Of hoJsonResponse '"@odata.context"' To sOdataContext
    Move 0 To i
    Get ComSizeOfArray Of hoJsonResponse "value" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJsonResponse To i
        Get ComStringOf Of hoJsonResponse 'value[i]."@odata.etag"' To sOdataEtag
        Get ComStringOf Of hoJsonResponse "value[i].title" To sTitle
        Get ComStringOf Of hoJsonResponse "value[i].ticketnumber" To sTicketnumber
        Get ComStringOf Of hoJsonResponse "value[i].description" To sDescription
        Get ComStringOf Of hoJsonResponse "value[i].createdon" To sCreatedon
        Get ComStringOf Of hoJsonResponse "value[i].emailaddress" To sEmailaddress
        Get ComIntOf Of hoJsonResponse "value[i].statuscode" To iStatuscode
        Get ComIntOf Of hoJsonResponse "value[i].statecode" To iStatecode
        Get ComStringOf Of hoJsonResponse "value[i].incidentid" To sIncidentid
        Get ComStringOf Of hoJsonResponse "value[i].customerid_account.name" To sCustomerid_accountName
        Get ComStringOf Of hoJsonResponse "value[i].customerid_account.accountid" To sCustomerid_accountAccountid
        Get ComStringOf Of hoJsonResponse "value[i].customerid_account" To sCustomerid_account
        Move i + 1 To i
    Loop



End_Procedure

Sample JSON Response Body

{
  "@odata.context": "https://mydomain.api.crm.dynamics.com/api/data/v9.0/$metadata#incidents(title,ticketnumber,description,createdon,emailaddress,statuscode,statecode,customerid_account(name,accountid))",
  "value": [
    {
      "@odata.etag": "W/\"1818362\"",
      "title": "Product damaged (sample)",
      "ticketnumber": "CAS-01000-C7N2X1",
      "description": null,
      "createdon": "2018-04-25T16:00:00Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "bf151f13-b749-e811-a959-000d3a1adfba",
      "customerid_account": {
        "name": "Litware, Inc.",
        "accountid": "1c151f13-b749-e811-a959-000d3a1adfba"
      }
    },
    {
      "@odata.etag": "W/\"1162477\"",
      "title": "Missing parts",
      "ticketnumber": "CAS-00039-G6M3C9",
      "description": null,
      "createdon": "2018-03-03T12:34:40Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "981133e1-1ffa-e511-8101-00155d09ab01",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170218\"",
      "title": "Parent Case for Item defective on delivery",
      "ticketnumber": "CAS-00044-H4M0L5",
      "description": null,
      "createdon": "2018-03-12T16:21:09Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "6f021b89-c763-e511-80d5-3863bb2e33b0",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170223\"",
      "title": "Parent Case for Noise from product",
      "ticketnumber": "CAS-00049-P1W4W7",
      "description": null,
      "createdon": "2018-03-12T16:21:10Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "f9bc218f-c763-e511-80d5-3863bb2e33b0",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170228\"",
      "title": "Parent Case for Product feature information required",
      "ticketnumber": "CAS-00054-K3Z3F1",
      "description": null,
      "createdon": "2018-03-12T16:21:10Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "27bd218f-c763-e511-80d5-3863bb2e33b0",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170233\"",
      "title": "Parent Case for Product related question",
      "ticketnumber": "CAS-00058-B6N5Z1",
      "description": null,
      "createdon": "2018-03-12T16:21:11Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "40de2795-c763-e511-80d5-3863bb2e33b0",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170238\"",
      "title": "Parent Case for Required Service scheduling request",
      "ticketnumber": "CAS-00062-S8J4X6",
      "description": null,
      "createdon": "2018-03-12T16:21:11Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "1171fc9b-c763-e511-80d5-3863bb2e33b0",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170243\"",
      "title": "Parent Case for Service required soon",
      "ticketnumber": "CAS-00068-H8S8F7",
      "description": null,
      "createdon": "2018-03-12T16:21:12Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "2671fc9b-c763-e511-80d5-3863bb2e33b0",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1161466\"",
      "title": "Parent Case for Error E39X761",
      "ticketnumber": "CAS-00077-V7N9W2",
      "description": null,
      "createdon": "2018-03-03T12:34:41Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "a6c64631-c41e-e511-80d7-3863bb2eb380",
      "customerid_account": {
        "name": "A. Datum",
        "accountid": "475b158c-541c-e511-80d3-3863bb347ba8"
      }
    },
    {
      "@odata.etag": "W/\"1172579\"",
      "title": "Service call request",
      "ticketnumber": "CAS-00075-D6Z4C7",
      "description": null,
      "createdon": "2018-03-12T16:21:12Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "26467a5f-a593-e511-80db-3863bb2ed1f8",
      "customerid_account": {
        "name": "City Power & Light",
        "accountid": "aea19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170256\"",
      "title": "Request to Schedule Preventive Maintenance ",
      "ticketnumber": "CAS-00079-G8M0Q9",
      "description": null,
      "createdon": "2018-03-12T16:21:13Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "b3c9a389-ac93-e511-80db-3863bb2ed1f8",
      "customerid_account": {
        "name": "School of Fine Art",
        "accountid": "c6a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170261\"",
      "title": "Product inquiry",
      "ticketnumber": "CAS-00081-J9C5H4",
      "description": null,
      "createdon": "2018-03-12T16:21:13Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "37888358-ae93-e511-80db-3863bb2ed1f8",
      "customerid_account": {
        "name": "Blue Yonder Airlines",
        "accountid": "aca19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170267\"",
      "title": "Service call requested",
      "ticketnumber": "CAS-00082-W9C9X0",
      "description": null,
      "createdon": "2018-03-12T16:21:13Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "1202b4ae-ae93-e511-80db-3863bb2ed1f8",
      "customerid_account": {
        "name": "Coho Winery",
        "accountid": "b0a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1172585\"",
      "title": "Service Request",
      "ticketnumber": "CAS-00072-S1G3M8",
      "description": "Maintenance service request.",
      "createdon": "2018-03-12T16:21:13Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "c7d27f2e-9493-e511-80d6-3863bb363e80",
      "customerid_account": {
        "name": "Alpine Ski House",
        "accountid": "aaa19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170285\"",
      "title": "3D Printer Support",
      "ticketnumber": "CAS-00033-Q9K5B1",
      "description": "Marissa is having problems with Bluetooth connectivity to the ABS Filament 3D Printer.  This may be an issue with out-of-date drivers.",
      "createdon": "2018-03-12T16:21:14Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "69ab2ce9-e8c5-e511-80de-6c3be5a8dad0",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1161651\"",
      "title": "Average order shipment time",
      "ticketnumber": "CAS-01213-P8B3X0",
      "description": "Customer inquiry as to average shipping time",
      "createdon": "2017-01-20T22:50:45Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "b69e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Litware",
        "accountid": "bca19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161554\"",
      "title": "Complete overhaul required",
      "ticketnumber": "CAS-01214-S6Z4Z6",
      "description": "Overhaul of customer system required",
      "createdon": "2017-01-20T22:50:43Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "b89e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Consolidated Messenger",
        "accountid": "b2a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161467\"",
      "title": "Contact details requested",
      "ticketnumber": "CAS-01215-N0Y1T2",
      "description": "Customer contact details requested.",
      "createdon": "2017-01-20T22:50:47Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "ba9e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "A. Datum",
        "accountid": "475b158c-541c-e511-80d3-3863bb347ba8"
      }
    },
    {
      "@odata.etag": "W/\"1161510\"",
      "title": "Customer Contact Information",
      "ticketnumber": "CAS-01216-L3S7F2",
      "description": "Contact Information Request",
      "createdon": "2017-01-20T22:50:49Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "bc9e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Blue Yonder Airlines",
        "accountid": "aca19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161492\"",
      "title": "Delivery never arrived",
      "ticketnumber": "CAS-01219-H6B9P4",
      "description": null,
      "createdon": "2017-01-20T22:50:49Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "c29e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Alpine Ski House",
        "accountid": "aaa19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161596\"",
      "title": "Faulty product catalog",
      "ticketnumber": "CAS-01220-S1K8F4",
      "description": null,
      "createdon": "2017-01-20T22:50:47Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "c49e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Fourth Coffee",
        "accountid": "b6a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161652\"",
      "title": "Incorrect product information online",
      "ticketnumber": "CAS-01222-S6G5J0",
      "description": null,
      "createdon": "2017-01-20T22:50:51Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "c89e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Litware",
        "accountid": "bca19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161555\"",
      "title": "Information on the product",
      "ticketnumber": "CAS-01223-Z6Y4Y1",
      "description": null,
      "createdon": "2017-01-20T22:50:53Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "ca9e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Consolidated Messenger",
        "accountid": "b2a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161568\"",
      "title": "Item defective",
      "ticketnumber": "CAS-01224-K7W7X1",
      "description": null,
      "createdon": "2017-01-20T22:50:54Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "cc9e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Fabrikam, Inc.",
        "accountid": "b4a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161597\"",
      "title": "Maintenance information for Desktop PCs.",
      "ticketnumber": "CAS-01226-D5F0K2",
      "description": null,
      "createdon": "2017-01-20T22:50:54Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "d09e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Fourth Coffee",
        "accountid": "b6a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161637\"",
      "title": "Maintenance time information required",
      "ticketnumber": "CAS-01228-R4R6L0",
      "description": null,
      "createdon": "2017-01-20T22:50:52Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "d49e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Humongous Insurance",
        "accountid": "baa19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161797\"",
      "title": "Need help with 3D printer components",
      "ticketnumber": "CAS-01230-P5Y4B7",
      "description": null,
      "createdon": "2017-01-20T22:50:55Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "d89e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "The Phone Company",
        "accountid": "cca19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161598\"",
      "title": "Need service feature question",
      "ticketnumber": "CAS-01232-S7L0X4",
      "description": null,
      "createdon": "2017-01-20T22:50:57Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "dc9e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Fourth Coffee",
        "accountid": "b6a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170346\"",
      "title": "Operating manual required",
      "ticketnumber": "CAS-01235-N3D0M1",
      "description": null,
      "createdon": "2017-01-20T22:50:58Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "e29e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "A. Datum",
        "accountid": "475b158c-541c-e511-80d3-3863bb347ba8"
      }
    },
    {
      "@odata.etag": "W/\"1161599\"",
      "title": "Product catalog requested",
      "ticketnumber": "CAS-01237-H0T7F2",
      "description": null,
      "createdon": "2017-01-20T22:50:58Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "e69e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Fourth Coffee",
        "accountid": "b6a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161653\"",
      "title": "Product damaged",
      "ticketnumber": "CAS-01238-F4W6Y7",
      "description": null,
      "createdon": "2017-01-20T22:50:56Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "e89e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Litware",
        "accountid": "bca19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161539\"",
      "title": "Product damaged during shipment",
      "ticketnumber": "CAS-01239-F9N7V2",
      "description": "Customer is requesting a new product be shipped immediately. The cost is to be covered by the Shipping company, ",
      "createdon": "2017-01-20T22:51:00Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "ea9e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Coho Winery",
        "accountid": "b0a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170364\"",
      "title": "Product information required",
      "ticketnumber": "CAS-01242-W9H7T3",
      "description": null,
      "createdon": "2017-01-20T22:51:00Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "f09e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Fabrikam, Inc.",
        "accountid": "b4a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170378\"",
      "title": "Product question",
      "ticketnumber": "CAS-01244-S6B1P5",
      "description": null,
      "createdon": "2017-01-20T22:51:05Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "f49e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "A. Datum",
        "accountid": "475b158c-541c-e511-80d3-3863bb347ba8"
      }
    },
    {
      "@odata.etag": "W/\"1172591\"",
      "title": "Product question re warranty",
      "ticketnumber": "CAS-01245-K3H4H7",
      "description": null,
      "createdon": "2017-01-20T22:51:02Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "f69e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Consolidated Messenger",
        "accountid": "b2a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170390\"",
      "title": "Product service time",
      "ticketnumber": "CAS-01248-B4G9S0",
      "description": null,
      "createdon": "2017-01-20T22:51:01Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "fc9e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Fabrikam, Inc.",
        "accountid": "b4a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161600\"",
      "title": "Product service time inquiry",
      "ticketnumber": "CAS-01249-V5V2X3",
      "description": null,
      "createdon": "2017-01-20T22:51:04Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "fe9e62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Fourth Coffee",
        "accountid": "b6a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170402\"",
      "title": "Required Service",
      "ticketnumber": "CAS-01250-W8J3F2",
      "description": null,
      "createdon": "2017-01-20T22:51:03Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "009f62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "A. Datum",
        "accountid": "475b158c-541c-e511-80d3-3863bb347ba8"
      }
    },
    {
      "@odata.etag": "W/\"1161638\"",
      "title": "Service information required",
      "ticketnumber": "CAS-01252-B0F9T1",
      "description": null,
      "createdon": "2017-01-20T22:51:09Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "049f62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Humongous Insurance",
        "accountid": "baa19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170418\"",
      "title": "Service information required for products",
      "ticketnumber": "CAS-01253-B2W6L9",
      "description": null,
      "createdon": "2017-01-20T22:51:06Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "069f62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Coho Winery",
        "accountid": "b0a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170422\"",
      "title": "Service requested",
      "ticketnumber": "CAS-01254-W2Y5H6",
      "description": null,
      "createdon": "2017-01-20T22:51:06Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "089f62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Litware",
        "accountid": "bca19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161639\"",
      "title": "Service requested soon",
      "ticketnumber": "CAS-01255-Y9M9B7",
      "description": null,
      "createdon": "2017-01-20T22:51:08Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "0a9f62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Humongous Insurance",
        "accountid": "baa19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161601\"",
      "title": "Service required",
      "ticketnumber": "CAS-01256-G9B1B1",
      "description": null,
      "createdon": "2017-01-20T22:51:06Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "0c9f62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Fourth Coffee",
        "accountid": "b6a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170441\"",
      "title": "Shipment question",
      "ticketnumber": "CAS-01258-K7S5V4",
      "description": null,
      "createdon": "2017-01-20T22:51:13Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "109f62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Coho Winery",
        "accountid": "b0a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161471\"",
      "title": "Shipment question re order",
      "ticketnumber": "CAS-01259-Z2R0R4",
      "description": null,
      "createdon": "2017-01-20T22:51:09Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "129f62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "A. Datum",
        "accountid": "475b158c-541c-e511-80d3-3863bb347ba8"
      }
    },
    {
      "@odata.etag": "W/\"1161640\"",
      "title": "Shipping time information",
      "ticketnumber": "CAS-01260-B1P0X4",
      "description": null,
      "createdon": "2017-01-20T22:51:11Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "149f62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Humongous Insurance",
        "accountid": "baa19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161602\"",
      "title": "Shipping time information resend",
      "ticketnumber": "CAS-01261-N0C8H9",
      "description": null,
      "createdon": "2017-01-20T22:51:13Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "169f62a8-90df-e311-9565-a45d36fc5fe8",
      "customerid_account": {
        "name": "Fourth Coffee",
        "accountid": "b6a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161622\"",
      "title": "Dysfunctional Litware Laptop Keyboard X105",
      "ticketnumber": "CAS-00055-V8L7L7",
      "description": "Assistance Required with Litware Laptop Keyboard X105",
      "createdon": "2018-03-03T12:35:20Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "07ed7642-6dc7-e411-80ea-c4346bac094c",
      "customerid_account": {
        "name": "Graphic Design Institute",
        "accountid": "b8a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161723\"",
      "title": "Request for help with 3D Printers",
      "ticketnumber": "CAS-00221-K7P7Q0",
      "description": null,
      "createdon": "2018-03-03T12:35:21Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "6bee7642-6dc7-e411-80ea-c4346bac094c",
      "customerid_account": {
        "name": "Proseware, Inc.",
        "accountid": "c4a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161571\"",
      "title": "Item defective on delivery",
      "ticketnumber": "CAS-00286-N1H4B3",
      "description": null,
      "createdon": "2018-03-03T12:35:22Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "c940d6c6-43cc-e411-80ea-c4346bac094c",
      "customerid_account": {
        "name": "Fabrikam, Inc.",
        "accountid": "b4a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161812\"",
      "title": "Noise from product",
      "ticketnumber": "CAS-00290-X2X1T1",
      "description": null,
      "createdon": "2018-03-03T12:35:23Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "d140d6c6-43cc-e411-80ea-c4346bac094c",
      "customerid_account": {
        "name": "Trey Research",
        "accountid": "cea19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161835\"",
      "title": "Product feature information required",
      "ticketnumber": "CAS-00291-G8D0Z0",
      "description": null,
      "createdon": "2018-03-03T12:35:24Z",
      "emailaddress": null,
      "statuscode": 5,
      "statecode": 1,
      "incidentid": "d540d6c6-43cc-e411-80ea-c4346bac094c",
      "customerid_account": {
        "name": "Wingtip Toys",
        "accountid": "d2a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161572\"",
      "title": "Product related question",
      "ticketnumber": "CAS-00293-W0B0T5",
      "description": null,
      "createdon": "2018-03-03T12:35:25Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "d940d6c6-43cc-e411-80ea-c4346bac094c",
      "customerid_account": {
        "name": "Fabrikam, Inc.",
        "accountid": "b4a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161623\"",
      "title": "Required Service scheduling request",
      "ticketnumber": "CAS-00295-S1T2B5",
      "description": null,
      "createdon": "2018-03-03T12:35:27Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "dd40d6c6-43cc-e411-80ea-c4346bac094c",
      "customerid_account": {
        "name": "Graphic Design Institute",
        "accountid": "b8a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1161676\"",
      "title": "Service required soon",
      "ticketnumber": "CAS-00298-T3D9R1",
      "description": null,
      "createdon": "2018-03-03T12:35:28Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "e340d6c6-43cc-e411-80ea-c4346bac094c",
      "customerid_account": {
        "name": "Lucerne Publishing",
        "accountid": "bea19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170477\"",
      "title": "Severe alignment problem",
      "ticketnumber": "CAS-00003-F8C0Q5",
      "description": null,
      "createdon": "2018-03-12T16:21:32Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "dd9d2059-bbbc-e611-80f2-c4346bac6b34",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170481\"",
      "title": "A layer alignment issue with our 3D printer is repeatedly cropping up.",
      "ticketnumber": "CAS-00007-X0T6W3",
      "description": null,
      "createdon": "2018-03-12T16:21:32Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "6ba08b29-cebc-e611-80f2-c4346bac6b34",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170486\"",
      "title": "Contoso - Do you have any help documentation available?",
      "ticketnumber": "CAS-00008-G5G0Z6",
      "description": null,
      "createdon": "2018-03-12T16:21:32Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "369e90d5-cebc-e611-80f2-c4346bac6b34",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170490\"",
      "title": "Step-by-step help documentation needed.",
      "ticketnumber": "CAS-00009-M2K2T3",
      "description": null,
      "createdon": "2018-03-12T16:21:32Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "af5f3bb7-cfbc-e611-80f2-c4346bac6b34",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170494\"",
      "title": "Assistance needed on printer realignment.",
      "ticketnumber": "CAS-00011-L1M7T9",
      "description": null,
      "createdon": "2018-03-12T16:21:33Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "a1f9011d-d2bc-e611-80f2-c4346bac6b34",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170499\"",
      "title": "Printer alignment program not fixing the issue.",
      "ticketnumber": "CAS-00012-L6X1H9",
      "description": null,
      "createdon": "2018-03-12T16:21:33Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "40d94171-d2bc-e611-80f2-c4346bac6b34",
      "customerid_account": null
    },
    {
      "@odata.etag": "W/\"1170503\"",
      "title": "Self Service Ticket #50031-1057: Portal 2 Case 1",
      "ticketnumber": "CAS-00033-B6B2H9",
      "description": "Portal 2 Case 1",
      "createdon": "2018-03-03T12:35:29Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "93a20122-8df9-e411-80f1-c4346bb588c8",
      "customerid_account": {
        "name": "A. Datum",
        "accountid": "475b158c-541c-e511-80d3-3863bb347ba8"
      }
    },
    {
      "@odata.etag": "W/\"1170508\"",
      "title": "Temperature reading of 76 exceeded a threshold of 70",
      "ticketnumber": "CAS-00014-G2H0B4",
      "description": "The 3D printer is overheating and will not print. Going to create work order and dispatch technician.",
      "createdon": "2018-03-12T16:21:34Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "6c82c472-0dbf-e611-80f1-fc15b428467c",
      "customerid_account": {
        "name": "Northwind Traders",
        "accountid": "c2a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170511\"",
      "title": "IoT Alert",
      "ticketnumber": "CAS-00015-J9M7W5",
      "description": null,
      "createdon": "2018-03-12T16:21:34Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "443060fc-e0c6-e611-80f2-fc15b428467c",
      "customerid_account": {
        "name": "Northwind Traders",
        "accountid": "c2a19cdd-88df-e311-b8e5-6c3be5a8b200"
      }
    },
    {
      "@odata.etag": "W/\"1170514\"",
      "title": "Self Service Ticket #50031-1061: From Parature Portal",
      "ticketnumber": "CAS-00033-Q5J6N1",
      "description": "Self Service Licensing Request",
      "createdon": "2018-03-12T16:21:34Z",
      "emailaddress": null,
      "statuscode": 1,
      "statecode": 0,
      "incidentid": "617ee77a-52ff-e411-80d5-fc15b428f658",
      "customerid_account": {
        "name": "A. Datum",
        "accountid": "475b158c-541c-e511-80d3-3863bb347ba8"
      }
    }
  ]
}