{ "opencollection": "1.0.0", "info": { "name": "Discourse API Documentation Admin Users API", "version": "latest" }, "items": [ { "info": { "name": "Users", "type": "folder" }, "items": [ { "info": { "name": "List badges for a user", "type": "http" }, "http": { "method": "GET", "url": "https://{defaultHost}/user-badges/:username.json", "params": [ { "name": "username", "value": "", "type": "path" } ] }, "docs": "List badges for a user" }, { "info": { "name": "Creates a user", "type": "http" }, "http": { "method": "POST", "url": "https://{defaultHost}/users.json", "headers": [ { "name": "Api-Key", "value": "" }, { "name": "Api-Username", "value": "" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates a user" }, { "info": { "name": "Get a single user by username", "type": "http" }, "http": { "method": "GET", "url": "https://{defaultHost}/u/:username.json", "headers": [ { "name": "Api-Key", "value": "" }, { "name": "Api-Username", "value": "" } ], "params": [ { "name": "username", "value": "", "type": "path" } ] }, "docs": "Get a single user by username" }, { "info": { "name": "Update a user", "type": "http" }, "http": { "method": "PUT", "url": "https://{defaultHost}/u/:username.json", "headers": [ { "name": "Api-Key", "value": "" }, { "name": "Api-Username", "value": "" } ], "params": [ { "name": "username", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Update a user" }, { "info": { "name": "Get a user by external_id", "type": "http" }, "http": { "method": "GET", "url": "https://{defaultHost}/u/by-external/:external_id.json", "headers": [ { "name": "Api-Key", "value": "" }, { "name": "Api-Username", "value": "" } ], "params": [ { "name": "external_id", "value": "", "type": "path" } ] }, "docs": "Get a user by external_id" }, { "info": { "name": "Get a user by identity provider external ID", "type": "http" }, "http": { "method": "GET", "url": "https://{defaultHost}/u/by-external/:provider/:external_id.json", "headers": [ { "name": "Api-Key", "value": "" }, { "name": "Api-Username", "value": "" } ], "params": [ { "name": "provider", "value": "", "type": "path", "description": "Authentication provider name. Can be found in the provider callback\nURL: `/auth/{provider}/callback`" }, { "name": "external_id", "value": "", "type": "path" } ] }, "docs": "Get a user by identity provider external ID" }, { "info": { "name": "Update avatar", "type": "http" }, "http": { "method": "PUT", "url": "https://{defaultHost}/u/:username/preferences/avatar/pick.json", "params": [ { "name": "username", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Update avatar" }, { "info": { "name": "Update email", "type": "http" }, "http": { "method": "PUT", "url": "https://{defaultHost}/u/:username/preferences/email.json", "params": [ { "name": "username", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Update email" }, { "info": { "name": "Update username", "type": "http" }, "http": { "method": "PUT", "url": "https://{defaultHost}/u/:username/preferences/username.json", "params": [ { "name": "username", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Update username" }, { "info": { "name": "Get a public list of users", "type": "http" }, "http": { "method": "GET", "url": "https://{defaultHost}/directory_items.json", "params": [ { "name": "period", "value": "", "type": "query" }, { "name": "order", "value": "", "type": "query" }, { "name": "asc", "value": "", "type": "query" }, { "name": "page", "value": "", "type": "query" } ] }, "docs": "Get a public list of users" }, { "info": { "name": "Get a user by id", "type": "http" }, "http": { "method": "GET", "url": "https://{defaultHost}/admin/users/:id.json", "params": [ { "name": "id", "value": "", "type": "path" } ] }, "docs": "Get a user by id" }, { "info": { "name": "Delete a user", "type": "http" }, "http": { "method": "DELETE", "url": "https://{defaultHost}/admin/users/:id.json", "params": [ { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Delete a user" }, { "info": { "name": "Activate a user", "type": "http" }, "http": { "method": "PUT", "url": "https://{defaultHost}/admin/users/:id/activate.json", "params": [ { "name": "id", "value": "", "type": "path" } ] }, "docs": "Activate a user" }, { "info": { "name": "Deactivate a user", "type": "http" }, "http": { "method": "PUT", "url": "https://{defaultHost}/admin/users/:id/deactivate.json", "params": [ { "name": "id", "value": "", "type": "path" } ] }, "docs": "Deactivate a user" }, { "info": { "name": "Suspend a user", "type": "http" }, "http": { "method": "PUT", "url": "https://{defaultHost}/admin/users/:id/suspend.json", "params": [ { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Suspend a user" }, { "info": { "name": "Silence a user", "type": "http" }, "http": { "method": "PUT", "url": "https://{defaultHost}/admin/users/:id/silence.json", "params": [ { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Silence a user" }, { "info": { "name": "Anonymize a user", "type": "http" }, "http": { "method": "PUT", "url": "https://{defaultHost}/admin/users/:id/anonymize.json", "params": [ { "name": "id", "value": "", "type": "path" } ] }, "docs": "Anonymize a user" }, { "info": { "name": "Log a user out", "type": "http" }, "http": { "method": "POST", "url": "https://{defaultHost}/admin/users/:id/log_out.json", "params": [ { "name": "id", "value": "", "type": "path" } ] }, "docs": "Log a user out" }, { "info": { "name": "Refresh gravatar", "type": "http" }, "http": { "method": "POST", "url": "https://{defaultHost}/user_avatar/:username/refresh_gravatar.json", "params": [ { "name": "username", "value": "", "type": "path" } ] }, "docs": "Refresh gravatar" }, { "info": { "name": "List users", "type": "http" }, "http": { "method": "GET", "url": "https://{defaultHost}/admin/users.json", "params": [ { "name": "order", "value": "", "type": "query" }, { "name": "asc", "value": "", "type": "query" }, { "name": "page", "value": "", "type": "query" }, { "name": "show_emails", "value": "", "type": "query", "description": "Include user email addresses in response. These requests will\nbe logged in the staff action logs." }, { "name": "stats", "value": "", "type": "query", "description": "Include user stats information" }, { "name": "email", "value": "", "type": "query", "description": "Filter to the user with this email address" }, { "name": "ip", "value": "", "type": "query", "description": "Filter to users with this IP address" } ] }, "docs": "List users" }, { "info": { "name": "List users by flag", "type": "http" }, "http": { "method": "GET", "url": "https://{defaultHost}/admin/users/list/:flag.json", "params": [ { "name": "flag", "value": "", "type": "path" }, { "name": "order", "value": "", "type": "query" }, { "name": "asc", "value": "", "type": "query" }, { "name": "page", "value": "", "type": "query" }, { "name": "show_emails", "value": "", "type": "query", "description": "Include user email addresses in response. These requests will\nbe logged in the staff action logs." }, { "name": "stats", "value": "", "type": "query", "description": "Include user stats information" }, { "name": "email", "value": "", "type": "query", "description": "Filter to the user with this email address" }, { "name": "ip", "value": "", "type": "query", "description": "Filter to users with this IP address" } ] }, "docs": "List users by flag" }, { "info": { "name": "Get a list of user actions", "type": "http" }, "http": { "method": "GET", "url": "https://{defaultHost}/user_actions.json", "params": [ { "name": "offset", "value": "", "type": "query" }, { "name": "username", "value": "", "type": "query" }, { "name": "filter", "value": "", "type": "query" } ] }, "docs": "Get a list of user actions" }, { "info": { "name": "Send password reset email", "type": "http" }, "http": { "method": "POST", "url": "https://{defaultHost}/session/forgot_password.json", "body": { "type": "json", "data": "{}" } }, "docs": "Send password reset email" }, { "info": { "name": "Change password", "type": "http" }, "http": { "method": "PUT", "url": "https://{defaultHost}/users/password-reset/:token.json", "params": [ { "name": "token", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" } }, "docs": "Change password" }, { "info": { "name": "Get email addresses belonging to a user", "type": "http" }, "http": { "method": "GET", "url": "https://{defaultHost}/u/:username/emails.json", "params": [ { "name": "username", "value": "", "type": "path" } ] }, "docs": "Get email addresses belonging to a user" } ] } ], "bundled": true }