Create new Groups via API

  • Used Zammad version: 4.0.x
  • Used Zammad installation type: source
  • Operating system: Ubuntu
  • Browser + version: Microsoft Edge (91.0.864.41)

Expected behavior:

To create a new Group via JSON API

Actual behavior:

Every POST Request is like converted to an GET

Steps to reproduce the behavior:

Created a new personal Access Token with “admin.group” permission (with admin user)
via Postman:


Body:
{

“name”: “TestAPI”,

“signature_id”: 1,

“email_address_id”: 1,

“assignment_timeout”: null,

“follow_up_possible”: “yes”,

“follow_up_assignment”: true,

“active”: true,

“note”: “test”

}
2021-06-09 16_16_18-Postman

When i send this request, i get in return the same as when i use “https://support.fqdn.at/api/v1/groups” in the Browser (get all groups from my system)

Does anyone know, what am i doing wrong here?
Thanks!

Sorry I can’t follow you.
Working fine:

Check the status returned.
You may also start using protocol prefixes in your URL to ensure your webserver doesn’t play tricks on you (e.g. rewriting your request to GET) (so if you use https use https://support.fqdn.at/....).

Apart from that you may want to use Bearer Tokens right away:
image

Thank you!
Now it works fine - the webserver played some tricks on me :wink:
All request’s were changed to a “GET”…I think the solution was to change the 401 to 403 in the nginx config.

Have a nice day! :slight_smile:

1 Like

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