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

Authorization: <YOUR_API_KEY>

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.

NameTypeRequiredDescription
aoi_idstringYesUnique ID of the AOI
insight_idstringYesID 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.

NameTypeRequiredDescription
project_idstringYesID 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.

400 403
{
  "error": {
    "code": "<string>",
    "details": "<any>",
    "message": "<string>"
  }
}

How to use the endpoint

  1. 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_id as a query parameter. Also, attach the authorization token in the header.
  2. Send the Request Make a DELETE request to https://api.pixxel.space/v0/aoi/{aoi_id}/insights/{insight_id} using tools like curl, Postman, or your preferred HTTP client. Ensure the Authorization header is set properly.
  3. Examine the Response If the deletion is successful, you’ll receive a 200 OK status with no content. If there’s an issue (e.g., invalid ID or insufficient permissions), you’ll get a 400 or 403 response with a structured error message explaining the problem.