...
| URL | /api/samples/ | ||
| Description | Fetching multiple Samples at the same time or Inserting a Sample. [Poop Sample Response] | ||
| Header | API_KEY, Authorization | ||
| Method | PUT | GET | ||
| Url Param | -- | ||
| Request Body Data | PUT Note: SampleData should send as form-data text, and the image should be form-data file. | ||
| Response | PUT | Response | PUT
{ sampleList: [ { id: xxx, dateTime: xxx, hasPict: xxx, hasSurvey: xxx, hasContainer: xxx
|
| URL | /api/samples/ | ||
| Description | Fetching multiple Samples at the same time or Inserting a Sample. [Poop Sample Response] | ||
| Header | API_KEY, Authorization | ||
| Method | PUT | GET | ||
| Url Param | -- | ||
| Request Body Data | PUT Note: SampleData should send as form-data text, and the image should be form-data file. | ||
{}…..{} ] } 200: Success Note[Limit]: Up to 15 samples can be retrieved at max. | |||
| URL | /api/samples/ | ||
| Description | Fetching multiple Samples at the same time or Inserting a Sample. [Poop Sample Response] | ||
| Header | API_KEY, Authorization | ||
| Method | PUT | GET | ||
| Url Param | -- | ||
| Request Body Data | PUT Note: SampleData should send as form-data text, and the image should be form-data file. | ||
| Response | PUT
{ sampleList: [ { id: xxx, dateTime: xxx, hasPict: xxx, hasSurvey: xxx, hasContainer
{}
|
| URL | /api/sample/<sample_id> |
| Description | Fetching the image of a Specific Sample Response |
| Header | API_KEY, Authorization |
| Method | GET |
| Url Param | sample_id=[string] |
| Request Body Data | PUT Note: SampleData should send as form-data text, and the image should be form-data file. |
| Response | { sample: { id: xxx, dateTime: xxx, hasPict: xxx, hasSurvey: xxx, hasContainer: xxx } } { message: ”This user does not have access to this sample data” } |
...
| URL | /api/sample/count_this_week |
| Description | Return the total number the user uploaded this week |
| Header | API_KEY, Authorization |
| Method | GET |
| Url Param | |
| Request Body Data | -- |
| Response | { "sampleCount": int } - 200 |
| URL | /api/sample/<sample_id>/updatesurvey |
| Description | Update survey for the given sample id |
| Header | API_KEY, Authorization |
| Method | GET |
| Url Param | |
| Request Body Data | sample_id: ID for the sample to update surveyData: list of new survey data |
| Response | {message: "Bad request: no survey data to update"} - 404 {message: "sample id is invalid"} - 400 {message: "successfully updated survey data"} - 200 |
| URL | /api/sample/count_total |
| Description | Return the total number the user uploaded |
| Header | API_KEY, Authorization |
| Method | GET |
| Url Param | -- |
| Request Body Data | -- |
| Response | { "sampleCount": int } - 200 |
...