GitHub user dosubot[bot] added a comment to the discussion: Create role using API
<!-- Answer --> In Superset 4.0, the /api/v1/security/roles/ endpoint is not actually exposed as a REST API in any standard deployment—this is due to how the code registers the endpoint (with add_view_no_menu instead of add_api), so it won't appear in Swagger or be accessible, regardless of configuration or environment. If you see this endpoint locally, it's likely due to local code changes, a different Superset version, or a nonstandard deployment. No configuration flag (including FAB_ADD_SECURITY_API) will make this endpoint available in production if both environments are running unmodified Superset 4.0. If you need to automate role management, you'll need to use the UI, direct DB access (not recommended), or monitor future releases for a fix. More details here: [source](https://github.com/apache/superset/blob/f802474b07bc7a2765e57fcd6612d2b4454f5c62/superset/security/api.py). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/2f5debc4-c0aa-4f78-8aed-29d9589079e4?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/2f5debc4-c0aa-4f78-8aed-29d9589079e4?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/2f5debc4-c0aa-4f78-8aed-29d9589079e4?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/2f5debc4-c0aa-4f78-8aed-29d9589079e4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/2f5debc4-c0aa-4f78-8aed-29d9589079e4?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/2f5debc4-c0aa-4f78-8aed-29d9589079e4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/2f5debc4-c0aa-4f78-8aed-29d9589079e4?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/33878) GitHub link: https://github.com/apache/superset/discussions/33878#discussioncomment-13583911 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
