Create a new visualization
Creates a new visualization for an AOI using the specified index and assets. For preset index types, both dynamic and theoretical legend metadata are auto-computed. For custom index types with expression_type INDEX, only dynamic legend metadata is computed. For custom index types with expression_type composite or grayscale, no legend metadata is generated.
POST/v0/aois/{aoi_id}/visualizations
Authorisations
AuthorizationString
Path Parameters
aoi_idstringrequired
AOI IDRequest Body
index_idstringrequired
UUID of the index to use for this visualizationExample: "3fa85f64-5717-4562-b3fc-2c963f66afa6"src_asset_idsstring[]
Optional list of source asset IDs to include in the visualizationExample: ["e3a671ad-5381-4413-8c1c-bc4e1ccaff45","90d63531-5f54-4704-a4b0-7bb92ae08f23"]resolutionnumber
Optional resolution override. If not provided, defaults to the satellite's default resolutionExample: 10Response
Createdapplication/json
aoi_idstring
Example: "e9767554-550e-4464-a677-b8cf096073ab"assetsobject[]
created_atstring
Example: "2022-11-14 12:55:49.125928+00:00"expressionstring
Example: "(B08 - B04) / (B08 + B04)"expression_typestring
Example: "index"idstring
Example: "a80f7f4c-abe9-4118-875e-3a2306577e11"index_idstring
Example: "90d63531-5f54-4704-a4b0-7bb92ae08f23"index_namestring
Example: "NDVI-Custom"metadataobject
progressinteger
Example: 100rescaleinteger[]
Example: [0,1]statusstring
Example: "success"tenant_idstring
Example: "tenant-123456"typestring
Example: "custom"updated_atstring
Example: "2022-11-14 12:55:49.125928+00:00"user_idstring
Example: "e3a671ad-5381-4413-8c1c-bc4e1ccaff45"Create a new visualization
1curl -X POST 'https://api.pixxel.space/v0/aois/{aoi_id}/visualizations' \2 -H 'Authorization: YOUR_API_KEY' \3 -H 'Content-Type: application/json' \4 -d '{5 "index_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",6 "src_asset_ids": [7 "e3a671ad-5381-4413-8c1c-bc4e1ccaff45",8 "90d63531-5f54-4704-a4b0-7bb92ae08f23"9 ],10 "resolution": 1011}'
Response:
{"aoi_id": "e9767554-550e-4464-a677-b8cf096073ab","assets": [{"aoi_id": "e9767554-550e-4464-a677-b8cf096073ab","area_in_sq_m": 0,"asset_type": "mosaic","band_list": ["B01","B02"],"centroid": [77.55,12.95],"created_at": "2022-11-14 12:55:49.125928+00:00","date": "2022-11-14","description": "This asset is mosaic file","geometry": {"type": "Polygon","coordinates": [[[0]]]},"id": "e9767554-550e-4464-a677-b8cf096073ab","name": "Asset-A","path": "https://storage.account","progress": 0,"resolution": 10,"status": "success","updated_at": "2022-11-14 12:55:49.125928+00:00","visualization_id": "e9767554-550e-4464-a677-b8cf096073ab"}],"created_at": "2022-11-14 12:55:49.125928+00:00","expression": "(B08 - B04) / (B08 + B04)","expression_type": "index","id": "a80f7f4c-abe9-4118-875e-3a2306577e11","index_id": "90d63531-5f54-4704-a4b0-7bb92ae08f23","index_name": "NDVI-Custom","metadata": {"legend": {}},"progress": 100,"rescale": [0,1],"status": "success","tenant_id": "tenant-123456","type": "custom","updated_at": "2022-11-14 12:55:49.125928+00:00","user_id": "e3a671ad-5381-4413-8c1c-bc4e1ccaff45"}