🏗 Learn how our set of principles and structure are built.
Ownerfy is built using REST architecture. Our API uses standard HTTP response codes and accepts form-encoded request bodies by using HTTP methods (GET and POST).
The fundamental components of the REST API are:
- A client, initiates communication and sends a request.
- A server, enables clients to access its data using an API.
- A resource, any piece of information/data that the server can provide to clients.
HTTP is necessary for every request. Any request with plain HTTP will return the
400 - Bad Request
. Any request that does not include authentication will be refused and return401 - Unauthorized
results.
HTTP Method | Description | Possible Response |
---|---|---|
GET | Retrieve one or more resources identified by the request URI. | - If the method is successful, it will return the HTTP status code 200 OK with a response body.- If the resource you are looking for does not exist, it will return the HTTP status code 404 Not Found . |
POST | Create a resource from the submission of a request. | - If the method is successful, it will return the HTTP status code 200 OK , including the result of the operation.- If the request is invalid, it will return the HTTP status code 400 Bad Request . |