Accidentally added role with slash


(Artem Davydov) #1

Hi, i accidentally added role with slash , so i cannot delete it. I wrote on github an issue bug . How can i delete role may be through mongo ?


(Jochen) #2

Hi Artem,

you can try using the URL-encoded variant of the / character, which is %2F:

curl -u $USER:$PASSWORD -X DELETE http://127.0.0.1:9000/api/roles/%20Stream%2FDashboard%20Editor/members

(Artem Davydov) #3

i got this error: > {“type”:“ApiError”,“message”:“HTTP 405 Method Not Allowed”}


(Jochen) #4

Is the Graylog REST API running on http://127.0.0.1:9000/api/ in your setup?


(Artem Davydov) #5

nope , i use http://172.16.20.58:9000/api/roles/ instead 127.0.0.1


(Jochen) #6

Ah, the curl command wasn’t entirely correct. I forgot to escape the last / character:

curl -u $USER:$PASSWORD -X DELETE http://127.0.0.1:9000/api/roles/%20Stream%2FDashboard%20Editor%Fmembers

This should delete the role " Stream/Dashboard Editor/members" (if that’s the correct name, taken from the GitHub issue).