Admin api Rebuilding the menu - statisticssweden/PxWeb GitHub Wiki

The purpose of this endpoint is to "push the Admin/Tools/Generate database/Generate button" with a http-call.

Please read the Admin api configuration ... first. When the config is done, it is possible to trigger rebuild the menu of a database:

Example request: https://{pxweb_domain_name}/api/admin/v1/menu/{database} HTTP Method: POST Headers: APIKey: {API key value}

The c#-method that handle a call to the endpoint is:

public HttpResponseMessage RebuildMenu(string database, bool languageDependent = true, string sortBy = "Title", bool buildSearchIndex = true) If you are not happy with the default values, other values should be passed as query parameters. The options for sortBy are "Filename", "Matrix" and (the default) "Title". Please see the admin-gui for explaination.