Ceres Public API documentation (1.0.0 (v2))

Download OpenAPI specification:

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:
required
ticket
required
integer

Associated ticket number.

commodity
required
string

The name of the existing commodity variety.

Responses

Request samples

Content type
{
  • "ticket": 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",
  • "photo": {
    },
  • "segmented_photo": {
    }
}

Retrieve analysis

Return a specific analysis along with its associated photos.

Authorizations:
None
path Parameters
id
required
integer

A unique integer value identifying this 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",
  • "photo": {
    },
  • "segmented_photo": {
    }
}

Update ticket and commodity

Only ticket and/or commodity fields are accepted.

Authorizations:
None
path Parameters
id
required
integer

A unique integer value identifying this analysis.

Request Body schema:
ticket
integer

Ticket number associated with the analysis.

commodity
string

Name of the commercial variety

Responses

Request samples

Content type
{
  • "ticket": 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"
}

Delete analysis

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

Authorizations:
None
path Parameters
id
required
integer

A unique integer value identifying this analysis.

Responses

commodities

Varieties of the fruit

This endpoint shows all kinds of variety about the fruit we are analysing

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create variety

Creates a new fruit variety.

Authorizations:
None
Request Body schema:
required
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

Retrieves the details of a variety by its ID

Authorizations:
None
path Parameters
id
required
integer

A unique integer value identifying this 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

A unique integer value identifying this commodity.

Request Body schema:
required
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

A unique integer value identifying this 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

A unique integer value identifying this commodity.

Responses

features

Features of the photo

This endpoint shows which kinds of pixels we can have in the analysis

Authorizations:
None

Responses

Response samples

Content type
application/json
[
  • {
    }
]