All rankmath endpoint URLs should be lowercase

#628584
  • Resolved Anonymous
    Rank Math free

    I just experienced an issue with Edit Snippet changes not being saved.

    The API call is submitted to the following URL:
    https://somewebsite.com/wp-json/rankmath/v1/updateMeta?_locale=user

    We kept experiencing issues with inbound links having mixed-case URLs, causing 404s. Due to this, we installed a plugin to behave as middleware to lowercase all URLs in WordPress.

    This functionality (obviously) broke the rankmath API call.

    Using mixed-case endpoints for an API is inconsistent, and bad practice. Please fix this.

    Also, separate words with hyphens, not camelCaseWords.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    Plenty of platforms online use uppercase letters on their APIs. One great example of that is Google, which uses the camel casing for the API naming.

    We follow the same procedure with our API calls and if you are forcing the lowercase URLs you need to include a way to also exclude our API routes from being parsed by this setting/plugin.

    Don’t hesitate to get in touch if you have any other questions.

    Anonymous
    Rank Math free

    That’s a really poor example to use.

    With WordPress development, you should follow existing conventions within the framework.

    Taking a look through all of the default WordPress REST API endpoints, all URLs are lowercase and words are separated by underscores.

    https://developer.wordpress.org/rest-api/reference/

    If you’re going to follow a convention, at least follow the one defined by the framework your plugin is developed to work within.

    Hello,

    There are no conventions set by WordPress specifically for the REST API routes that plugins should be using.

    Because of that, we have made our decision freely and decided to use the camel case.

    Our plugin will always follow the guidelines set by WordPress for plugin development but the REST API routes are not under any restrictions in terms of the URL casing, so each plugin developer is free to choose the convention that works best for them.

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘All rankmath endpoint URLs should be lowercase’ is closed to new replies.