{
  "info": {
    "name": "Soil Data",
    "description": "API داده‌های خاک (SoilGrids) بر اساس مختصات جغرافیایی",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "http://localhost:8020"
    },
    {
      "key": "task_id",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Get Soil Data (query)",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/soil-data/?lon=52.42&lat=36.38",
          "host": ["{{baseUrl}}"],
          "path": ["api", "soil-data", ""],
          "query": [
            {
              "key": "lon",
              "value": "52.42",
              "description": "طول جغرافیایی"
            },
            {
              "key": "lat",
              "value": "36.38",
              "description": "عرض جغرافیایی"
            }
          ]
        },
        "description": "دریافت داده خاک با lon و lat در query. اگر داده در DB باشد 200، وگرنه 202 با task_id برمی‌گردد."
      }
    },
    {
      "name": "Get Soil Data (POST)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"lon\": 52.42,\n  \"lat\": 36.38\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/soil-data/",
          "host": ["{{baseUrl}}"],
          "path": ["api", "soil-data", ""]
        },
        "description": "دریافت داده خاک با lon و lat در body. اگر داده در DB باشد 200، وگرنه 202 با task_id برمی‌گردد."
      }
    },
    {
      "name": "Task Status",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/soil-data/tasks/{{task_id}}/status/",
          "host": ["{{baseUrl}}"],
          "path": ["api", "soil-data", "tasks", "{{task_id}}", "status", ""]
        },
        "description": "بررسی وضعیت تسک واکشی خاک. task_id را از پاسخ 202 دریافت می‌کنید."
      }
    }
  ]
}
