Glowmarkt User System API

User, account, authentication and consent management for the Glow Platform. Covers user registration, account profiles and sessions, JWT issuance via POST /auth, an OAuth 2.0 authorization-code grant (POST /auth/oauth and POST /auth/oauth/access), and — the part that matters most in the British smart-metering context — Meter Point Consent and Verification, where consent to retrieve data is renewed and revoked per MPxN.

OpenAPI Specification

hildebrand-glowmarkt-user-system-swagger.json Raw ↑
{
  "swagger": "2.0",
  "info": {
    "description": "The document enlists and describes the APIs for the User.",
    "version": "1.0.5",
    "title": "Glowmarkt User System",
    "license": {
      "name": "Copyright © 2012-26 by Hildebrand Technology Limited"
    }
  },
  "host": "api.glowmarkt.com",
  "basePath": "/api/v0-1/",
  "tags": [
    {
      "name": "User"
    },
    {
      "name": "Meter Point Consent & Verification"
    },
    {
      "name": "Account"
    },
    {
      "name": "Account Profile"
    },
    {
      "name": "Account Session"
    },
    {
      "name": "Auth"
    },
    {
      "name": "OAuth"
    }
  ],
  "schemes": [
    "https"
  ],
  "paths": {
    "/register": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Create a user",
        "description": "Create a User a directory account for username and password login using this action. More specifically this is a registration process which creates a user and adds an account to the given application id. Self-Registration process should use this action. This call requires no authentication.",
        "operationId": "addUser",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "addUserBody",
            "description": "The information that is used to create a user.",
            "schema": {
              "$ref": "#/definitions/AddUserReq"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AddUserRes"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/MissingElementsError"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      }
    },
    "/user": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Find specific user that has an account in an application from the username.",
        "description": "Returns a user.",
        "operationId": "getUserbyUsername",
        "parameters": [
          {
            "name": "username",
            "in": "query",
            "description": "The username of user that is being queried (lowercase, trimmed etc). Please note that this API is prone to errors if the username contains characters that are affected by URL encoding.",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "security": [
          {
            "appKeys": []
          },
          {
            "orgAppKeys": [],
            "applicationId": []
          },
          {
            "devUserToken": [],
            "applicationId": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AddUserRes"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "type": "string",
              "example": null
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      },
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Create a user",
        "description": "This call can be used by an application to create a user. No verification will be required",
        "operationId": "createUser",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "createUserBody",
            "description": "The information that is used to create a user.",
            "schema": {
              "$ref": "#/definitions/CreateUserReq"
            }
          }
        ],
        "security": [
          {
            "appKeys": []
          },
          {
            "orgAppKeys": [],
            "applicationId": []
          },
          {
            "devUserToken": [],
            "applicationId": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/CreateUserRes"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/MissingElementsError"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      }
    },
    "/user/{userId}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Find specific user that has an account in an application.",
        "description": "Returns a user.",
        "operationId": "getUserbyId",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user that is being queried",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "security": [
          {
            "appKeys": []
          },
          {
            "orgAppKeys": [],
            "applicationId": []
          },
          {
            "devUserToken": [],
            "applicationId": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AddUserRes"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "type": "string",
              "example": null
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Delete specific user. This will delete all the accounts of a user. Please refer to delete account API. This API requires specific permissions.",
        "description": "Deletes a user.",
        "operationId": "deleteUserbyId",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user that is being queried",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "security": [
          {
            "appKeys": []
          },
          {
            "orgAppKeys": [],
            "applicationId": []
          },
          {
            "devUserToken": [],
            "applicationId": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/IsValidRes"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "type": "string",
              "example": null
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      }
    },
    "/user/verify": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Generate a user verification token",
        "description": "This call generates a 4 digit token and sends it via second channel of communication over to the user (at the moment the only second channel of communication supported is email).",
        "operationId": "generateUserVerificationToken",
        "parameters": [
          {
            "in": "body",
            "name": "generateVerificationTokenUserReq",
            "description": "The information that is used to create to generate an email verification token.",
            "schema": {
              "$ref": "#/definitions/GenerateVerificationTokenUserReq"
            }
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "valid": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/MissingElementsError"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      },
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Verify a user verification token",
        "description": "This call generates a 4 digit token and sends it via second channel of communication over to the user (at the moment the only second channel of communication supported is email).",
        "operationId": "verifyUser",
        "parameters": [
          {
            "in": "body",
            "name": "verifyDevUser",
            "description": "The information that is used to create a devuser.",
            "schema": {
              "$ref": "#/definitions/VerifyUserReq"
            }
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "valid": {
                  "type": "boolean"
                },
                "userId": {
                  "type": "string",
                  "example": "6ccb3612-4cdc-469e-8574-6007f3c54084"
                },
                "status": {
                  "type": "string",
                  "example": "active"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/MissingElementsError"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      }
    },
    "/user/resetpassword": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Generate a token that can be used by user to reset their password.",
        "description": "This call generates a 4 digit token and sends it via second channel of communication over to the user (at the moment the only second channel of communication supported is email). The user can then use this token to reset their password.",
        "operationId": "generateUserPasswordResetToken",
        "parameters": [
          {
            "in": "body",
            "name": "generatePasswordResetTokenUserReq",
            "description": "The information that is needed to generate a password reset token.",
            "schema": {
              "$ref": "#/definitions/GeneratePasswordResetTokenUserReq"
            }
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "valid": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/MissingElementsError"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      },
      "put": {
        "tags": [
          "User"
        ],
        "summary": "A user resets their password",
        "description": "This call generates a 4 digit token and sends it via second channel of communication over to the user (at the moment the only second channel of communication supported is email).",
        "operationId": "resetPasswordUser",
        "parameters": [
          {
            "in": "body",
            "name": "resetPasswordUserBody",
            "description": "The information that is used to reset a user's password.",
            "schema": {
              "$ref": "#/definitions/PasswordResetUserReq"
            }
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "valid": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/MissingElementsError"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      }
    },
    "/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Find all accounts of an application",
        "description": "Returns all accounts that belong to an application.",
        "operationId": "getAccounts",
        "produces": [
          "application/json"
        ],
        "security": [
          {
            "appKeys": []
          },
          {
            "orgAppKeys": [],
            "applicationId": []
          },
          {
            "devUserToken": [],
            "applicationId": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/AccountRes"
              }
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Add an account to an existing user",
        "description": "This call should be used when a user is registered via  on the Glow ecosystem. By providing the username of the user a directory account may be added to the application.",
        "operationId": "addAccount",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "addAccountBody",
            "description": "The information that is used to add an account to an existing user.",
            "schema": {
              "$ref": "#/definitions/AddAccountReq"
            }
          }
        ],
        "security": [
          {
            "appKeys": []
          },
          {
            "orgAppKeys": [],
            "applicationId": []
          },
          {
            "devUserToken": [],
            "applicationId": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "example": "OK"
                },
                "accountId": {
                  "type": "string",
                  "example": "ffe4f42e-7c1a-4ea3-9ec8-087d4a1071e6"
                },
                "applicationId": {
                  "type": "string",
                  "example": "0537b17c-ab62-491c-8085-9ac2b6206346"
                },
                "userId": {
                  "type": "string",
                  "example": "69f464fa-bca2-4f2a-83b1-0c69819c5cd0"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/MissingElementsError"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      }
    },
    "/account/{accountId}": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Find specific account of an application.",
        "description": "Returns an account.",
        "operationId": "getAccountbyId",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "ID of account that is being queried",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "security": [
          {
            "appKeys": []
          },
          {
            "orgAppKeys": [],
            "applicationId": []
          },
          {
            "devUserToken": [],
            "applicationId": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AccountRes"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "type": "string",
              "example": null
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Updates the account's metadata.",
        "description": "Updates the account s metadata. Elements that can be updated include name. This can be used in on an administrative level.",
        "operationId": "updateAccount",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "ID of user that needs to be updated",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "userUpdateBody",
            "description": "The elements of user that can be updated.",
            "schema": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Montgomery Jorgensen"
                }
              }
            }
          }
        ],
        "security": [
          {
            "orgAppKeys": [],
            "applicationId": []
          },
          {
            "devUserToken": [],
            "applicationId": []
          },
          {
            "appKeys": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/UpdateAccountRes"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/MissingElementsError"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Delete account",
        "description": "Delete account",
        "operationId": "deleteAccount",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "ID of account that is to be deleted",
            "required": true,
            "type": "string"
          }
        ],
        "security": [
          {
            "orgAppKeys": []
          },
          {
            "devUserToken": []
          },
          {
            "appKeys": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "valid": {
                  "type": "boolean"
                },
                "accountId": {
                  "type": "string",
                  "example": "ffe4f42e-7c1a-4ea3-9ec8-087d4a1071e6"
                },
                "userId": {
                  "example": "69f464fa-bca2-4f2a-83b1-0c69819c5cd0"
                },
                "status": {
                  "type": "string",
                  "example": "inactive"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/IncorrectElementsError"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      }
    },
    "/account/{accountId}/status": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Find the status of a specified account. If the account is using an external directory service, this call will confirm whether the user is authenticated against it. This call requires administrative application level credentials.",
        "description": "Returns the status an account.",
        "operationId": "getAccountStatusbyId",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "ID of account that is being queried",
            "required": true,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "security": [
          {
            "appKeys": []
          },
          {
            "orgAppKeys": [],
            "applicationId": []
          },
          {
            "devUserToken": [],
            "applicationId": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AccountStatus"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "type": "string",
              "example": null
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      }
    },
    "/account/status": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "With a given JWT token a user can have their account status verfied. If their account is created under an external directory service, this call will establish whether a user's token to the external service is still valid.",
        "description": "Returns the status an account.",
        "operationId": "getAccountStatusbyUserToken",
        "produces": [
          "application/json"
        ],
        "security": [
          {
            "userToken": []
          },
          {
            "applicationId": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AccountStatus"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "type": "string",
              "example": null
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      }
    },
    "/account/email": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Change a user's email",
        "description": "A user can update their email",
        "operationId": "userChangeEmail",
        "parameters": [
          {
            "in": "body",
            "name": "userChangeEmailBody",
            "description": "The body contains the user's new email.",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "string",
                  "example": "scotty_eng@enterprise.st"
                }
              },
              "required": [
                "email"
              ]
            }
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "security": [
          {
            "userToken": [],
            "applicationId": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "valid": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/IncorrectElementsError"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      }
    },
    "/user/{userId}/username": {
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Change a user's username",
        "description": "API to update a user's username",
        "operationId": "updateUsernameUserId",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "ID of user that is being queried",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "UserChangeUsernameAdminBodyReq",
            "description": "The body contains the user's new email.",
            "schema": {
              "type": "object",
              "properties": {
                "username": {
                  "type": "string",
                  "example": "scotty_eng@enterprise.st"
                },
                "status": {
                  "type": "string",
                  "example": "active"
                }
              },
              "required": [
                "username",
                "status"
              ]
            }
          }
        ],
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "security": [
          {
            "userToken": [],
            "applicationId": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "object",
              "properties": {
                "valid": {
                  "type": "boolean"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/IncorrectElementsError"
            }
          },
          "401": {
            "description": "Unauthorised",
            "schema": {
              "$ref": "#/definitions/AccessDeniedError"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/InternalServerError"
            }
          }
        }
      }
    },
    "/account/name": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Change a user's name",
        "description": "A user can update their name",
        "operationId": "userChangeName",
        "parameters": [
          {
            "in": "body",
            "name": "userChangeNameBody",
            "description": "The body contains the user's new email.",
            "schema": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "Montgomery Jorgensen"
                }
              },
              "required": [
                "name"
              ]
            }
          }
        ],
        "consumes": [
         

# --- truncated at 32 KB (97 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/hildebrand/refs/heads/main/openapi/hildebrand-glowmarkt-user-system-swagger.json