{
  "info": {
    "name": "Modellfastigheten",
    "description": "Temperatur-API:t bakom Azure API Management. Lägg in REST-nyckeln i variabeln subscriptionKey.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "Ocp-Apim-Subscription-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{subscriptionKey}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://apim-newsec-free-jk.azure-api.net/building"
    },
    {
      "key": "subscriptionKey",
      "value": ""
    },
    {
      "key": "houseId",
      "value": "K7P2QM",
      "description": "Your house ID: the 6 letters and digits from the web page."
    }
  ],
  "item": [
    {
      "name": "Lista alla rum",
      "request": {
        "method": "GET",
        "url": "{{baseUrl}}/rooms",
        "header": [
          {
            "key": "X-House-Id",
            "value": "{{houseId}}"
          }
        ]
      }
    },
    {
      "name": "Filtrera rum",
      "request": {
        "method": "GET",
        "url": "{{baseUrl}}/rooms?floor=2&aboveC=20",
        "header": [
          {
            "key": "X-House-Id",
            "value": "{{houseId}}"
          }
        ]
      }
    },
    {
      "name": "Sammanfatta per våning",
      "request": {
        "method": "GET",
        "url": "{{baseUrl}}/rooms/summary?groupBy=floor",
        "header": [
          {
            "key": "X-House-Id",
            "value": "{{houseId}}"
          }
        ]
      }
    },
    {
      "name": "Läs ett rum",
      "request": {
        "method": "GET",
        "url": "{{baseUrl}}/rooms/2.03",
        "header": [
          {
            "key": "X-House-Id",
            "value": "{{houseId}}"
          }
        ]
      }
    },
    {
      "name": "Sätt temperatur",
      "request": {
        "method": "PUT",
        "url": "{{baseUrl}}/rooms/2.03/setpoint",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "X-House-Id",
            "value": "{{houseId}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{ \"setpointC\": 23 }"
        }
      }
    },
    {
      "name": "Sätt temperatur i en hel range",
      "request": {
        "method": "PUT",
        "url": "{{baseUrl}}/rooms/setpoint",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "X-House-Id",
            "value": "{{houseId}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{ \"from\": \"2.01\", \"to\": \"2.14\", \"setpointC\": 23 }"
        }
      }
    },
    {
      "name": "Höj en hel range",
      "request": {
        "method": "PUT",
        "url": "{{baseUrl}}/rooms/setpoint",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "X-House-Id",
            "value": "{{houseId}}"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{ \"from\": \"2.01\", \"to\": \"2.14\", \"deltaC\": 1 }"
        }
      }
    }
  ]
}
