API mentions - Not authorized or The parameter 'mentionable_type' is invalid

Hallo.
ich möchte mir alle mentions per API anzeigen lassen. Oder nur für einen Benutzer.
aktuelle Zammad Version. lokal installiert.
Die Anzeige von Tickets geht Problemlos (/api/v1/tickets/)

Hello.
I would like to display all mentions via API. Or just for one user.
current Zammad version
Displaying tickets is problem-free (/api/v1/tickets/)

Versuch 1
curl --location ‘https://ticket.XXXXXXX.de/api/v1/mentions

Ergebis:

{
“error”: “Authentication required”,
“error_human”: “Authentication required”
}

Versuch 2
curl --location ‘https://ticket.XXXXXXX.de/api/v1/mentions’ --header ‘Authorization: Token token=9-WwtTjpI99Gddciyd761H8ZIPkUNZE9tNLODh9pbw5DsXXXXXXXXX’

Ergebnis:

{
“error”: “The parameter ‘mentionable_type’ is invalid.”,
“error_human”: “The parameter ‘mentionable_type’ is invalid.”
}

Versuch 3
curl --location ‘https://ticket.XXXXXXX.de/api/v1/mentions?mentionable_type=Ticket’ --header ‘Authorization: Token token=9-WwtTjpI99Gddciyd761H8ZIPkUNZE9tNLODh9pbw5DsXXXXXXXXX’

Ergebnis:
{
“error”: “Not authorized”,
“error_human”: “Not authorized”
}

Hi @StefanStrauss83. You need to provide the parameter mentionable_id as well. It’s the identifier of the ticket you would like to see the mentions for.

This is an english speaking community. Please only post in english. Thank you.

Hello. Thanks for your answer.
I just want to use GET. According to the documentation I don’t need any parameters for this.
https://docs.zammad.org/en/latest/api/ticket/mentions.html

You describe CREATE, right?

Can you please send me an example of GET which works for you?

curl --location 'localhost:3000/api/v1/mentions?mentionable_type=Ticket&mentionable_id=1' \
--header 'Authorization: ...'

on Windows:
curl --location “https://ticket.XXXXXXXX.de/api/v1/mentions?mentionable_type=Ticket&mentionable_id=1” --header “Authorization Token token=z0Z3YL87gwxGZwZZOX5eozbN2udmN3VzeTAitWL3GmNS8DkOjSYMXXXXXXXXXXXXXX”

{“error”:“Authentication required”,“error_human”:“Authentication required”}

Your token is not valid.

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