In this guide you will find the documentation for the real-time database REST API. The API content is written in Turkish and the answers will be in Turkish.
Database REST API Usage Guide
REST API Endpoint
The API endpoint is:
GET https://willvinne.com/api/database.php?
POST https://willvinne.com/api/database.php?
DELETE https://willvinne.com/api/database.php?
Request Parameters
Parameter | Type | Description |
---|---|---|
key | String | Willvinne API key. Contact Willvinne to get your own API key. |
database | String | Name of the database |
databaseKey | String | Database access key |
path | String | Data path (e.g. users/user1) |
value | JSON | Data (for POST method) |
key | String | API key |
Example Requests
GET request example:
GET https://willvinne.com/api/database.php?key=YOUR_API_KEY&database=YOUR_DATABASE_NAME&databaseKey=YOUR_DATABASE_KEY&path=users/1
(Also you can use "/" to path for get all database.)
POST request example to save data:
POST https://willvinne.com/api/database.php?key=YOUR_API_KEY&database=YOUR_DATABASE_NAME&databaseKey=YOUR_DATABASE_KEY&path=users&value={"firstName":"John","lastName":"Doe"}
DELETE request example:
DELETE https://willvinne.com/api/database.php?key=YOUR_API_KEY&database=YOUR_DATABASE_NAME&databaseKey=YOUR_DATABASE_KEY&path=users
(Also you can use "/" to path for delete all database.)
Success Response
Successful request returns:
HTTP/1.1 200 OK
Content-Type: application/json
{
"owner": "willvinne",
"status": true,
"message": "Data operation completed successfully.",
"data": {DATA}
}
Error Responses
1. 400 Bad Request
- Status: Bad Request
- Code: 400
- Description: Missing or incorrect parameters such as
database
,databaseKey
,path
, etc.
2. 401 Unauthorized
- Status: Unauthorized
- Code: 401
- Description: Invalid API key provided, or the API key is not authorized.
3. 403 Forbidden
- Status: Forbidden
- Code: 403
- Description: Access denied to the specified
database
ordatabaseKey
.
4. 404 Not Found
- Status: Not Found
- Code: 404
- Description: Requested
path
ordatabase
does not exist.
5. 409 Conflict
- Status: Conflict
- Code: 409
- Description: Conflict error, such as when trying to update an already existing record.
6. 500 Internal Server Error
- Status: Internal Server Error
- Code: 500
- Description: An unexpected server-side error occurred.
7. 422 Unprocessable Entity
- Status: Unprocessable Entity
- Code: 422
- Description: Invalid data structure or processing errors in the database operation.