What would be the "correct HTTP verb" to use when developing a RESTful API to handle login information? This API would be accessible from various devices/platforms - mobile app, desktop web app, desktop native app, etc.
As a noun, it means a username and password to enter a computer, program, or website. As an adjective, it describes the screen or page in which a person will enter the computer, program, or website. Log in is the verb form. It means to enter a computer, program, or website.
The primary or most-commonly-used HTTP verbs (or methods, as they are properly called) are POST, GET, PUT, PATCH, and DELETE. These correspond to create, read, update, and delete (or CRUD) operations, respectively. There are a number of other verbs, too, but are utilized less frequently.
Keep verbs out of your base URLs Many RESTful APIs start by using a method-driven approach to URL design. These method-based URLs sometimes contain verbs - sometimes at the beginning, sometimes at the end. For any resource that you model, like our dog, you can never consider one object in isolation.
As a RESTful API HTTP method, PUT is the most common way to update resource information.
I assume that by API Login you mean a way to authenticate an API user and any calls to your API endpoints.
You could probably use OAuth or Basic Authentication to do that or let say you have an API endpoint at api\authenticate
. The caller would POST
to this endpoint with userID and password or some API key. The service would then return a cookie or authentication token that would be sent with every call to other API endpoints. The HP Cloud Identity service works pretty much the same way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With