diff --git a/content/enterprise_influxdb/v1.9/administration/manage/users-and-permissions/authorization-api.md b/content/enterprise_influxdb/v1.9/administration/manage/users-and-permissions/authorization-api.md index 5c2e7d302..c7a148b31 100644 --- a/content/enterprise_influxdb/v1.9/administration/manage/users-and-permissions/authorization-api.md +++ b/content/enterprise_influxdb/v1.9/administration/manage/users-and-permissions/authorization-api.md @@ -113,7 +113,9 @@ If the node returns a 307 redirect message, try resending the request to the lead node as indicated by the `Location` field in the HTTP response header. ```sh -curl --location-trusted -u "admin:changeit" -s -v -d '{"action":"create","user":{"name":"phantom2","password":"changeit"}}' https://cluster_node_2:8091/user +curl --location-trusted -u "admin:changeit" -s -v \ + -d '{"action":"create","user":{"name":"phantom2","password":"changeit"}}' \ + https://cluster_node_2:8091/user ``` ``` @@ -160,7 +162,9 @@ curl --location-trusted -u "admin:changeit" -s -v -d '{"action":"create","user": ##### Create a user against the lead node ```sh -curl --location-trusted -u "admin:changeit" -s -v -d '{"action":"create","user":{"name":"phantom","password":"changeit"}}' https://cluster_node_1:8091/user +curl --location-trusted -u "admin:changeit" -s -v \ + -d '{"action":"create","user":{"name":"phantom","password":"changeit"}}' \ + https://cluster_node_1:8091/user ``` ``` @@ -222,7 +226,9 @@ curl --location-trusted --negotiate -u "admin:changeit" -s https://cluster_node_ ##### Grant permissions to a user ``` -curl --location-trusted --negotiate -u "admin:changeit" -s -v -d '{"action":"add-permissions","user":{"name":"phantom","permissions":{"":["KapacitorAPI","KapacitorConfigAPI"]}}}' https://cluster_node_1:8091/user +curl --location-trusted --negotiate -u "admin:changeit" -s -v \ + -d '{"action":"add-permissions","user":{"name":"phantom","permissions":{"":["KapacitorAPI","KapacitorConfigAPI"]}}}' \ + https://cluster_node_1:8091/user ``` ``` @@ -288,7 +294,9 @@ curl --location-trusted --negotiate -u "admin:changeit" -s https://cluster_node_ ##### Remove permissions from a user ```sh -curl --location-trusted --negotiate -u "admin:changeit" -s -v -d '{"action":"remove-permissions","user":{"name":"phantom","permissions":{"":["KapacitorConfigAPI"]}}}' https://cluster_node_1:8091/user +curl --location-trusted --negotiate -u "admin:changeit" -s -v \ + -d '{"action":"remove-permissions","user":{"name":"phantom","permissions":{"":["KapacitorConfigAPI"]}}}' \ + https://cluster_node_1:8091/user ``` ``` @@ -331,7 +339,9 @@ curl --location-trusted --negotiate -u "admin:changeit" -s -v -d '{"action":"rem ##### Remove a user ```sh -curl --location-trusted --negotiate -u "admin:changeit" -s -v -d '{"action":"delete","user":{"name":"phantom2"}}' https://cluster_node_1:8091/user +curl --location-trusted --negotiate -u "admin:changeit" -s -v \ + -d '{"action":"delete","user":{"name":"phantom2"}}' \ + https://cluster_node_1:8091/user ``` ``` @@ -386,7 +396,9 @@ curl --location-trusted --negotiate -u "admin:changeit" -s https://cluster_node_ ##### Change a user's password ```sh -curl --location-trusted -u "admin:changeit" -H "Content-Type: application/json" -d '{"action": "change-password", "user": {"name": "", "password": "newpassword"}}' localhost:8091/user +curl --location-trusted -u "admin:changeit" -H "Content-Type: application/json" \ + -d '{"action": "change-password", "user": {"name": "", "password": "newpassword"}}' \ + localhost:8091/user ``` @@ -411,7 +423,9 @@ As when creating a user the lead node must be used. ##### Create a role ```sh -curl --location-trusted --negotiate -u "admin:changeit" -v -d '{"action":"create","role":{"name":"spectre"}}' https://cluster_node_1:8091/role +curl --location-trusted --negotiate -u "admin:changeit" -v \ + -d '{"action":"create","role":{"name":"spectre"}}' \ + https://cluster_node_1:8091/role ``` ``` @@ -494,7 +508,9 @@ curl --location-trusted --negotiate -u "admin:changeit" -s https://cluster_node_ Add permissions to a role. ```sh -curl --location-trusted --negotiate -u "admin:changeit" -s -v -d '{"action":"add-permissions","role":{"name":"spectre","permissions":{"":["KapacitorAPI","KapacitorConfigAPI"]}}}' https://cluster_node_1:8091/role +curl --location-trusted --negotiate -u "admin:changeit" -s -v \ + -d '{"action":"add-permissions","role":{"name":"spectre","permissions":{"":["KapacitorAPI","KapacitorConfigAPI"]}}}' \ + https://cluster_node_1:8091/role ``` ``` @@ -561,7 +577,9 @@ curl --location-trusted --negotiate -u "admin:changeit" -s https://cluster_node_ ##### Add a user to a role ```sh -curl --location-trusted --negotiate -u "admin:changeit" -s -v -d '{"action":"add-users","role":{"name":"spectre","users":["phantom"]}}' https://cluster_node_1:8091/role +curl --location-trusted --negotiate -u "admin:changeit" -s -v \ + -d '{"action":"add-users","role":{"name":"spectre","users":["phantom"]}}' \ + https://cluster_node_1:8091/role ``` ``` @@ -631,7 +649,9 @@ curl --location-trusted --negotiate -u "admin:changeit" -s https://cluster_node_ ##### Remove a user from a role ```sh -curl --location-trusted --negotiate -u "admin:changeit" -s -v -d '{"action":"remove-users","role":{"name":"spectre","users":["phantom"]}}' https://admin:changeit@cluster_node_1:8091/role +curl --location-trusted --negotiate -u "admin:changeit" -s -v \ + -d '{"action":"remove-users","role":{"name":"spectre","users":["phantom"]}}' \ + https://admin:changeit@cluster_node_1:8091/role ``` ``` @@ -675,7 +695,9 @@ curl --location-trusted --negotiate -u "admin:changeit" -s -v -d '{"action":"rem ##### Remove a permission from a role ```sh -curl --location-trusted --negotiate -u "admin:changeit" -s -v -d '{"action":"remove-permissions","role":{"name":"spectre","permissions":{"":["KapacitorConfigAPI"]}}}' https://cluster_node_1:8091/role +curl --location-trusted --negotiate -u "admin:changeit" -s -v \ + -d '{"action":"remove-permissions","role":{"name":"spectre","permissions":{"":["KapacitorConfigAPI"]}}}' \ + https://cluster_node_1:8091/role ``` ``` @@ -719,7 +741,9 @@ curl --location-trusted --negotiate -u "admin:changeit" -s -v -d '{"action":"rem ##### Delete a role ```sh -curl --location-trusted --negotiate -u "admin:changeit" -s -v -d '{"action":"delete","role":{"name":"spectre"}}' https://cluster_node_1:8091/role +curl --location-trusted --negotiate -u "admin:changeit" -s -v \ + -d '{"action":"delete","role":{"name":"spectre"}}' \ + https://cluster_node_1:8091/role ``` ```