Overview
Use this endpoint to delete an insight that was previously generated for a specific AOI. It is essential to provide the AOI ID and Insight ID in the URL path, along with the associated project ID as a query parameter. A valid authorization token is mandatory. This operation permanently removes the selected insight, so it should be executed with caution. On successful deletion, a 200 OK response is returned. Invalid inputs or unauthorized attempts will trigger appropriate error messages.
-
Method:
DELETE -
Endpoint:
/v0/aoi/{aoi_id}/insights/{insight_id} - Operation: Deletes a specified insight linked to an AOI
Authorization
You need the api key which you can get from the API tab in Organization Settings. The api key is required in almost all the commands
Path Parameters
Path parameters identify the specific AOI and the insight to be deleted. aoi_id targets the Area of Interest, while insight_id specifies the insight under that AOI. This ensures the request is precise and operates only on the intended resource.
| Name | Type | Required | Description |
|---|---|---|---|
aoi_id | string | Yes | Unique ID of the AOI |
insight_id | string | Yes | ID of the insight to delete under the AOI |
Query Parameters
The query parameter project_id is used to validate the project context in which the AOI and insight exist. This helps ensure that the insight deletion is executed in the correct project scope, especially in multi-project environments.
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | ID of the project to which AOI belongs |
Response
A 200 OK response indicates the insight has been successfully deleted. No content is returned in the body. This confirms that the resource was found and removed.A 400 Bad Request is returned when the input parameters are missing or are invalid. A 403 Forbidden is returned when the user is not authorized to delete the insight.
How to use the endpoint
-
Construct your Request:
Ensure you have the required values:- The
aoi_id(Area of Interest ID) - The
insight_id(Insight ID to be deleted) - The
project_idas a query parameter. Also, attach the authorization token in the header.
- The
-
Send the Request:
After adding json body and path parameters make a DELETE request tohttps://api.pixxel.space/v0/aoi/{aoi_id}/insights/{insight_id}. Ensure theAuthorizationheader is set properly. -
Examine the Response:
If the deletion is successful, you’ll receive a200 OKstatus with no content. If there’s an issue (e.g., invalid ID or insufficient permissions), you’ll get a400or403response with a structured error message explaining the problem.