Legacy Dev Forum Posts

 View Only

Sign Up

User Observation Query - 404 error

  • 1.  User Observation Query - 404 error

    Posted 06-05-2025 18:18

    sundarrx | 2020-10-15 19:03:26 UTC | #1

    I am trying the below Request body for the User Observation Query (POST) and it returns a 404 error. Is there anything different that needs to be done to get a 400OK? Appreciate any help.

    POST: https://api.usw2.pure.cloud/api/v2/analytics/user/observations/query {

    "interval": "2020-10-08T09:00:00Z/2020-10-08T010:00:00Z",

    "userFilters": [

    {

    "type": "or",

    "predicates": [

    {

    "dimension": "userId",

    "value": "770a977d-d36b-47d8-8275-fc6600024812"

    },

    {

    "dimension": "userId",

    "value": "88052904-6615-431d-82fd-29a9d3412913"

    }

    ]

    }

    ],

    "presenceFilters": [

    {

    "type": "or",

    "predicates": [

    {

    "dimension": "systemPresence",

    "value": "AVAILABLE"

    }

    ]

    }

    ],

    "routingStatusFilters": [

    {

    "type": "or",

    "predicates": [

    {

    "dimension": "routingStatus",

    "value": "OFF_QUEUE"

    }

    ]

    }

    ],

    "presenceAggregations": [

    {

    "type": "termFrequency",

    "dimension": "organizationPresenceId",

    "size": 10

    }

    ],

    "paging": {

    "pageSize": 10,

    "pageNumber": 1

    },

    "order": "asc"

    }


    John_Carnell | 2020-10-15 21:10:59 UTC | #2

    Hi Rama,

    I think you are using the wrong URL. It should be "/api/v2/analytics/users/observations/query"

    not

    "/api/v2/analytics/user/observations/query"

    Thanks, John


    sundarrx | 2020-10-15 21:27:28 UTC | #3

    Hello John,

    Thank you for pointing that out. I corrected to Users now. But now I am receiving a 400 bad request error. message": "The request could not be understood by the server due to malformed syntax.",

    Can you look at my Request body syntax and see if you can spot any anomalies? Much appreciated :)

    Thanks, Rama


    John_Carnell | 2020-10-15 21:41:41 UTC | #4

    Hi Rama,

    I would recommend you take a look at our Analytics Query tool under the developers tool section on the developer center. It allows you to build your queries via a web tool and then spits out the JSON payload you are expecting to call. That way you can guarantee your query is going to work before you commit it to code.

    I would take a look there because it is much easier than trying to handcraft your query.

    I hope that helps.

    Thanks, John


    John_Carnell | 2020-10-15 21:51:02 UTC | #5

    Hi Rama,

    I think you are conflating the instantaneous and aggregate calls. The observations have very limited filtering (e.g. user id) and can not look at things like presence. I would recommend you read through the Analytics Overview page and the look through the differences between the queries.

    Thanks, John


    system | 2020-11-15 21:51:04 UTC | #6

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 9088