Math
May 15, 2024, 9:00pm
1
Hi,
Is there a way to only show the content of the [FORM] tab for certain users in the API explorer ?
I want to give some users access to the API explorer, but I don’t want them to see the JSON, Details, and Code tabs. I also want to hide the locode button for the autoquery endpoints.
Is this possible?
Thanks.
Also, is there a way to change the default color used in the API explorer ?
I consulted the branding section but I can’t find this information.
I think this is using the default for tailwind. Is there a way to simply switch to another color that’s predefined ?
mythz
May 16, 2024, 2:46am
2
No the UI isn’t customizable per user.
None of these customizations are available by default.
The Custom HTML/JS Overview docs shows how you can customize API Explorer by maintaining custom versions in /wwwroot/modules/ui
:
/wwwroot/modules/ui
/docs
*.mjs
/components
*.mjs
custom.js
custom.css
custom.html
Where you can override each built-in API Explorer component in /components/*.mjs with your own local custom version.
Alternatively you could use custom.html
and custom.js
to load custom JS you can use to manipulate the rendered DOM.
Math
May 16, 2024, 1:46pm
3
Understood.
In this case, is it possible to deactivate locode completely for a project but keep the ApiExplorer?
mythz
May 16, 2024, 1:52pm
4
You should be able to disable it by setting HtmlModule
to null
when registering AutoQuery, e.g:
Plugins.Add(new AutoQueryFeature {
MaxLimit = 100,
HtmlModule = null,
});
1 Like