API Documentation
This section documents the available DiCRA API endpoints for regions, layer configuration, analytics, tiles, crop fire, LULC, use cases, and livestock data.
Base URL
https://api-v2-dicra.dev2prod.co/api/v2
1. Core Data Management (Regions and Categories)
Get All Regions
Retrieves all supported geographical regions.
| Detail | Value |
|---|---|
| Endpoint | /getallregion |
| Method | GET |
Response (200)
[
{"name": "TELANGANA", "id": 1},
{"name": "UTTARAKHAND", "id": 2}
]
Create Region
Registers a new region.
| Detail | Value |
|---|---|
| Endpoint | /createregion |
| Method | POST |
Request Body
| Parameter | Type | Description |
|---|---|---|
name | string | Display name of the new region |
type | string | Region type (state or UT) |
region_req_name | string | Region name used by frontend |
{
"name": "string",
"type": "string",
"region_req_name": "string"
}
Response (200)
{
"success": true,
"Created_id": 1
}
Get All Categories
Retrieves all data categories.
| Detail | Value |
|---|---|
| Endpoint | /getallcategory |
| Method | GET |
Response (200)
[
{"category_name": "SOCIO-ECONOMIC", "id": 1},
{"category_name": "Environmental", "id": 2}
]
Create Category
Registers a new data category.
| Detail | Value |
|---|---|
| Endpoint | /createcategory |
| Method | POST |
Request Body (implied): category name.
Delete Category
Deletes a category.
| Detail | Value |
|---|---|
| Endpoint | /deletecategory |
| Method | DELETE |
Request Body (implied): category id.
2. Layer Configuration and Metadata
Get Layer Configuration
Retrieves layer configuration by region.
| Detail | Value |
|---|---|
| Endpoint | /getlayerconfig |
| Method | GET |
| Query Parameter | regionid (integer) |
Example: /getlayerconfig?regionid=1
Response (200, sample)
[
{
"isavailable": true,
"long_description": "NDVI quantifies vegetation...",
"display_name": "Normalized Difference Vegetation Index (NDVI)",
"layer_name": "NDVI",
"vector_status": true,
"yaxislabel": "NDVI",
"citation": "https://developers.google.com/earth-engine/datasets/catalog/MODIS_061_MOD13Q1#citations",
"showcustom": true,
"category_id": 1,
"short_description": "Normalized difference vegetation index",
"id": 2,
"raster_status": true
}
]
Create Layer
Creates a layer configuration.
| Detail | Value |
|---|---|
| Endpoint | /createlayer |
| Method | POST |
Request Body (sample)
{
"unit": "string",
"xaxislabel": "string",
"isavailable": true,
"layer_name": "string",
"citation": "string",
"last_updated": "2025-11-13T06:42:52.269Z",
"standards": "string",
"short_description": "string",
"raster_status": true,
"timerangefilter": true,
"long_description": "string",
"vector_status": true,
"showcustom": true,
"source": "string",
"multiple_files": true,
"datafromvector": true,
"url": "string",
"display_name": "string",
"yaxislabel": "string",
"region_id": 0,
"category_id": 0
}
Update Layer
Updates an existing layer configuration.
| Detail | Value |
|---|---|
| Endpoint | /updatelayer |
| Method | POST |
Request Body: same as Create Layer.
Delete Layer
Deletes an existing layer configuration.
| Detail | Value |
|---|---|
| Endpoint | /deletelayer |
| Method | DELETE |
Request Body (implied): layer_id.
Add Available Date (Parameter)
Registers an available date for a layer.
| Detail | Value |
|---|---|
| Endpoint | /addparameter |
| Method | POST |
{
"available_date": "2025-11-13",
"layer_id": 0
}
Delete Available Date (Parameter)
Removes an available date for a layer.
| Detail | Value |
|---|---|
| Endpoint | /deleteparameter |
| Method | DELETE |
{
"available_date": "2025-11-13",
"layer_id": 0
}
3. Data Analytics and Trend Retrieval
Get Trend (Area-based)
Retrieves time-series trend data for a layer within a GeoJSON area.
| Detail | Value |
|---|---|
| Endpoint | /gettrendzarr |
| Method | POST |
{
"geojson": {},
"startdate": "string",
"enddate": "string",
"layer_id": "string",
"state_name": "string"
}
Response (200)
{
"code": 200,
"trend": [
[1731715200000, 0.45],
[1733097600000, 0.47]
]
}
Get Trend (Point-based)
Retrieves time-series trend data for a specific latitude/longitude.
| Detail | Value |
|---|---|
| Endpoint | /getpointtrendzarr |
| Method | POST |
{
"latitude": "string",
"longitude": "string",
"startdate": "string",
"enddate": "string",
"layer_id": "string",
"state_name": "string"
}
Get Zonal Statistics
Returns min, max, mean, and sum for a layer within a GeoJSON area and date.
| Detail | Value |
|---|---|
| Endpoint | /getzstat |
| Method | POST |
{
"geojson": {},
"date": "string",
"layer_id": "string",
"state_name": "string"
}
Response (200)
{
"code": 200,
"stat": {
"min": -0.05,
"max": 0.83,
"mean": 0.61,
"sum": 1031.89
}
}
Get Pixel Value
Returns pixel value for a layer at a point.
| Detail | Value |
|---|---|
| Endpoint | /getpixel |
| Method | POST |
{
"latitude": "string",
"longitude": "string",
"layer_id": "string",
"state_name": "string"
}
Response (200)
{
"code": 200,
"pixelvalue": 0.5
}
4. Map and Tile Service Endpoints
Get Current Vector Tile URL
Returns the .pmtiles URL for a layer and boundary type.
| Detail | Value |
|---|---|
| Endpoint | /currentvector |
| Method | GET |
{
"state_name": "string",
"Layer_id": "string",
"admbound": "SubDistrict/District"
}
Response (200)
{
"code": 200,
"vectorUrl": "https://dicratiler.blob.core.windows.net/dicra-dev/parameters/3/VECTOR/MANDAL/24-10-2025.pmtiles"
}
Get Raster Tile URL
Returns raster tile URL.
| Detail | Value |
|---|---|
| Endpoint | /getrastourl |
| Method | POST |
{
"state_name": "string",
"Layer_id": "string"
}
Response (200)
{
"code": 200,
"rasterlayerUrl": "https://dicratiler.blob.core.windows.net/dicra-dev/parameters/2/RASTER_TILE/raster_tile.tif"
}
Get Blob Date
Returns available blob date information by layer.
| Detail | Value |
|---|---|
| Endpoint | /geblobdate |
| Method | POST |
{
"state_name": "string",
"layer_type": "string",
"Layer_id": "string"
}
Alternate request format used in source:
{
"date": "string",
"state_name": "string",
"layer_type": "string",
"Layer_id": "string"
}
Get Warehouse Tile URL
Returns warehouse vector tile URL.
| Detail | Value |
|---|---|
| Endpoint | /warehouses |
| Method | POST |
{
"state_name": "string",
"Layer_id": "string"
}
Get Cold Storage URL
Returns cold storage vector tile URL.
| Detail | Value |
|---|---|
| Endpoint | /coldstoage |
| Method | POST |
{
"state_name": "string",
"Layer_id": "string"
}
Get District Name
Returns district names for custom-boundary workflows.
| Detail | Value |
|---|---|
| Endpoint | /getdistrictname |
| Method | POST |
{
"geojson": {}
}
5. Crop Fire Endpoints
Get Crop Fire Tile URL
Returns crop fire vector tile URL.
| Detail | Value |
|---|---|
| Endpoint | /cropfire |
| Method | POST |
{
"state_name": "string",
"Layer_id": "string"
}
Get Crop Fire Points
Returns crop fire points in area/time window.
| Detail | Value |
|---|---|
| Endpoint | /cropfiregetpoint |
| Method | POST |
{
"geojson": {},
"startdate": "string",
"enddate": "string",
"layer_id": "string",
"state_name": "string"
}
Response (200, sample)
[
{
"code": 200,
"properties": [
{
"brightness": 314.88,
"acq_date": "2023-12-01",
"confidence": 60,
"geometry": "POINT (80.16143 18.16142)"
}
]
},
{"count": 2}
]
Get Crop Fire Events Trend
Returns crop fire event count trend.
| Detail | Value |
|---|---|
| Endpoint | /cropfireeventstrend |
| Method | POST |
{
"geojson": {},
"startdate": "string",
"enddate": "string",
"layer_id": "string",
"state_name": "string"
}
Response (200)
{
"code": 200,
"trend": [
[1610928000000, 1],
[1613520000000, 2]
]
}
6. Land Use Land Cover (LULC) Endpoints
Get LULC Area
Calculates total area per LULC class in a GeoJSON area.
| Detail | Value |
|---|---|
| Endpoint | /getlulcarea |
| Method | POST |
{
"geojson": {},
"layer_id": "string",
"state_name": "string"
}
Response (200, sample)
{
"code": 200,
"classes": {"1": "Water", "2": "Trees"},
"data": {
"01-01-2017": {"1": 215632, "2": 73464},
"01-01-2018": {"1": 145454, "2": 49001}
}
}
Get LULC Area Percentage
Calculates class-wise area percentages over time.
| Detail | Value |
|---|---|
| Endpoint | /getlulcareapercentage |
| Method | POST |
Request Body: same as /getlulcarea.
Response (200): includes classes, percentage data by date/class, and trend series.
7. Use Case and Download Management
Create Use Case
Creates a use case entry (multipart form-data with image upload).
| Detail | Value |
|---|---|
| Endpoint | /createusecase |
| Method | POST |
Form Fields
| Parameter | Type | Description |
|---|---|---|
project_name | string | Project name |
project_type | string | Project classification |
short_description | string | Brief summary |
long_description | string | Detailed description |
url | string | Project URL |
image | UploadFile | Image file |
username | string | Creator name |
email_id | string | Creator email |
region_id | integer | Associated region ID |
Get Use Cases (Paginated)
Retrieves use cases with filtering and pagination.
| Detail | Value |
|---|---|
| Endpoint | /usecases/limit-offset |
| Method | GET |
Query Parameters (implied): region, limit, offset.
Update Use Case URL
Updates URL for a use case.
| Detail | Value |
|---|---|
| Endpoint | /updateusercase/{usecase_id} |
| Method | POST |
Path Parameter: usecase_id (integer).
8. Livestock Endpoints
Get THI Forecast
Returns THI values for upcoming days.
| Detail | Value |
|---|---|
| Endpoint | /thi-forecast |
| Method | POST |
{
"latitude": "string",
"longitude": "string"
}
Response (200, sample)
[
{
"time": "2026-02-18",
"info": [{"type": "THI", "label": "THI", "value": 70}]
},
{
"time": "2026-02-19",
"info": [{"type": "THI", "label": "THI", "value": 69.7}]
}
]
Get THI Trend
Returns historical THI trend.
| Detail | Value |
|---|---|
| Endpoint | /thi-trend |
| Method | POST |
start_date and end_date use YYYY-MM-DD.
{
"latitude": "string",
"longitude": "string",
"start_date": "string",
"end_date": "string"
}
Response (200, sample)
[
{"date_time": "2026-02-10", "value": 67.36},
{"date_time": "2026-02-11", "value": 67.98}
]
Get Livestock Census
Returns district-level livestock census data.
| Detail | Value |
|---|---|
| Endpoint | /livestock-census |
| Method | POST |
{
"state_name": "string",
"district_name": "string"
}
Response (200, sample)
{
"code": 200,
"data": {
"fid": 91,
"state_name": "Odisha",
"district_name": "Cuttack",
"cattle": 548770,
"sheep": 67753,
"horse": 5,
"mule": 2,
"camel": 0,
"buffalo": 14827,
"goat": 221665,
"pony": 2,
"donkey": 1,
"pig": 932,
"total_animals": 853957,
"total_poultry": 1403204,
"vet_hospitals": 0,
"vet_doctors": 0,
"id": 251
}
}
Get Latest THI Data Token
Returns latest blob token/date value for THI.
| Detail | Value |
|---|---|
| Endpoint | /thi-latest-date |
| Method | GET |
Response (200, sample)
eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..XMxyoR4vX4uULjHz...