Genesys Cloud - Main

 View Only

Discussion Thread View
  • 1.  Api Json scheme example

    Posted 06-11-2021 20:37
    Hi,

    I'm looking for a clear example of a json schema with the required fields for me api method /api/v2/analytics/users/aggregates/query
    I'm tried to use the following schema following the documentation with the required field but always I get the error with the message " "message": "The request could not be understood by the server due to malformed syntax.","

    {
    "interval": "2021-05-20T13:00:00.000Z/2021-05-25T13:00:00.000Z",
    "granularity": "",
    "timeZone": "",
    "groupBy": [],
    "filter": {
    "type": "and",
    "clauses": [
    {
    "type": "and",
    "predicates": [
    {
    "type": "",
    "dimension": "mediaType",
    "operator": "",
    "value": "",
    "range": {}
    }
    ]
    }
    ],
    "predicates": [
    {
    "type": "or",
    "dimension": "",
    "operator": "",
    "value": "",
    "range": {
    "gt": {},
    "gte": {},
    "lt": {},
    "lte": {}
    }
    }
    ]
    },
    "metrics": ["tSystemPresence"],
    "flattenMultivaluedDimensions": false,
    "views": [
    {
    "target": "tSystemPresence",
    "name": "View-Users_All-1-1-0",
    "function": "rangeBound",
    "range": {
    "gte": {},
    "lt": {}
    }
    }
    ],
    "alternateTimeDimension": ""
    }

     I will appreciate the help.

    Regards
    #Integrations

    ------------------------------
    Luis Vasquez
    REVOLUTION TECHNOLOGIES REVTEC, S.A.
    ------------------------------


  • 2.  RE: Api Json scheme example

    Posted 06-12-2021 15:50
    I usually suggest you look at the Analytics Query Builder in Developer Tools.  Developer Tools (genesys.cloud)  This will allow you to create the query with drop downs and selections and get you use to way to build them.  All you have to do is copy the query into your own code or application.  Also, the CLI with JQ works well to extract information.

    ------------------------------
    Robert Wakefield-Carl
    Avtex Solutions, LLC
    Contact Center Innovation Architect
    robertwc@avtex.com
    https://www.Avtex.com
    https://RobertWC.Blogspot.com
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources