How can I remove tag from queue?
mashkay opened this issue · 3 comments
mashkay commented
I need this request
POST /v2/queues/<queue-id>/tags/_remove
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth-токен>
X-Org-ID: <идентификатор организации>
{
"tag": "<имя тега>"
}
this does not work because of wrong address
queue = client.queues[queue_name]
queue.perform_action("_remove", "post", {"tag":tag_name})
it uses
/v2/queues/<queue-id>/_remove
instead of
/v2/queues/<queue-id>/tags/_remove
Smosker commented
Hello! It looks like
queue.perform_action("/tags/_remove", "post", {"tag":tag_name})
should work
mashkay commented
I tried it before with "tags/_remove"
It definitely send the request to the correct url
but it rises an exeption for any post request with or without any data
Tracker errors: 400 {}
yandex_tracker_client.exceptions.BadRequest: Illegal parameter
get request raises proper answer method not allowed exeption
"/tags/_remove" sends request to wrong url
/v2/queues/<queue-id>//tags/_remove
mocking the YaTracker API with requests module works, but I hoped to use client
mashkay commented
I've got it
queue.perform_action("tags/_remove", "post", tag=tag_name)