apption-labs / meater-cloud-public-rest-api

MEATER Cloud REST API documentation.
87 stars 4 forks source link
meater

MEATER Cloud REST API

The MEATER Cloud REST API is in BETA.

There may be bugs and changes.

Watch this repository to keep up to date.

Issues, Feedback, Questions

What You'll Need

API Basics

Status Codes and Errors

The API uses standard HTTP status codes and also includes them in the JSON response in the status and statusCode attributes.

Standard Response

Example:

{
    "status": "200 OK",
    "statusCode": 200,
    "data": {},
    "meta": {}
}

Error Response

Example:

{
    "status": "404 Not Found",
    "statusCode": 404,
    "help": "https://github.com/apption-labs/meater-cloud-public-rest-api"
}

API Endpoints

[POST] /login

Headers:

Content-Type: application/json

Body:

{
    "email": "<MEATER Cloud Email Address>",
    "password": "<MEATER Cloud Password>"
}

Response:

{
    "status": "OK",
    "statusCode": 200,
    "data": {
        "token": "<JWT>",
        "userId": "<User ID>"
    },
    "meta": {}
}

Example CURL:

curl --location --request POST 'https://public-api.cloud.meater.com/v1/login' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "<MEATER Cloud Email Address>",
  "password": "<MEATER Cloud Password>"
}'

[GET] /devices

Devices (aka MEATER probes) will only be returned after the following criteria is met. There may be a delay between the MEATER Cloud seeing your device and it being returned in this endpoint.

Additional information:

Headers:

Authorization: Bearer <JWT>

Response:

{
    "status": "OK",
    "statusCode": 200,
    "data": {
        "devices": [
            {
                "id": "<Device ID>",
                "temperature": {
                    "internal": 0,
                    "ambient": 0,
                },
                "cook": {
                    "id": "<Cook ID>",
                    "name": "<Cook name>",
                    "state": "<Cook state>",
                    "temperature": {
                        "target": 0,
                        "peak": 0
                    },
                    "time": {
                        "elapsed": 0,
                        "remaining": 0
                    }
                },
                "updated_at": 123456789
            },
            {
                "id": "<Device ID>",
                "temperature": {
                    "internal": 0,
                    "ambient": 0,
                },
                "cook": null,
                "updated_at": 123456789
            },
        ]
    },
    "meta": {}
}

Example CURL:

curl  --location --request GET 'https://public-api.cloud.meater.com/v1/devices' \
--header 'Authorization: Bearer <JWT>'

[GET] /devices/{id}

Get info for a specific device. Works like /devices but returns a single object rather than an array.

Headers:

Authorization: Bearer <JWT>

Response:

{
    "status": "OK",
    "statusCode": 200,
    "data": {
        "id": "<Device ID>",
        "temperature": {
            "internal": 0,
            "ambient": 0,
        },
        "cook": null,
        "updated_at": 123456789
    },
    "meta": {}
}

Example CURL:

curl  --location --request GET 'https://public-api.cloud.meater.com/v1/devices/<ID>' \
--header 'Authorization: Bearer <JWT>'

Issues, Feedback, Questions

Please use issues for feedback, questions and issues.

The MEATER Support Team won't be able to provide support for the API.

Legal

Copyright © 2020 Apption Labs Ltd. Terms of Use.