Skip to content

Bug in chart calls which break down by specific tags #69

@pwsiegel

Description

@pwsiegel

Consider a call of the form

BWQueries().get_chart(name='My Query', startDate='YYYY-MM-DD', x_axis='days', y_axis='volume', breakdown_by='tags', dim2Args=['first_tag, 'second_tag'])

The SDK makes a call which looks like:

https://api.brandwatch.com/projects/<project id>/data/volume/days/tags?queryId=<query id>&startDate=YYYY-MM-DD&endDate=YYYY-MM-DD&dim2Args=<tag id>&dim2Args=<tag id>&access_token=<token>

But this returns a response with all data and values fields empty. The reason is that the API expects tag names instead of tag id's; the following call gives the desired result:

https://api.brandwatch.com/projects/<project id>/data/volume/days/tags?queryId=<query id>&startDate=YYYY-MM-DD&endDate=YYYY-MM-DD&dim2Args=first_tag&dim2Args=second_tag&access_token=<token>

I think the same issue came up when formulating get_mentions requests with tag filters; for some mysterious reason the API expects category ID's but tag names. 🤷‍♂️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions