Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Endpoints

Users

POST /users (create user)
Parameters

None

Request Body
{
    "user_id": "string",
    "email": "string",
    "name": "string"
}
Response Body
{
    "message": "string"
}
GET /users (get many users)
Parameters

None

Request Body

None

Response Body
{
    "users": [
        {
            "user_id": "string",
            "email": "string",
            "name": "string",
            "created_at": "string"
        }
    ]
}
GET /users/{id} (get one user)
Path Parameters
name type data type
id required string
Request Body

None

Response Body
{
    "user_id": "string",
    "email": "string",
    "name": "string",
    "created_at": "string"
}
PATCH /users/{id} (update user)
Path Parameters
name type data type
id required string
Request Body
{
    "name": "string"
}
Response Body
{
    "message": "string"
}
DELETE /users/{id} (delete user)
Path Parameters
name type data type
id required string
Request Body

None

Response Body
{
    "message": "string"
}

Predictions

POST /predictions/predict (create prediction)
Query Parameters
name type data type
user_id required string
plant_index required string
Request Body
{
   "image": "File"
}
Response Body
{
    "prediction_id": "string",
    "plant_index": 1,
    "disease_index": 1,
    "plant_name": "string",
    "disease_name": "string",
    "confidence_score": 1,
    "temporary_image_url": "string",
    "user_id": "string",
    "treatment": "string",
    "analysis": "string",
    "article": "string",
    "created_at": "string"
}
GET /predictions (get many predictions by user id)
Query Parameters
name type data type
user_id required string
Request Body

None

Response Body
{
    "predictions": [
        {
            "prediction_id": "string",
            "plant_index": 1,
            "disease_index": 1,
            "plant_name": "string",
            "disease_name": "string",
            "confidence_score": 1,
            "temporary_image_url": "string",
            "user_id": "string",
            "treatment": "string",
            "analysis": "string",
            "article": "string",
            "created_at": "string"
        }
    ]
}
GET /predictions/{id} (get one prediction)
Path Parameter
name type data type
id required string
Request Body

None

Response Body
{
    "prediction_id": "string",
    "plant_index": 1,
    "disease_index": 1,
    "plant_name": "string",
    "disease_name": "string",
    "confidence_score": 1,
    "temporary_image_url": "string",
    "user_id": "string",
    "treatment": "string",
    "analysis": "string",
    "article": "string",
    "created_at": "string"
}
DELETE /predictions/{id} (delete prediction)
Path Parameter
name type data type
id required string
Request Body

None

Response Body
{
    "message": "string"
}

Diseases

POST /diseases (create disease)
Parameters

None

Request Body
{
    "disease_id": "string",
    "plant_index": 1,
    "disease_index": 1,
    "plant_name": "string",
    "disease_name": "string",
    "description": "string",
    "treatment": "string",
    "analysis": "string",
    "article": "string",
    "image_id": "string"
}
Response Body
{
    "message": "string"
}
GET /diseases/all (get all diseases)
Parameters

None

Request Body

None

Response Body
{
    "diseases": [
        {
            "disease_id": "string",
            "plant_index": 1,
            "disease_index": 1,
            "plant_name": "string",
            "disease_name": "string",
            "description": "string",
            "treatment": "string",
            "analysis": "string",
            "article": "string",
            "temporary_image_url": "string"
        }
    ]
}
GET /diseases (get many diseases by plant index)
Query Parameters
name type data type
plant_index required string
Request Body

None

Response Body
{
    "diseases": [
        {
            "disease_id": "string",
            "plant_index": 1,
            "disease_index": 1,
            "plant_name": "string",
            "disease_name": "string",
            "description": "string",
            "treatment": "string",
            "analysis": "string",
            "article": "string",
            "temporary_image_url": "string"
        }
    ]
}
GET /diseases/{id} (get one disease)
Path Parameters
name type data type
id required string
Request Body

None

Response Body
{
    "disease_id": "string",
    "plant_index": 1,
    "disease_index": 1,
    "plant_name": "string",
    "disease_name": "string",
    "description": "string",
    "treatment": "string",
    "analysis": "string",
    "article": "string",
    "temporary_image_url": "string"
}
PATCH /diseases/{id} (update disease)
Path Parameter
name type data type
id required string
Request Body
{
    "plant_index": 1,
    "disease_index": 1,
    "plant_name": "string",
    "disease_name": "string",
    "description": "string",
    "treatment": "string",
    "analysis": "string",
    "article": "string",
    "image_id": "string"
}
Response Body
{
    "message": "string"
}
DELETE /diseases/{id} (delete disease)
Path Parameter
name type data type
id required string
Request Body

None

Response Body
{
    "message": "string"
}

Cloud Architecture Diagram

cloud architecture

Entity Relational Diagram

erd

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages