Overview
Welcome to our REST API documentation. This API provides secure access to data entries with support for both retrieval and updates.
Secure Access
Token-based authentication ensures your data remains protected
Flexible Data Types
Support for strings, numbers, JSON objects, and arrays
Fast Response
Optimized for quick data retrieval and updates
Rate Limiting
Fair usage limits to ensure service availability
Authentication
All API requests require authentication using an access key. This ensures that only authorized users can access and modify data.
# GET Request
GET https://nexlab86.dkydivyansh.com/api/v1/public/data?id=123&access_key=YOUR_ACCESS_KEY
# PUT Request
{
"access_key": "YOUR_ACCESS_KEY",
"type": "string",
"value": "example"
}
Endpoints
GET /api/v1/data.php
Retrieve a data entry by its ID
GET https://nexlab86.dkydivyansh.com/api/v1/public/data?id=123&access_key=YOUR_ACCESS_KEY
PUT /api/v1/data.php
Update an existing data entry
PUT https://nexlab86.dkydivyansh.com/api/v1/public/data?id=123
API Console
Code Examples
JavaScript
# GET Request
async function getData(id, accessKey) {
const response = await fetch(
`/api/v1/data.php?id=${id}&access_key=${accessKey}`
);
return await response.json();
}
# PUT Request
async function updateData(id, accessKey, type, value) {
const response = await fetch(
`/api/v1/data.php?id=${id}`,
{
method: 'PUT',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
access_key: accessKey,
type: type,
value: value
})
}
);
return await response.json();
}
Python
import requests
import json
# GET Request
def get_data(id, access_key):
response = requests.get(
'/api/v1/data.php',
params={'id': id, 'access_key': access_key}
)
return response.json()
# PUT Request
def update_data(id, access_key, type, value):
response = requests.put(
f'/api/v1/data.php?id={id}',
json={
'access_key': access_key,
'type': type,
'value': value
}
)
return response.json()