---
agentTools:
  projectIndex: https://device-management-api.readme.io/llms.txt
---

# Start the measurement stream of a gateway

Starts the measurement stream of a gateway

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Device Management API",
    "description": " This REST API can be used to control and get information about gateways. ",
    "contact": {
      "email": "core@net2grid.com"
    },
    "version": "1.21.0"
  },
  "servers": [
    {
      "url": "https://device-management.n2g-{platform}.net"
    }
  ],
  "tags": [
    {
      "name": "configure",
      "description": "Gateway configuration related commands"
    }
  ],
  "paths": {
    "/gateways/{eui64}/opt-in": {
      "put": {
        "tags": [
          "configure"
        ],
        "summary": "Start the measurement stream of a gateway",
        "description": "Starts the measurement stream of a gateway",
        "operationId": "putOptIn",
        "parameters": [
          {
            "name": "eui64",
            "in": "path",
            "description": "The gateway EUI, both hex and dec representations are supported",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "blocking",
            "in": "query",
            "description": "Configure if the command will be handled as a blocking or non blocking task",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "404": {
            "description": "Gateway not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "405": {
            "description": "Validation exception",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "x_api_key": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponseDTO": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "The error code"
          },
          "message": {
            "type": "string",
            "description": "The response message"
          }
        }
      }
    },
    "securitySchemes": {
      "x_api_key": {
        "type": "apiKey",
        "name": "x_api_key",
        "description": "An API key that is restricted to specific origins. TBD with NET2GRID.",
        "in": "header"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 101,
      "1": 192,
      "2": 215,
      "3": 223,
      "4": 227,
      "5": 166,
      "6": 145,
      "7": 0,
      "8": 15,
      "9": 229,
      "10": 212,
      "11": 210
    }
  }
}
```