No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2024-10-25 13:09:31 +05:00
example_yard_data.md Add files via upload 2024-10-25 13:09:31 +05:00
Readme.md Update Readme.md 2024-09-18 19:43:44 +05:00
screenshot.png Add screenshot 2024-09-18 19:43:29 +05:00

GET /get_defects_data

Base URL

https://model-demo-c368a.uc.r.appspot.com

Description

The /get_defects_data endpoint generates and returns a list of defect data. Each defect includes a timestamp, an image URL, and size dimensions (width and height in millimeters).

Parameters

  • count (required, integer): The number of defect records to generate.

Responses

  • 200 OK

    • Content-Type: application/json
    • Body:
      {
        "error": null,
        "data": [
          {
            "timestamp": "2023-10-01T12:34:56.789123",
            "image_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
            "size": {
              "width": 42,
              "height": 58,
              "unit": "mm"
            }
          },
          ...
        ]
      }
      
    • Description: Returns a list of defect data based on the count parameter.
  • 400 Bad Request

    • Content-Type: application/json
    • Body:
      {
        "error": "Count parameter is required",
        "data": null
      }
      
    • Description: Indicates that the count parameter is missing from the request.

Example Request

curl -X GET "https://model-demo-c368a.uc.r.appspot.com/get_defects_data?count=5"

Example Response

{
  "error": null,
  "data": [
    {
      "timestamp": "2023-10-01T12:34:56.789123",
      "image_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "size": {
        "width": 42,
        "height": 58,
        "unit": "mm"
      }
    },
    {
      "timestamp": "2023-10-01T12:33:56.789123",
      "image_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "size": {
        "width": 37,
        "height": 64,
        "unit": "mm"
      }
    },
    ...
  ]
}

Example POSTMAN Request

  • Method: GET
  • URL: https://model-demo-c368a.uc.r.appspot.com/get_defects_data?count=10
  • Headers: Content-Type: application/json
  • Body: None
  • Response: See the example response above.
  • Description: This request generates and returns a list of 10 defect records.

POSTMAN IMAGE