API - Get Categories without Descriptions

Hi, I want to use a GET Request as such to obtain all categories in my Discourse server.

resp = requests.get(base_url + "/categories.json", headers={"Api-Key": clef_api, "Api-Username": "system"}, param={'include_subcategories': 'true'} ,auth=auth)
    assert(resp.status_code == 200)

Unfortunally, as they pull the descriptions of the categories, with all the current categories, I receive a 413 HTTP error (Payload Too Large). So, I’d like to be able to opt out of pulling Categories descriptions to pull less data.

Can you help me ? thx :slight_smile:

1 Like

I think you need to use params and not data

4 Likes

this worked lmao, thx !! :hugs:

2 Likes

Glad that did the trick! I’ve been confused by that myself. Thanks to @RGJ for his lucid explanation.

3 Likes

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