Ceres Public API documentation (2.0.0 (v2))

Download OpenAPI specification:Download

Relevant endpoints to trigger actions or get data from Ceres app

analyses

List analyses

List all analyses sorted by creation date (newest first).

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create analysis

This endpoint receives a request, creates a photo, and saves the analysis without frontend interaction.

Authorizations:
None
Request Body schema:
ticket
required
integer

Associated ticket number.

camera_id
integer or null

Optional camera identifier used when the request must capture a new photo.

commodity
required
string

The name of the existing commodity variety.

Responses

Request samples

Content type
{
  • "ticket": 0,
  • "camera_id": 0,
  • "commodity": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "dataset": [
    ],
  • "ISC": 100,
  • "IRC": 100,
  • "created": "2019-08-24T14:15:22Z",
  • "ticket": 0,
  • "id": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "collection": 0,
  • "photo": {
    },
  • "segmented_photo": {
    }
}

Retrieve analysis

Return a specific analysis along with its associated photos.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis.

Responses

Response samples

Content type
application/json
{
  • "category": "string",
  • "dataset": [
    ],
  • "ISC": 100,
  • "IRC": 100,
  • "created": "2019-08-24T14:15:22Z",
  • "ticket": 0,
  • "id": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "collection": 0,
  • "photo": {
    },
  • "segmented_photo": {
    }
}

Update ticket and commodity

Only ticket and/or commodity fields are accepted.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis.

Request Body schema:
ticket
integer

Ticket number associated with the analysis.

commodity
string

Name of the commercial variety

extra_data
any

Additional metadata associated with the analysis.

Responses

Request samples

Content type
{
  • "ticket": 0,
  • "commodity": "string",
  • "extra_data": null
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "dataset": [
    ],
  • "ISC": 100,
  • "IRC": 100,
  • "created": "2019-08-24T14:15:22Z",
  • "ticket": 0,
  • "id": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "collection": 0
}

Delete analysis

Removes the analysis identified by its ID. Returns HTTP 204 (No Content) on success.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis.

Responses

Get aggregated analyses

Returns aggregation data. Requires filtering by ticket through query params.

Authorizations:
None
query Parameters
ticket
required
integer

Associated ticket number.

Responses

Response samples

Content type
application/json
{
  • "category": "string",
  • "dataset": [
    ],
  • "ISC": 0,
  • "IRC": 0,
  • "created_at_list": [
    ],
  • "tickets": [
    ],
  • "ids": [
    ],
  • "commodities": [
    ],
  • "extra_data_list": [
    ]
}

analysis-collections

List analysis collections

List analysis collections using standard DRF pagination. By default, the most recently modified collections are returned first.

Authorizations:
None
query Parameters
ordering
string

Comma-separated fields used to order the results. Prefix a field with '-' for descending order. Allowed fields: id, ticket, created, last_modified, commodity.

page
integer

Page number to retrieve.

page_size
integer

Number of collections per page.

search
string

Un término de búsqueda.

Responses

Response samples

Content type
application/json
{}

Create analysis collection

Create a new analysis collection for the selected ticket and commodity.

Authorizations:
None
Request Body schema:
ticket
integer or null

Ticket number associated with the analysis.

commodity
required
integer

Name of the commercial variety.

extra_data
any

Additional metadata associated with the analysis collection.

Responses

Request samples

Content type
{
  • "ticket": 0,
  • "commodity": 0,
  • "extra_data": null
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "created": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z",
  • "analyses_count": 0,
  • "category": "string",
  • "ISC": 0,
  • "IRC": 0,
  • "latest_continuous_run": { },
  • "dataset": [
    ],
  • "analyses": [
    ]
}

Retrieve analysis collection

Return a collection with its aggregated data and linked analyses.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "created": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z",
  • "analyses_count": 0,
  • "category": "string",
  • "ISC": 0,
  • "IRC": 0,
  • "latest_continuous_run": { },
  • "dataset": [
    ],
  • "analyses": [
    ]
}

Update analysis collection

Update the ticket, commodity, or extra data of an existing collection.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

Request Body schema:
ticket
integer or null

Ticket number associated with the analysis.

commodity
integer

Name of the commercial variety.

extra_data
any

Additional metadata associated with the analysis collection.

Responses

Request samples

Content type
{
  • "ticket": 0,
  • "commodity": 0,
  • "extra_data": null
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "created": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z",
  • "analyses_count": 0,
  • "category": "string",
  • "ISC": 0,
  • "IRC": 0,
  • "latest_continuous_run": { },
  • "dataset": [
    ],
  • "analyses": [
    ]
}

Delete collection

Removes the collection and all analyses linked to it.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

Responses

Collection analyses

List or create analyses inside the collection. GET uses standard DRF pagination.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

query Parameters
ordering
string

Comma-separated fields used to order the results. Prefix a field with '-' for descending order. Allowed fields: id, created, last_modified, indice_sanitario_ceresia, indice_recogida_ceresia, category.

page
integer

Page number to retrieve.

page_size
integer

Number of analyses per page.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "commodity": "string",
  • "camera": {
    },
  • "thumbnail": "string",
  • "category": {
    },
  • "indice_sanitario_ceresia": 0,
  • "indice_recogida_ceresia": 0,
  • "collection": 0,
  • "dataset": [
    ]
}

Collection analyses

List or create analyses inside the collection. GET uses standard DRF pagination.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

query Parameters
ordering
string

Comma-separated fields used to order the results. Prefix a field with '-' for descending order. Allowed fields: id, created, last_modified, indice_sanitario_ceresia, indice_recogida_ceresia, category.

page
integer

Page number to retrieve.

page_size
integer

Number of analyses per page.

Request Body schema:
photo
integer

The photograph under analysis, returned compressed at 30% quality.

camera_id
integer or null

Optional camera identifier used when the request must capture a new photo.

Responses

Request samples

Content type
{
  • "photo": 0,
  • "camera_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "commodity": "string",
  • "camera": {
    },
  • "thumbnail": "string",
  • "category": {
    },
  • "indice_sanitario_ceresia": 0,
  • "indice_recogida_ceresia": 0,
  • "collection": 0,
  • "dataset": [
    ]
}

api

Get adjacent retained photos

Global order: collection ID, creation date, photo evaluation ID. Only evaluations with original and segmented photos are destinations. List filters and pagination do not affect this operation.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis.

Responses

Response samples

Content type
application/json
{
  • "previous": 0,
  • "next": 0
}

List campaign analysis collections

List campaign analysis collections using standard DRF pagination and optionally include each collection's aggregated dataset.

Authorizations:
None
query Parameters
include_dataset
boolean

Include the aggregated dataset in each collection summary.

include_thumbnail
boolean

Include the collection thumbnail in each summary. Defaults to true; set false for compact responses such as campaign analysis.

ordering
string

Comma-separated fields used to order the results. Prefix a field with '-' for descending order. Allowed fields: id, ticket, created, last_modified, commodity.

page
integer

Page number to retrieve.

page_size
integer

Number of collections per page.

search
string

Un término de búsqueda.

Responses

Response samples

Content type
application/json
{
  • "count": 123,
  • "results": [
    ]
}

Create analysis collection

Create a new analysis collection for the selected ticket and commodity.

Authorizations:
None
Request Body schema:
ticket
integer or null

Ticket number associated with the analysis.

commodity
required
integer

Name of the commercial variety.

extra_data
any

Additional metadata associated with the analysis collection.

Responses

Request samples

Content type
{
  • "ticket": 0,
  • "commodity": 0,
  • "extra_data": null
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "created": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z",
  • "analyses_count": 0,
  • "category": "string",
  • "ISC": 0,
  • "IRC": 0,
  • "latest_continuous_run": { },
  • "dataset": [
    ],
  • "analyses": [
    ]
}

Retrieve analysis collection

Return a collection with its aggregated data and linked analyses.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "created": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z",
  • "analyses_count": 0,
  • "category": "string",
  • "ISC": 0,
  • "IRC": 0,
  • "latest_continuous_run": { },
  • "dataset": [
    ],
  • "analyses": [
    ]
}

Update analysis collection

Update the ticket, commodity, or extra data of an existing collection.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

Request Body schema:
ticket
integer or null

Ticket number associated with the analysis.

commodity
integer

Name of the commercial variety.

extra_data
any

Additional metadata associated with the analysis collection.

Responses

Request samples

Content type
{
  • "ticket": 0,
  • "commodity": 0,
  • "extra_data": null
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "created": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z",
  • "analyses_count": 0,
  • "category": "string",
  • "ISC": 0,
  • "IRC": 0,
  • "latest_continuous_run": { },
  • "dataset": [
    ],
  • "analyses": [
    ]
}

Delete collection

Removes the collection and all analyses linked to it.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

Responses

Collection analyses

List or create analyses inside the collection. GET uses standard DRF pagination.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

query Parameters
ordering
string

Comma-separated fields used to order the results. Prefix a field with '-' for descending order. Allowed fields: id, created, last_modified, indice_sanitario_ceresia, indice_recogida_ceresia, category.

page
integer

Page number to retrieve.

page_size
integer

Number of analyses per page.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "commodity": "string",
  • "camera": {
    },
  • "thumbnail": "string",
  • "category": {
    },
  • "indice_sanitario_ceresia": 0,
  • "indice_recogida_ceresia": 0,
  • "collection": 0,
  • "dataset": [
    ]
}

Collection analyses

List or create analyses inside the collection. GET uses standard DRF pagination.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

query Parameters
ordering
string

Comma-separated fields used to order the results. Prefix a field with '-' for descending order. Allowed fields: id, created, last_modified, indice_sanitario_ceresia, indice_recogida_ceresia, category.

page
integer

Page number to retrieve.

page_size
integer

Number of analyses per page.

Request Body schema:
photo
integer

The photograph under analysis, returned compressed at 30% quality.

camera_id
integer or null

Optional camera identifier used when the request must capture a new photo.

Responses

Request samples

Content type
{
  • "photo": 0,
  • "camera_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "commodity": "string",
  • "camera": {
    },
  • "thumbnail": "string",
  • "category": {
    },
  • "indice_sanitario_ceresia": 0,
  • "indice_recogida_ceresia": 0,
  • "collection": 0,
  • "dataset": [
    ]
}

Get adjacent analysis collections

Global collection ID order, independent of list filters or pagination.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

Responses

Response samples

Content type
application/json
{
  • "previous": 0,
  • "next": 0
}

Ticket autocomplete options

Return up to 20 lightweight analysis collection options matching the Ticket representation. This operation is private-only.

Authorizations:
None
query Parameters
query
required
string

Partial or exact text to match against the Ticket.

Responses

Response samples

Content type
application/json
{
  • "results": [
    ]
}

api_v2_private_continuous_runs_list

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Start continuous analysis

Create a continuous analysis run for a camera and enqueue frame capture.

Authorizations:
None
Request Body schema:
camera
required
integer
collection
integer or null
ticket
integer or null
commodity
integer
extra_data
any

Responses

Request samples

Content type
{
  • "camera": 0,
  • "collection": 0,
  • "ticket": 0,
  • "commodity": 0,
  • "extra_data": null
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

api_v2_private_continuous_runs_retrieve

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

Pause continuous analysis

Pause frame capture while preserving the run and collection.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

Resume continuous analysis

Resume a paused or failed run using the same collection.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

Stop continuous analysis

Request a running continuous analysis to stop.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Request Body schema:
status
string
Enum: "running" "degraded" "paused" "stopping" "draining" "stopped" "failed"

Status of the continuous analysis run. Values: running = actively capturing frames, degraded = capturing with errors, paused = capture paused, stopping = stop requested, draining = processing queued frames, stopped = stopped successfully, failed = ended with an error.

  • running - Actively capturing frames
  • degraded - Capturing with processing errors
  • paused - Capture paused
  • stopping - Stop requested
  • draining - Processing queued frames
  • stopped - Stopped successfully
  • failed - Ended with an error
frames_captured
integer [ 0 .. 2147483647 ]
analyses_processed
integer [ 0 .. 2147483647 ]
failed_frames_count
integer [ 0 .. 2147483647 ]
consecutive_failures
integer [ 0 .. 2147483647 ]
error_message
string
started_at
string or null <date-time>
stopped_at
string or null <date-time>

Responses

Request samples

Content type
{
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "error_message": "string",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

Features of the photo

This endpoint shows the feature types that can appear in an analysis.

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

api_v2_private_improvement_samples_list

Authorizations:
None
query Parameters
foto_id
integer

Identificador histórico de la foto de origen.

page
integer

Un número de página dentro del conjunto de resultados paginado.

page_size
integer

Número de resultados a devolver por página.

Responses

Response samples

Content type
application/json
{}

api_v2_private_improvement_samples_create

Authorizations:
None
Request Body schema:
foto_id
required
integer <int64> [ 0 .. 9223372036854776000 ]
x
required
integer [ 0 .. 2147483647 ]
y
required
integer [ 0 .. 2147483647 ]
comment
string <= 4000 characters

Responses

Request samples

Content type
{
  • "foto_id": 9223372036854776000,
  • "x": 2147483647,
  • "y": 2147483647,
  • "comment": "string"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "foto_id": 9223372036854776000,
  • "site_name": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "x": 2147483647,
  • "y": 2147483647,
  • "comment": "string",
  • "status": "string"
}

api_v2_private_improvement_samples_retrieve

Authorizations:
None
path Parameters
id
required
string <uuid>

Un Cadena UUID que identifique este improvement sample.

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "foto_id": 9223372036854776000,
  • "site_name": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "x": 2147483647,
  • "y": 2147483647,
  • "comment": "string",
  • "status": "string"
}

api_v2_private_improvement_samples_destroy

Authorizations:
None
path Parameters
id
required
string <uuid>

Un Cadena UUID que identifique este improvement sample.

Responses

api_v2_private_improvement_samples_image_retrieve

Authorizations:
None
path Parameters
id
required
string <uuid>

Un Cadena UUID que identifique este improvement sample.

Responses

List analyses

List all analyses sorted by creation date (newest first).

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create analysis

This endpoint receives a request, creates a photo, and saves the analysis without frontend interaction.

Authorizations:
None
Request Body schema:
ticket
required
integer

Associated ticket number.

camera_id
integer or null

Optional camera identifier used when the request must capture a new photo.

commodity
required
string

The name of the existing commodity variety.

Responses

Request samples

Content type
{
  • "ticket": 0,
  • "camera_id": 0,
  • "commodity": "string"
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "dataset": [
    ],
  • "ISC": 100,
  • "IRC": 100,
  • "created": "2019-08-24T14:15:22Z",
  • "ticket": 0,
  • "id": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "collection": 0,
  • "photo": {
    },
  • "segmented_photo": {
    }
}

Retrieve analysis

Return a specific analysis along with its associated photos.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis.

Responses

Response samples

Content type
application/json
{
  • "category": "string",
  • "dataset": [
    ],
  • "ISC": 100,
  • "IRC": 100,
  • "created": "2019-08-24T14:15:22Z",
  • "ticket": 0,
  • "id": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "collection": 0,
  • "photo": {
    },
  • "segmented_photo": {
    }
}

Update ticket and commodity

Only ticket and/or commodity fields are accepted.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis.

Request Body schema:
ticket
integer

Ticket number associated with the analysis.

commodity
string

Name of the commercial variety

extra_data
any

Additional metadata associated with the analysis.

Responses

Request samples

Content type
{
  • "ticket": 0,
  • "commodity": "string",
  • "extra_data": null
}

Response samples

Content type
application/json
{
  • "category": "string",
  • "dataset": [
    ],
  • "ISC": 100,
  • "IRC": 100,
  • "created": "2019-08-24T14:15:22Z",
  • "ticket": 0,
  • "id": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "collection": 0
}

Delete analysis

Removes the analysis identified by its ID. Returns HTTP 204 (No Content) on success.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis.

Responses

Get aggregated analyses

Returns aggregation data. Requires filtering by ticket through query params.

Authorizations:
None
query Parameters
ticket
required
integer

Associated ticket number.

Responses

Response samples

Content type
application/json
{
  • "category": "string",
  • "dataset": [
    ],
  • "ISC": 0,
  • "IRC": 0,
  • "created_at_list": [
    ],
  • "tickets": [
    ],
  • "ids": [
    ],
  • "commodities": [
    ],
  • "extra_data_list": [
    ]
}

List analysis collections

List analysis collections using standard DRF pagination. By default, the most recently modified collections are returned first.

Authorizations:
None
query Parameters
ordering
string

Comma-separated fields used to order the results. Prefix a field with '-' for descending order. Allowed fields: id, ticket, created, last_modified, commodity.

page
integer

Page number to retrieve.

page_size
integer

Number of collections per page.

search
string

Un término de búsqueda.

Responses

Response samples

Content type
application/json
{}

Create analysis collection

Create a new analysis collection for the selected ticket and commodity.

Authorizations:
None
Request Body schema:
ticket
integer or null

Ticket number associated with the analysis.

commodity
required
integer

Name of the commercial variety.

extra_data
any

Additional metadata associated with the analysis collection.

Responses

Request samples

Content type
{
  • "ticket": 0,
  • "commodity": 0,
  • "extra_data": null
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "created": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z",
  • "analyses_count": 0,
  • "category": "string",
  • "ISC": 0,
  • "IRC": 0,
  • "latest_continuous_run": { },
  • "dataset": [
    ],
  • "analyses": [
    ]
}

Retrieve analysis collection

Return a collection with its aggregated data and linked analyses.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "created": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z",
  • "analyses_count": 0,
  • "category": "string",
  • "ISC": 0,
  • "IRC": 0,
  • "latest_continuous_run": { },
  • "dataset": [
    ],
  • "analyses": [
    ]
}

Update analysis collection

Update the ticket, commodity, or extra data of an existing collection.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

Request Body schema:
ticket
integer or null

Ticket number associated with the analysis.

commodity
integer

Name of the commercial variety.

extra_data
any

Additional metadata associated with the analysis collection.

Responses

Request samples

Content type
{
  • "ticket": 0,
  • "commodity": 0,
  • "extra_data": null
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": 0,
  • "commodity": "string",
  • "extra_data": null,
  • "created": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z",
  • "analyses_count": 0,
  • "category": "string",
  • "ISC": 0,
  • "IRC": 0,
  • "latest_continuous_run": { },
  • "dataset": [
    ],
  • "analyses": [
    ]
}

Delete collection

Removes the collection and all analyses linked to it.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

Responses

Collection analyses

List or create analyses inside the collection. GET uses standard DRF pagination.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

query Parameters
ordering
string

Comma-separated fields used to order the results. Prefix a field with '-' for descending order. Allowed fields: id, created, last_modified, indice_sanitario_ceresia, indice_recogida_ceresia, category.

page
integer

Page number to retrieve.

page_size
integer

Number of analyses per page.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "commodity": "string",
  • "camera": {
    },
  • "thumbnail": "string",
  • "category": {
    },
  • "indice_sanitario_ceresia": 0,
  • "indice_recogida_ceresia": 0,
  • "collection": 0,
  • "dataset": [
    ]
}

Collection analyses

List or create analyses inside the collection. GET uses standard DRF pagination.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este analysis collection.

query Parameters
ordering
string

Comma-separated fields used to order the results. Prefix a field with '-' for descending order. Allowed fields: id, created, last_modified, indice_sanitario_ceresia, indice_recogida_ceresia, category.

page
integer

Page number to retrieve.

page_size
integer

Number of analyses per page.

Request Body schema:
photo
integer

The photograph under analysis, returned compressed at 30% quality.

camera_id
integer or null

Optional camera identifier used when the request must capture a new photo.

Responses

Request samples

Content type
{
  • "photo": 0,
  • "camera_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "ticket": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "commodity": "string",
  • "camera": {
    },
  • "thumbnail": "string",
  • "category": {
    },
  • "indice_sanitario_ceresia": 0,
  • "indice_recogida_ceresia": 0,
  • "collection": 0,
  • "dataset": [
    ]
}

api_v2_public_cameras_list

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Varieties of the fruit

This endpoint shows all fruit varieties that can be used in analyses.

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create variety

Creates a new fruit variety.

Authorizations:
None
Request Body schema:
name
required
string <= 200 characters

Name of the commercial variety

display_name
string <= 200 characters

Human-readable label shown in the UI. If left empty, it defaults to the value of 'name'.

Responses

Request samples

Content type
{
  • "name": "string",
  • "display_name": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "display_name": "string"
}

Retrieve variety

Retrieve the details of a variety by its ID.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este commodity.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "display_name": "string"
}

Update variety

Completely replaces an existing variety.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este commodity.

Request Body schema:
name
required
string <= 200 characters

Name of the commercial variety

display_name
string <= 200 characters

Human-readable label shown in the UI. If left empty, it defaults to the value of 'name'.

Responses

Request samples

Content type
{
  • "name": "NuevaVariedad",
  • "display_name": "Variedad Nueva"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "display_name": "string"
}

Partially update variety

Performs a partial update of specific variety fields.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este commodity.

Request Body schema:
name
string <= 200 characters

Name of the commercial variety

display_name
string <= 200 characters

Human-readable label shown in the UI. If left empty, it defaults to the value of 'name'.

Responses

Request samples

Content type
{
  • "name": "VariedadActualizada",
  • "display_name": "Variedad Nueva"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "display_name": "string"
}

Delete variety

Deletes a variety by its ID.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este commodity.

Responses

Start public continuous analysis

Create a public continuous analysis run for a selected camera and enqueue frame capture.

Authorizations:
None
Request Body schema:
collection
integer or null
ticket
integer or null
commodity
integer
extra_data
any
camera_id
integer or null

Optional camera identifier used to start the public continuous run.

Responses

Request samples

Content type
{
  • "collection": 0,
  • "ticket": 0,
  • "commodity": 0,
  • "extra_data": null,
  • "camera_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

api_v2_public_continuous_runs_retrieve

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

Pause public continuous analysis

Pause frame capture while preserving the run and collection.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

Resume public continuous analysis

Resume a paused or failed run using the same collection.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

Stop public continuous analysis

Request a public continuous analysis run to stop.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Request Body schema:
status
string
Enum: "running" "degraded" "paused" "stopping" "draining" "stopped" "failed"

Status of the continuous analysis run. Values: running = actively capturing frames, degraded = capturing with errors, paused = capture paused, stopping = stop requested, draining = processing queued frames, stopped = stopped successfully, failed = ended with an error.

  • running - Actively capturing frames
  • degraded - Capturing with processing errors
  • paused - Capture paused
  • stopping - Stop requested
  • draining - Processing queued frames
  • stopped - Stopped successfully
  • failed - Ended with an error
frames_captured
integer [ 0 .. 2147483647 ]
analyses_processed
integer [ 0 .. 2147483647 ]
failed_frames_count
integer [ 0 .. 2147483647 ]
consecutive_failures
integer [ 0 .. 2147483647 ]
error_message
string
started_at
string or null <date-time>
stopped_at
string or null <date-time>

Responses

Request samples

Content type
{
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "error_message": "string",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

Features of the photo

This endpoint shows the feature types that can appear in an analysis.

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

api_config_retrieve

Devuelve la configuración global de la aplicación.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "site_name": "string",
  • "fruit": "uva",
  • "idioma": "es",
  • "contact_email": "user@example.com",
  • "continuous_analysis_limit": 1,
  • "continuous_queue_warning_threshold": 1,
  • "continuous_queue_hard_limit": 1,
  • "continuous_processing_failure_threshold": 1,
  • "cameras": [
    ],
  • "deployment_version": "string",
  • "site_logo_url": "string"
}

api_config_site_logo_retrieve

Authorizations:
None

Responses

cameras

cameras_list

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

commodities

Varieties of the fruit

This endpoint shows all fruit varieties that can be used in analyses.

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create variety

Creates a new fruit variety.

Authorizations:
None
Request Body schema:
name
required
string <= 200 characters

Name of the commercial variety

display_name
string <= 200 characters

Human-readable label shown in the UI. If left empty, it defaults to the value of 'name'.

Responses

Request samples

Content type
{
  • "name": "string",
  • "display_name": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "display_name": "string"
}

Retrieve variety

Retrieve the details of a variety by its ID.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este commodity.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "display_name": "string"
}

Update variety

Completely replaces an existing variety.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este commodity.

Request Body schema:
name
required
string <= 200 characters

Name of the commercial variety

display_name
string <= 200 characters

Human-readable label shown in the UI. If left empty, it defaults to the value of 'name'.

Responses

Request samples

Content type
{
  • "name": "NuevaVariedad",
  • "display_name": "Variedad Nueva"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "display_name": "string"
}

Partially update variety

Performs a partial update of specific variety fields.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este commodity.

Request Body schema:
name
string <= 200 characters

Name of the commercial variety

display_name
string <= 200 characters

Human-readable label shown in the UI. If left empty, it defaults to the value of 'name'.

Responses

Request samples

Content type
{
  • "name": "VariedadActualizada",
  • "display_name": "Variedad Nueva"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "display_name": "string"
}

Delete variety

Deletes a variety by its ID.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este commodity.

Responses

continuous-runs

Start public continuous analysis

Create a public continuous analysis run for a selected camera and enqueue frame capture.

Authorizations:
None
Request Body schema:
collection
integer or null
ticket
integer or null
commodity
integer
extra_data
any
camera_id
integer or null

Optional camera identifier used to start the public continuous run.

Responses

Request samples

Content type
{
  • "collection": 0,
  • "ticket": 0,
  • "commodity": 0,
  • "extra_data": null,
  • "camera_id": 0
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

continuous_runs_retrieve

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

Pause public continuous analysis

Pause frame capture while preserving the run and collection.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

Resume public continuous analysis

Resume a paused or failed run using the same collection.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

Stop public continuous analysis

Request a public continuous analysis run to stop.

Authorizations:
None
path Parameters
id
required
integer

Un valor de entero único que identifique este continuous analysis run.

Request Body schema:
status
string
Enum: "running" "degraded" "paused" "stopping" "draining" "stopped" "failed"

Status of the continuous analysis run. Values: running = actively capturing frames, degraded = capturing with errors, paused = capture paused, stopping = stop requested, draining = processing queued frames, stopped = stopped successfully, failed = ended with an error.

  • running - Actively capturing frames
  • degraded - Capturing with processing errors
  • paused - Capture paused
  • stopping - Stop requested
  • draining - Processing queued frames
  • stopped - Stopped successfully
  • failed - Ended with an error
frames_captured
integer [ 0 .. 2147483647 ]
analyses_processed
integer [ 0 .. 2147483647 ]
failed_frames_count
integer [ 0 .. 2147483647 ]
consecutive_failures
integer [ 0 .. 2147483647 ]
error_message
string
started_at
string or null <date-time>
stopped_at
string or null <date-time>

Responses

Request samples

Content type
{
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "error_message": "string",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "collection": 0,
  • "camera": {
    },
  • "status": "running",
  • "frames_captured": 2147483647,
  • "analyses_processed": 2147483647,
  • "failed_frames_count": 2147483647,
  • "consecutive_failures": 2147483647,
  • "pending_frames": 0,
  • "error_message": "string",
  • "available_actions": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "started_at": "2019-08-24T14:15:22Z",
  • "stopped_at": "2019-08-24T14:15:22Z",
  • "last_modified": "2019-08-24T14:15:22Z"
}

features

Features of the photo

This endpoint shows the feature types that can appear in an analysis.

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]