{"swaggerDoc":{"swagger":"2.0","info":{"description":"This is the documentation of the User System that is pertinent to the Organisation, the Application, the Dev User (a user with the permission to manage an organisation), the Internal User (a user with the permission to manage an application) and the various entities that can facilitate application permission management.","version":"1.0.0","title":"Glow User System, Organisation, Application API","license":{"name":"Copyright © 2012-24 by Hildebrand Technology Limited"}},"host":"api.glowmarkt.com","basePath":"/api/v0-1/","tags":[{"name":"Organisation"},{"name":"Application"},{"name":"Application API Keys"},{"name":"Application Login Events"},{"name":"Directory Type"},{"name":"Directory","description":"A directory represents how the account credentials are managed, how they can be validated and additionally which entity is the responsible party for maintaining and keeping them."},{"name":"Group","description":"A group is used to segment an application’s accounts. Typically a group is created by the application with a view to expose the accounts to a particular set of functionality within the application. For example if an application was trying to determine the efficacy of the notification frequency in terms of application engagement they could split their customer base to different groups that have different"},{"name":"Functional Group","description":"A functional group is used by the Application programmer to model a permissions model within an application. For example an account may require a special permission to access a paid for feature. It is noted that the application must programmatically enforce its behaviour depending on the functional groups an account belongs to."},{"name":"Dev User","description":"A user with the permission to manage an Organisation."},{"name":"Dev User's Auth","description":"Authentication API for the Dev User."},{"name":"devuserprofile"},{"name":"Internal User","description":"A user with the permission to manage an application. An Internal User is managed by a Dev User and an Organisation. An Internal User that is associated to a paritcular Organisation and can have access to some, none or all of the organisation's applications."},{"name":"Internal User's Auth","description":"Authentication API for the Internal User."},{"name":"tempauth","description":"An authentication mechanic that enables the Application to generate a user level JWT token for troubleshooting and support purposes."}],"schemes":["https"],"paths":{"/organization/{organizationId}":{"get":{"tags":["Organisation"],"summary":"Find organisation by ID","description":"Returns a single organisation","operationId":"getOrganizationbyId","produces":["application/json"],"parameters":[{"name":"organizationId","in":"path","description":"ID of organisation to return","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Organization"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"404":{"description":"Not Found","schema":{"$ref":""}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"put":{"tags":["Organisation"],"summary":"Updates the organisation's metadata.","description":"Updates the organisation's metadata. Fields that can be updated include: mainContact, phone.","operationId":"updateOrganization","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"organizationId","in":"path","description":"Identifier of organisation that needs to be updated","required":true,"type":"string"},{"in":"body","name":"organizationUpdateBody","description":"The fields of an organisation that can be updated.","schema":{"type":"object","properties":{"mainContact":{"type":"string"},"phone":{"type":"string"}}}}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Organization"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/IncorrectElementsError"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}}}}},"/organization/{organizationId}/apikeys":{"get":{"tags":["Organisation"],"summary":"Find organisation's apikeys","description":"Returns all the active of an organisation's apikeys","operationId":"getOrgAppKeys","produces":["application/json"],"parameters":[{"name":"organizationId","in":"path","description":"ID of organisation to return","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/OrgAppKey"}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/IncorrectElementsError"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"delete":{"tags":["Organisation"],"summary":"Delete all of the organisation's api keys","description":"Deletes all the pairs of an organisation's api keys","operationId":"deleteOrgAppKeys","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"organizationId","in":"path","description":"Organisation Identifier","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteAppKeysApiResponse"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/IncorrectElementsError"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/organization/{organizationId}/apikeys/{appKey}":{"delete":{"tags":["Organisation"],"summary":"Delete specific pair of organisation's API keys","description":"Deletes a specific pair of orgappkeys of an organisation. This API will suceed even if the key is not active and returns whether the delete was valid or not.","operationId":"deleteOrgAppKey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"organizationId","in":"path","description":"Organisation ID","required":true,"type":"string"},{"name":"appKey","in":"path","description":"Organisation's API key to be deleted","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"organizationId":{"type":"string","example":"8acb3267-cb1a-40d3-b54c-8deddcfcf044"}}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/IncorrectElementsError"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/application":{"get":{"tags":["Application"],"summary":"Find all applications of an organisation","description":"Returns all applications that belong to an organisation.","operationId":"getApplications","produces":["application/json"],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Application"}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"post":{"tags":["Application"],"summary":"Create an application","description":"Create an application","operationId":"addApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"addApplicationBody","description":"The information of an application.","schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"pushApiKey":{"$ref":"#/definitions/PushApiKey"},"emailApiKey":{"$ref":"#/definitions/EmailApiKey"}}}}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Application"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/application/{applicationId}":{"get":{"tags":["Application"],"summary":"Find application by ID","description":"Returns a single application","operationId":"getApplicationbyId","produces":["application/json"],"parameters":[{"name":"applicationId","in":"path","description":"ID of application to return","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Application"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"404":{"description":"Not Found","schema":{"$ref":""}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"put":{"tags":["Application"],"summary":"Updates the application's metadata.","description":"Updates the application s metadata. Elements that can be updated include name, description, emailApiKeys and PushApiKeys","operationId":"updateApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"applicationId","in":"path","description":"ID of application that needs to be updated","required":true,"type":"string"},{"in":"body","name":"applicationUpdateBody","description":"The elements of an application that can be updated.","schema":{"type":"object","properties":{"name":{"type":"string"},"pushApiKey":{"$ref":"#/definitions/PushApiKey"},"emailApiKey":{"$ref":"#/definitions/EmailApiKey"}},"required":["name"]}}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Application"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"delete":{"tags":["Application"],"summary":"Delete application","description":"Delete application and all respective appkeys will be deleted","operationId":"deleteApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"applicationId","in":"path","description":"ID of application that is to be deleted","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteApplicationResponse"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/IncorrectElementsError"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}},"404":{"description":"Not Found","schema":{"$ref":""}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/application/{applicationId}/status":{"put":{"tags":["Application"],"summary":"Updates the application's status.","description":"Updates the application s status. Please note that if you set the application to inactive this will not delete or invalidate the appkeys","operationId":"updateApplicationStatus","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"applicationId","in":"path","description":"ID of application that needs to be updated","required":true,"type":"string"},{"in":"body","name":"applicationUpdateBody","description":"The elements of an application that can be updated.","schema":{"type":"object","properties":{"name":{"type":"string"},"pushApiKey":{"$ref":"#/definitions/PushApiKey"},"emailApiKey":{"$ref":"#/definitions/EmailApiKey"}}}}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"successful update of the application","schema":{"$ref":"#/definitions/ApplicationStatusUpdate"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/IncorrectElementsError"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/application/version":{"get":{"tags":["Application"],"summary":"Get application version","description":"Returns the version of the application for all operating systems. This call can be accessed by a user and should be used to versioning control purposes.","operationId":"getApplicationVersion","produces":["application/json"],"security":[{"userToken":[]},{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/ApplicationVersionRes"}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/application/{applicationId}/version":{"put":{"tags":["Application"],"summary":"Updates the application's version.","description":"Updates the application s status. Please note that if you set the application to inactive this will not delete or invalidate the appkeys","operationId":"updateApplicationVersion","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"applicationId","in":"path","description":"ID of application whose version is to be updated","required":true,"type":"string"},{"in":"body","name":"applicationUpdateVersionBody","description":"The elements of an application's version that should be updated.","schema":{"type":"object","properties":{"version":{"type":"array","items":{"$ref":"#/definitions/ApplicationVersion"}}}}}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"successful update of the application","schema":{"$ref":"#/definitions/Application"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/IncorrectElementsError"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/application/loginevents":{"get":{"tags":["Application Login Events"],"summary":"Get application login events","description":"Returns the login events.","operationId":"getApplicationLoginEvents","parameters":[{"name":"loginType","in":"query","required":false,"type":"string","description":"Filter for retrieving the login type that is of interest. Accepted values include: oauth, key"}],"produces":["application/json"],"security":[{"userToken":[]},{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/LoginEvent"}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/application/{applicationId}/apikeys":{"get":{"tags":["Application API Keys"],"summary":"Find application's api keys","description":"Returns all the pairs of an application's apikeys","operationId":"getAppKeys","produces":["application/json"],"parameters":[{"name":"applicationId","in":"path","description":"ID of application to look up keys for","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/AppKey"}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/IncorrectElementsError"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"post":{"tags":["Application API Keys"],"summary":"Create a set of API keys for an Application","description":"Creates a set API keys for an Application","operationId":"createAppKeys","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"applicationId","in":"path","description":"ID of application that keys will be created for","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/AppKey"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/IncorrectElementsError"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"delete":{"tags":["Application API Keys"],"summary":"Delete all application's API keys","description":"Deletes all the pairs of an application's apikeys","operationId":"deleteAppKeys","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"applicationId","in":"path","description":"ID of application","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteAppKeysApiResponse"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/IncorrectElementsError"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/application/{applicationId}/apikeys/{appKey}":{"delete":{"tags":["Application API Keys"],"summary":"Delete all of the application's api keys","description":"Deletes all the pairs of an application's api keys","operationId":"deleteAppKey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"applicationId","in":"path","description":"ID of application","required":true,"type":"string"},{"name":"appKey","in":"path","description":"application's appKey that will be deleted","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"applicationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"},"appKey":{"type":"string","example":"uYspolHapEa7V7xRFKf6"},"valid":{"type":"boolean"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/directorytype":{"get":{"tags":["Directory Type"],"summary":"Find all directoryTypes within the Glow System","description":"Returns all applications that belong to an organisation.","operationId":"getDirectoryTypes","produces":["application/json"],"security":[{"orgAppKeys":[]},{"devUserToken":[]},{"appKeys":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/DirectoryType"}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/directorytype/{directoryTypeId}":{"get":{"tags":["Directory Type"],"summary":"Find directory type by ID","description":"Returns a single directory type","operationId":"getDirectoryTypebyId","produces":["application/json"],"parameters":[{"name":"directoryTypeId","in":"path","description":"ID of directory type that is being queried","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]},{"appKeys":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DirectoryType"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"404":{"description":"Not Found","schema":{"$ref":""}}}}},"/directory":{"get":{"tags":["Directory"],"summary":"Find all directories of an application","description":"Returns all directories that belong to an application.","operationId":"getDirectories","produces":["application/json"],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Directory"}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"post":{"tags":["Directory"],"summary":"Create an directory","description":"Create an directory that belongs to an application","operationId":"addDirectory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"addApplicationBody","description":"The information of an application.","schema":{"type":"object","properties":{"name":{"type":"string","example":"GlowAuthTesterAppDirectory"},"description":{"type":"string","example":"Glow Auth directory of TesterApp"},"directoryTypeId":{"type":"string","example":"fa331f5c-8b24-4949-9a8d-9dffafe2c665"}}}}],"security":[{"appKeys":[]},{"orgAppKeys":[],"applicationId":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Directory"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/directory/{directoryId}":{"get":{"tags":["Directory"],"summary":"Find application by ID","description":"Returns a single directory","operationId":"getDirectorybyId","produces":["application/json"],"parameters":[{"name":"directoryId","in":"path","description":"ID of directory that is being queried","required":true,"type":"string"}],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Directory"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"404":{"description":"Not Found","schema":{"$ref":""}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"put":{"tags":["Directory"],"summary":"Updates the directory's metadata.","description":"Updates the directory s metadata. Elements that can be updated include name, description","operationId":"updateDirectory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"directoryId","in":"path","description":"ID of directory that needs to be updated","required":true,"type":"string"},{"in":"body","name":"directoryUpdateBody","description":"The elements of a directory that can be updated.","schema":{"type":"object","properties":{"name":{"type":"string","example":"GlowAuth"}}}}],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Directory"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/group":{"get":{"tags":["Group"],"summary":"Find all groups of an application","description":"Returns all groups that belong to an application.","operationId":"getGroups","produces":["application/json"],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Group"}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"post":{"tags":["Group"],"summary":"Create a group","description":"Create a group that belongs to an application","operationId":"addGroup","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"addGroupBody","description":"The information of an group.","schema":{"$ref":"#/definitions/AddGroupReq"}}],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Group"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/group/{groupId}":{"get":{"tags":["Group"],"summary":"Find specific group of application","description":"Returns an application's group.","operationId":"getGroupbyId","parameters":[{"name":"groupId","in":"path","description":"ID of group that is being queried","required":true,"type":"string"}],"produces":["application/json"],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Group"}},"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":["Group"],"summary":"Updates the group's metadata.","description":"Updates the group s metadata. Elements that can be updated include name, description","operationId":"updateGroup","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"groupId","in":"path","description":"ID of group that needs to be updated","required":true,"type":"string"},{"in":"body","name":"groupUpdateBody","description":"The elements of a group that can be updated.","schema":{"type":"object","properties":{"name":{"type":"string","example":"GlowAuth"}}}}],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Group"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/group/{groupId}/accounts":{"put":{"tags":["Group"],"summary":"Adds and removes account from group.","description":"Adds and removes account from group. Gives seperate response for each account. If valid is not true, then addition or deletion was not successful.","operationId":"addRemoveAccountsFromGroup","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"groupId","in":"path","description":"ID of group to which accounts will be removed aand added","required":true,"type":"string"},{"in":"body","name":"groupAddRemoveGroups","description":"The arrays of the accounts to be added and removed.","schema":{"$ref":"#/definitions/AddRemoveGroupsReq"}}],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/AddRemoveGroupsRes"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/functionalgroup":{"get":{"tags":["Functional Group"],"summary":"Find all the functional groups of an application","description":"Returns all the functional groups that belong to an application.","operationId":"getFunctionalGroups","produces":["application/json"],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/FunctionalGroup"}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"post":{"tags":["Functional Group"],"summary":"Create a functional group","description":"Create a functional group for an application","operationId":"addFunctionalGroup","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"addGroupBody","description":"The information of an group.","schema":{"$ref":"#/definitions/AddFunctionalGroupReq"}}],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/FunctionalGroup"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/functionalgroup/{functionalGroupId}":{"get":{"tags":["Functional Group"],"summary":"Get the specified functional group","description":"Returns the specified functional group.","operationId":"getFunctionalGroupById","parameters":[{"name":"functionalGroupId","in":"path","description":"Functional Group Identifier","required":true,"type":"string"}],"produces":["application/json"],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/FunctionalGroup"}},"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"}}}}},"/functionalgroup/{functionalGroupId}/accounts":{"put":{"tags":["Functional Group"],"summary":"Adds and removes account from a functional group.","description":"Adds and removes account from a functional group. Gives seperate response for each account. If valid is not true, then addition or deletion was not successful.","operationId":"addRemoveAccountsFromFunctionalGroup","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"functionalGroupId","in":"path","description":"ID of group to which accounts will be removed aand added","required":true,"type":"string"},{"in":"body","name":"groupAddRemoveGroups","description":"The arrays of the accounts to be added and removed.","schema":{"$ref":"#/definitions/AddRemoveGroupsReq"}}],"security":[{"orgAppKeys":[],"applicationId":[]},{"appKeys":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/AddRemoveGroupsRes"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/internaluser":{"get":{"tags":["Internal User"],"summary":"Find all internal users of an organisation","description":"Returns all devusers that belong to an organisation.","operationId":"getInternalUsers","produces":["application/json"],"security":[{"orgAppKeys":[]},{"devUserToken":[]},{"appKeys":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/InternalUser"}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"post":{"tags":["Internal User"],"summary":"Create an internal user","description":"Create an internal user that belongs to an organisation and give them access to an application.","operationId":"createInternalUser","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"addDevUserBody","description":"The information that is used to create a devuser.","schema":{"$ref":"#/definitions/AddInternalUserReq"}}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/AddDevUserRes"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/internaluser/{internalUserId}":{"get":{"tags":["Internal User"],"summary":"Find a Internal User by Id","description":"Returns a single devuser.","operationId":"getInternalUserbyId","parameters":[{"name":"internalUserId","in":"path","description":"ID of internal user that is being queried","required":true,"type":"string"}],"produces":["application/json"],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/InternalUser"}},"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":["Internal User"],"summary":"Updates the internal user's metadata.","description":"Updates the internal user'smetadata. Elements that can be updated include name and email","operationId":"updateInternalUser","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"internalUserId","in":"path","description":"ID of internal that needs to be updated","required":true,"type":"string"},{"in":"body","name":"internalUserUpdateBody","description":"The elements of an internal user that can be updated.","schema":{"type":"object","properties":{"name":{"type":"string","example":"Arthur Dent the sandwichmaker"}}}}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/UpdateDevUserRes"}},"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":["Internal User"],"summary":"Delete an Internal User","description":"Delete devuser","operationId":"deleteInternalUser","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"internalUserId","in":"path","description":"ID of internal user that is to be deleted","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"valid":{"type":"boolean"},"devUserId":{"type":"string","example":"6ccb3612-4cdc-469e-8574-6007f3c54084"},"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"}}}}},"/internaluser/applications":{"get":{"tags":["Internal User"],"summary":"Find all applications internal user has access to.","description":"Call used by internal user to get the applications that have been granted permisssions to.","operationId":"getInternalUserApps","produces":["application/json"],"security":[{"internalUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/Application"}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/devuser":{"get":{"tags":["Dev User"],"summary":"Find all the Dev Users of an organisation","description":"Returns all devusers that belong to an organisation.","operationId":"getDevUsers","produces":["application/json"],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/DevUserRes"}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"post":{"tags":["Dev User"],"summary":"Create a devuser","description":"Create a devuser that belongs to an organisation","operationId":"addDevUser","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"addDevUserBody","description":"The information that is used to create a devuser.","schema":{"$ref":"#/definitions/AddDevUserReq"}}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/AddDevUserRes"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/devuser/{devUserId}":{"get":{"tags":["Dev User"],"summary":"Find a devuser by Id","description":"Returns a single devuser.","operationId":"getDevUserbyId","parameters":[{"name":"devUserId","in":"path","description":"ID of devuser that is being queried","required":true,"type":"string"}],"produces":["application/json"],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DevUserRes"}},"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":["Dev User"],"summary":"Updates the devuser's metadata.","description":"Updates the devuser s metadata. Elements that can be updated include name","operationId":"updateDevUser","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"devUserId","in":"path","description":"ID of devuser that needs to be updated","required":true,"type":"string"},{"in":"body","name":"devuserUpdateBody","description":"The elements of a devuser that can be updated.","schema":{"type":"object","properties":{"name":{"type":"string","example":"Arthur Dent the sandwichmaker"}}}}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/UpdateDevUserRes"}},"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":["Dev User"],"summary":"Delete devuser","description":"Delete devuser","operationId":"deleteDevUser","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"devUserId","in":"path","description":"ID of devuser that is to be deleted","required":true,"type":"string"}],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"valid":{"type":"boolean"},"devUserId":{"type":"string","example":"6ccb3612-4cdc-469e-8574-6007f3c54084"},"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"}}}}},"/devuser/verify":{"post":{"tags":["Dev User"],"summary":"Generate a devuser verification token","description":"This call generates a 4 digit token and sends it via second channel of communication over to the devuser (at the moment the only second channel of communication supported is email).","operationId":"generateDevUserVerificationToken","parameters":[{"in":"body","name":"generateVerificationTokenDevUserReq","description":"The information that is used to create to generate an email verification token.","schema":{"$ref":"#/definitions/GenerateVerificationTokenDevUserReq"}}],"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":["Dev User"],"summary":"Verify a devuser verification token","description":"This call generates a 4 digit token and sends it via second channel of communication over to the devuser (at the moment the only second channel of communication supported is email).","operationId":"verifyDevUser","parameters":[{"in":"body","name":"verifyDevUser","description":"The information that is used to create a devuser.","schema":{"$ref":"#/definitions/VerifyDevUserReq"}}],"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"valid":{"type":"boolean"},"devUserId":{"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"}}}}},"/devuser/email":{"post":{"tags":["Dev User"],"summary":"Change a devuser's email","description":"A devuser can update their email","operationId":"devUserChangeEmail","parameters":[{"in":"body","name":"devUserChangeEmailBody","description":"The body contains the devuser's new email.","schema":{"type":"object","properties":{"email":{"type":"string","example":"arthur_dent_42@bestsandwiches.lam"}},"required":["email"]}}],"consumes":["application/json"],"produces":["application/json"],"security":[{"devUserToken":[]}],"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"}}}}},"/devuser/changepassword":{"post":{"tags":["Dev User"],"summary":"Change a devuser's password","description":"A devuser can change their passwrod. They would neeed to have knowledge of their previous password","operationId":"devUserChangePassWord","parameters":[{"in":"body","name":"devUserChangePassWord","description":"The information that is used to create a devuser.","schema":{"type":"object","properties":{"oldPassword":{"type":"string","example":"@$tr0ngP@$"},"newPassword":{"type":"string","example":"aV3ry$tr0ngp@$"}}}}],"consumes":["application/json"],"produces":["application/json"],"security":[{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"valid":{"type":"boolean"}}}},"400":{"description":"Bad Request","schema":{"type":"object","properties":{"error":{"type":"string","example":"weak new password"}}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/devuser/resetpassword":{"post":{"tags":["Dev User"],"summary":"Generate a token that can be used by devuser to reset their password.","description":"This call generates a 4 digit token and sends it via second channel of communication over to the devuser (at the moment the only second channel of communication supported is email). The devuser can then use this token to reset their password.","operationId":"generateDevUserPasswordResetToken","parameters":[{"in":"body","name":"generatePasswordResetTokenDevUserReq","description":"The information that is need to generate a password reset token.","schema":{"$ref":"#/definitions/GeneratePasswordResetTokenDevUserReq"}}],"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":["Dev User"],"summary":"A devuser resets their password","description":"This call generates a 4 digit token and sends it via second channel of communication over to the devuser (at the moment the only second channel of communication supported is email).","operationId":"resetPasswordDevUser","parameters":[{"in":"body","name":"resetPasswordDevUserBody","description":"The information that is used to reset a devuser's password.","schema":{"$ref":"#/definitions/PasswordResetDevUserReq"}}],"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"}}}}},"/devuserprofile":{"get":{"tags":["devuserprofile"],"summary":"Find all the profiles of a DevUser","description":"Returns all the profileNames of profiles a devuser has saved in the Developer Portal.","operationId":"getDevUserProfile","produces":["application/json"],"security":[{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"devUserId":{"type":"string","example":"6ccb3612-4cdc-469e-8574-6007f3c54084"},"profileNames":{"type":"array","items":{"type":"string"},"example":["DashBoard","Settings"]}}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"post":{"tags":["devuserprofile"],"summary":"Create a devuser profile under a given profileName.","description":"Create a devuser profile under a given profileName. profileName is a required field. Please note that anything under the profileName will be overwritten.","operationId":"addDevUserProfile","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"addDevUserProfile","description":"The information that is used to create a devuser.","schema":{"$ref":"#/definitions/DevUserProfile"}}],"security":[{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"properties":{"status":{"type":"string","example":"OK"},"devUserId":{"type":"string","example":"6ccb3612-4cdc-469e-8574-6007f3c54084"},"profileName":{"type":"string","example":"DashBoard"}}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/devuserprofile/{profileName}":{"get":{"tags":["devuserprofile"],"summary":"Find specific group of application","description":"Returns an application's group.","operationId":"getDevUserProfilebyProfileName","parameters":[{"name":"profileName","in":"path","description":"profileName of the system to be retrieved","required":true,"type":"string"}],"produces":["application/json"],"security":[{"orgAppKeys":[]},{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DevUserProfile"}},"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"}}}}},"/auth/appkey":{"get":{"tags":["Application API Keys"],"summary":"check whether a set of appkeys basic auth is valid","description":"Check whether a set of appkeys basic auth is valid. This check also applies for anything that can mimic a set of appkeys (orgaappkeys/ devUserToken + applicationId)","operationId":"checkAdminAuth","consumes":["application/json"],"produces":["application/json"],"security":[{"appKeys":[]},{"orgAppKeys":[],"applicationId":[]},{"devUserToken":[],"applicationId":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"valid":{"type":"boolean"}}}},"400":{"description":"Bad Request","schema":{"type":"object","properties":{"valid":{"type":"boolean","example":false}}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/devauth":{"get":{"tags":["Dev User's Auth"],"summary":"Checks whether a devuser token is valid.","description":"Checks whether a user token is valid.","operationId":"devtokencheck","produces":["application/json"],"security":[{"devUserToken":[]},{"orgAppKeys":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"devUserId":{"type":"string","example":"6ccb3612-4cdc-469e-8574-6007f3c54084"},"organizationId":{"type":"string","example":"8acb3267-cb1a-40d3-b54c-8deddcfcf044"},"valid":{"type":"boolean"},"exp":{"type":"integer","description":"Timestamp of token expiry date","example":1509010921}}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"post":{"tags":["Dev User's Auth"],"summary":"Authenticate a devuser","description":"Autheticates the devuser and generates a JWT token.","operationId":"devusernamelogin","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"DevUsernameLoginDetails","required":true,"description":"The information that is required to authenticate an account.","schema":{"$ref":"#/definitions/DevUserNameLoginReq"}}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"devUserId":{"type":"string","example":"6ccb3612-4cdc-469e-8574-6007f3c54084"},"valid":{"type":"boolean"},"exp":{"type":"integer","description":"Timestamp of token expiry date","example":1509010921},"name":{"type":"string","example":"Arthur Dent"},"token":{"type":"string","description":"JWT token","example":"eyJhbGciO37iIsInR5cCI6IkpXVCJ9.eyJ0b2tlbkhhc2giOiI0Y2FmMGVlYmRjNDk2NjAxZDI3ZDk2NzdjM2MxN2JhMDBlZGRmOTNiZDk5MjlmYjgyMWZk6453NzliOWNlYmY0ODZiOTVjZWZhNDI3MjY3NjhiYzAxNWMiLCJpYXQiOjE1MDg0MDYxMjEsImV4cCI6MTUwOTAxMDkyMX0.3iOew-W5YJBd7DK0kFgvWItAkxKjruurkTupM"}}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/devauth/deleteToken":{"delete":{"tags":["Dev User's Auth"],"summary":"delete a devuser token","description":"Delete the token the devuser used to make this call.","operationId":"devDeleteToken","consumes":["application/json"],"produces":["application/json"],"security":[{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"valid":{"type":"boolean"}}}},"400":{"description":"Bad Request","schema":{"type":"object","properties":{"valid":{"type":"boolean","example":false}}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/tempauth":{"post":{"tags":["tempauth"],"summary":"Generate temporary access credentials.","description":"Generate temporary access credentials, in order to gain access to a user account for troubleshooting purposes.","operationId":"apptempaccess","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"GenerateTempAccessDetails","required":true,"description":"The information that is required to generate temporary access credentials.","schema":{"$ref":"#/definitions/AddTempAccessCredentials"}}],"security":[{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"valid":{"type":"boolean"},"credentials":{"type":"object","description":"The temporary login credentials","properties":{"username":{"type":"string","example":"1a6ee609ed06@null.com"},"password":{"type":"string","example":"d28f40e136b49a05"}}}}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/intauth":{"get":{"tags":["Internal User's Auth"],"summary":"Checks whether an internal user's token is valid.","description":"Checks whether an internal user's token is valid.","operationId":"inttokencheck","produces":["application/json"],"security":[{"devUserToken":[]},{"orgAppKeys":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"internalUserId":{"type":"string","example":"6ccb3612-4cdc-469e-8574-6007f3c54084"},"organizationId":{"type":"string","example":"8acb3267-cb1a-40d3-b54c-8deddcfcf044"},"valid":{"type":"boolean"},"exp":{"type":"integer","description":"Timestamp of token expiry date","example":1509010921}}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}},"post":{"tags":["Internal User's Auth"],"summary":"Authenticate an internal user.","description":"Autheticates the internal user and generates a JWT token.","operationId":"internalusernamelogin","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"DevUsernameLoginDetails","required":true,"description":"The information that is required to authenticate an account.","schema":{"$ref":"#/definitions/DevUserNameLoginReq"}}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"internalUserId":{"type":"string","example":"6ccb3612-4cdc-469e-8574-6007f3c54084"},"valid":{"type":"boolean"},"exp":{"type":"integer","description":"Timestamp of token expiry date","example":1509010921},"name":{"type":"string","example":"Arthur Dent"},"token":{"type":"string","description":"JWT token","example":"eyJhbGciO37iIsInR5cCI6IkpXVCJ9.eyJ0b2tlbkhhc2giOiI0Y2FmMGVlYmRjNDk2NjAxZDI3ZDk2NzdjM2MxN2JhMDBlZGRmOTNiZDk5MjlmYjgyMWZk6453NzliOWNlYmY0ODZiOTVjZWZhNDI3MjY3NjhiYzAxNWMiLCJpYXQiOjE1MDg0MDYxMjEsImV4cCI6MTUwOTAxMDkyMX0.3iOew-W5YJBd7DK0kFgvWItAkxKjruurkTupM"}}}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/MissingElementsError"}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}},"/intauth/deleteToken":{"delete":{"tags":["Internal User's Auth"],"summary":"Delete an internal user token.","description":"Delete the token the internal user used to make this call.","operationId":"internalUserDeleteToken","consumes":["application/json"],"produces":["application/json"],"security":[{"devUserToken":[]}],"responses":{"200":{"description":"OK","schema":{"type":"object","properties":{"valid":{"type":"boolean"}}}},"400":{"description":"Bad Request","schema":{"type":"object","properties":{"valid":{"type":"boolean","example":false}}}},"401":{"description":"Unauthorised","schema":{"$ref":"#/definitions/AccessDeniedError"}},"500":{"description":"Internal Server Error","schema":{"$ref":"#/definitions/InternalServerError"}}}}}},"securityDefinitions":{"orgAppKeys":{"type":"basic"},"appKeys":{"type":"basic"},"devUserToken":{"type":"apiKey","name":"token","in":"header"},"internalUserToken":{"type":"apiKey","name":"token","in":"header"},"userToken":{"type":"apiKey","name":"token","in":"header"},"applicationId":{"type":"apiKey","name":"applicationId","in":"header"},"organizationId":{"type":"apiKey","name":"organizationId","in":"header"}},"definitions":{"Organization":{"type":"object","properties":{"organizationId":{"type":"string","example":"8acb3267-cb1a-40d3-b54c-8deddcfcf044"},"name":{"type":"string","example":"Star Fleet"},"email":{"type":"string","example":"admin@starfleet.com"},"phone":{"type":"string","example":"00921 58738"},"mainContact":{"type":"string","example":"Starfleet's Chief of Operations"},"status":{"type":"string","description":"Organisation Status","enum":["active","inactive"]},"active":{"type":"boolean","default":true}},"xml":{"name":"Organization"}},"OrgAppKey":{"type":"object","properties":{"appKey":{"type":"string","example":"ehxk9sEC54jIlR6vdmzw"},"appSecretKey":{"type":"string","example":"Y12P0KITcbJDiWNlcrm4XrvUVAudLb"},"organizationId":{"type":"string"},"status":{"type":"string","description":"OrgAppKeys Status","enum":["active","inactive"]},"active":{"type":"boolean","default":true}},"required":["appKey","appSecretKey","organizationId"],"xml":{"name":"OrgAppKey"}},"DeleteAppKeysApiResponse":{"type":"object","properties":{"organizationId":{"type":"string"},"appkeys":{"type":"array","items":{"type":"object","properties":{"valid":{"type":"boolean","default":true},"appKey":{"type":"string"}}}}}},"DirectoryIdElement":{"type":"object","properties":{"directoryId":{"type":"string","example":"951cffa7-863f-4ae7-8f7e-ed682e690f91"}}},"Application":{"type":"object","properties":{"applicationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"},"organizationId":{"type":"string","example":"8acb3267-cb1a-40d3-b54c-8deddcfcf044"},"name":{"type":"string","example":"SmartEnergyEnteprise"},"email":{"type":"string"},"description":{"type":"string","example":"Application for monitoring the Enteprise's energy consumption"},"directories":{"type":"array","items":{"$ref":"#/definitions/DirectoryIdElement"}},"status":{"type":"string","description":"Application Status","enum":["running","active","inactive"]},"active":{"type":"boolean","default":true},"emailApiKey":{"$ref":"#/definitions/EmailApiKey"},"pushApiKey":{"$ref":"#/definitions/PushApiKey"},"version":{"type":"array","items":{"$ref":"#/definitions/ApplicationVersion"}}},"xml":{"name":"Application"}},"ApplicationVersionRes":{"type":"object","properties":{"applicationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"},"name":{"type":"string","example":"SmartEnergyEnteprise"},"version":{"type":"array","items":{"$ref":"#/definitions/ApplicationVersion"}}}},"ApplicationVersion":{"type":"object","properties":{"operatingSystem":{"type":"string","example":"android","enum":["android","ios"]},"version":{"type":"string","example":"0.0.9"},"minimumVersion":{"type":"string","example":"0.0.1"}},"required":["version","operatingSystem"]},"EmailApiKey":{"type":"object","properties":{"apiKey":{"type":"string"},"emailService":{"type":"string","enum":["hbsmtp","sendgrid"]}},"required":["apiKey","emailService"]},"PushApiKey":{"type":"object","properties":{"apiKey":{"type":"string"},"apiSecret":{"type":"string"},"pushSystem":{"type":"string","enum":["gcm","apple","firebase"]}},"required":["apiKey","pushSystem"]},"AppKey":{"type":"object","properties":{"appKey":{"type":"string","example":"uYspolHapEa7V7xRFKf6"},"appSecretKey":{"type":"string","example":"qV6WiRkOpPsjAhlNiWw9hdCPsqgmTE"},"applicationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"},"status":{"type":"string","description":"AppKeys Status","enum":["active","inactive"]},"active":{"type":"boolean","default":true}},"required":["appKey","appSecretKey","applicationId"],"xml":{"name":"OrgAppKey"}},"DeleteApplicationResponse":{"type":"object","properties":{"applicationStatus":{"type":"string","description":"Application Status","enum":["running","active","inactive"]},"applicationId":{"type":"string"},"appkeys":{"type":"array","items":{"type":"object","properties":{"valid":{"type":"boolean","default":true},"appKey":{"type":"string"}}}},"allAppKeysDeleted":{"type":"boolean","description":"States whether all appkeys have been deleted."}}},"ApplicationStatusUpdate":{"type":"object","properties":{"applicationStatus":{"type":"string","description":"Application Status","enum":["running","active","inactive"]},"applicationId":{"type":"string"},"valid":{"type":"boolean"}}},"DirectoryType":{"type":"object","properties":{"directoryTypeId":{"type":"string","example":"fa331f5c-8b24-4949-9a8d-9dffafe2c665"},"name":{"type":"string","example":"Glow Auth"},"description":{"type":"string","example":"HB default Authentication Mechanism"},"status":{"type":"string","description":"Directory Type Status","enum":["active","inactive"]},"active":{"type":"boolean","default":true}},"xml":{"name":"DirectoryType"}},"Directory":{"type":"object","properties":{"directoryId":{"type":"string","example":"ddde48e1-96a2-410a-9064-f4f0b7795410"},"directoryTypeId":{"type":"string","example":"fa331f5c-8b24-4949-9a8d-9dffafe2c665"},"applicationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"},"name":{"type":"string","example":"Glow Auth"},"description":{"type":"string","example":"Glow Auth directories of TesterApp"},"status":{"type":"string","description":"Directory Status","enum":["active","inactive"]},"active":{"type":"boolean","default":true}},"xml":{"name":"Directory"}},"Group":{"type":"object","properties":{"groupId":{"type":"string","example":"a30b3717-950c-4f48-a642-76b379a64591"},"applicationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"},"name":{"type":"string","example":"Premier"},"description":{"type":"string","example":"This is a group that contains customers who have premier functionality in the application"},"status":{"type":"string","description":"Group Status","enum":["active","inactive"]},"active":{"type":"boolean","default":true}},"xml":{"name":"Group"}},"AddGroupReq":{"type":"object","properties":{"name":{"type":"string","example":"TrialGroup"},"description":{"type":"string","example":"Group that contains accounts who are on trial"}},"required":["name"],"xml":{"name":"AddGroupReq"}},"AddFunctionalGroupReq":{"type":"object","properties":{"name":{"type":"string","example":"Fincance"},"description":{"type":"string","example":"Group that has permissions to billing information in an application"}},"required":["name"],"xml":{"name":"AddGroupReq"}},"AddRemoveGroupsReq":{"type":"object","properties":{"add":{"type":"array","items":{"type":"string"},"example":["4de6dbaf-6e16-49d1-86a3-b18f960912d6","555252f3-5b3d-43ed-b294-239ebb6dd9ec"]},"remove":{"type":"array","items":{"type":"string","example":["808efafc-21d4-46af-8d1d-bc38a4df0984","e55a4371-a8e9-4dfd-9d42-0807e0abcba3"]}}}},"AddRemoveGroupsRes":{"type":"object","properties":{"status":{"type":"string","example":"OK"},"add":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"valid":{"type":"boolean"}}},"example":[{"accountId":"4de6dbaf-6e16-49d1-86a3-b18f960912d6","valid":true},{"accountId":"555252f3-5b3d-43ed-b294-239ebb6dd9ec","valid":false}]},"remove":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string"},"valid":{"type":"boolean"}}},"example":[{"accountId":"808efafc-21d4-46af-8d1d-bc38a4df0984","valid":true},{"accountId":"e55a4371-a8e9-4dfd-9d42-0807e0abcba3","valid":false}]}}},"FunctionalGroup":{"type":"object","properties":{"functionalGroupId":{"type":"string","example":"fe0b3717-950c-4f48-a642-76b379a64591"},"applicationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"},"name":{"type":"string","example":"finance"},"description":{"type":"string","example":"This is a group that contains customers who have premier functionality in the application"},"status":{"type":"string","description":"Functional Group Status","example":"active","enum":["active","inactive"]},"active":{"type":"boolean","default":true}},"xml":{"name":"Functional Group"}},"AddTempAccessCredentials":{"type":"object","properties":{"username":{"type":"string","example":"scotty"},"directoryId":{"type":"string","example":"2e214dec-bf44-4f58-83d0-2fa89d023e90"}},"required":["username","directoryId"]},"InternalUser":{"type":"object","properties":{"name":{"type":"string","example":"Miles O'Brien"},"username":{"type":"string","example":"miles.obrien@enterprise-d.st"},"email":{"type":"string","example":"miles.obrien@enterprise-d.st"},"password":{"type":"string","example":"@$tr0ngP@$"},"organizationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"}},"required":["name","username","email","organizationId"]},"LoginEvent":{"type":"object","properties":{"loginType":{"type":"string","example":"key"},"accountId":{"type":"string","example":"808efafc-21d4-46af-8d1d-bc38a4df0984"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"applicationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"},"accountLoginEventId":{"type":"string","example":"0967d8c9-4ade-4ed3-82c9-84a665ecb0f8"},"userId":{"type":"string","example":"69f464fa-bca2-4f2a-83b1-0c69819c5cd0"}}},"AddDevUserReq":{"type":"object","properties":{"name":{"type":"string","example":"Arthur Dent"},"username":{"type":"string","example":"arthurdent42"},"email":{"type":"string","example":"arthurdent42@bestsandwiches.lam"},"password":{"type":"string","example":"@$tr0ngP@$"}},"required":["name","username","email","password"]},"AddInternalUserReq":{"type":"object","properties":{"name":{"type":"string","example":"Arthur Dent"},"username":{"type":"string","example":"arthurdent42"},"email":{"type":"string","example":"arthurdent42@bestsandwiches.lam"},"password":{"type":"string","example":"@$tr0ngP@$"},"applications":{"type":"array","items":{"type":"object","properties":{"active":{"type":"boolean"},"applicationId":{"type":"string","example":"0537b17c-ab62-491c-8085-9ac2b6206346"}}}}},"required":["name","username","email","password","applications"]},"DevUserRes":{"type":"object","properties":{"devUserId":{"type":"string","example":"6ccb3612-4cdc-469e-8574-6007f3c54084"},"name":{"type":"string","example":"Arthur Dent"},"username":{"type":"string","example":"arthurdent42"},"email":{"type":"string","example":"arthurdent42@bestsandwiches.lam"},"organizationId":{"type":"string","example":"8acb3267-cb1a-40d3-b54c-8deddcfcf044"},"status":{"type":"string","enum":["active","inactive","unverified"]},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["devUserId","name","username","email","organizationId"]},"AddDevUserRes":{"type":"object","properties":{"devUserId":{"type":"string","example":"6ccb3612-4cdc-469e-8574-6007f3c54084"},"name":{"type":"string","example":"Arthur Dent"},"username":{"type":"string","example":"arthurdent42"},"email":{"type":"string","example":"arthurdent42@bestsandwiches.lam"},"organizationId":{"type":"string","example":"8acb3267-cb1a-40d3-b54c-8deddcfcf044"},"status":{"type":"string","enum":["active","inactive","unverified"],"example":"unverified"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["devUserId","name","username","email","organizationId"]},"UpdateDevUserRes":{"type":"object","properties":{"devUserId":{"type":"string","example":"6ccb3612-4cdc-469e-8574-6007f3c54084"},"name":{"type":"string","example":"Arthur Dent the sandwichmaker"},"username":{"type":"string","example":"arthurdent42"},"email":{"type":"string","example":"arthurdent42@bestsandwiches.lam"},"organizationId":{"type":"string","example":"8acb3267-cb1a-40d3-b54c-8deddcfcf044"},"status":{"type":"string","enum":["active","inactive","unverified"]},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","example":"2017-10-18T17:06:48.549Z"},"updatedAt":{"type":"string","format":"date-time"}}},"GenerateVerificationTokenDevUserReq":{"type":"object","properties":{"username":{"type":"string","example":"arthurdent42"},"password":{"type":"string","example":"@$tr0ngP@$"}},"required":["username","password"]},"VerifyDevUserReq":{"allOf":[{"$ref":"#/definitions/GenerateVerificationTokenDevUserReq"}],"type":"object","properties":{"token":{"type":"string","example":8442}},"required":["token"]},"GeneratePasswordResetTokenDevUserReq":{"type":"object","properties":{"username":{"type":"string","example":"arthurdent42"}},"required":["username"]},"PasswordResetDevUserReq":{"type":"object","properties":{"username":{"type":"string","example":"arthurdent42"},"token":{"type":"string","example":8442},"newPassword":{"type":"string","example":"aV3ry$tr0ngp@$"}},"required":["username","token","newPassword"]},"DevUserProfile":{"type":"object","properties":{"profileName":{"type":"string","example":"DashBoard"},"InformationAboutDashboard":{"type":"object","example":{"graphs":["logins","load"],"Logins":{"maxNumDays":15},"load":{"thredhold":500}}}},"required":["profileName"]},"DevUserNameLoginReq":{"type":"object","properties":{"username":{"type":"string","example":"arthurdent42"},"password":{"type":"string","example":"@$tr0ngP@$"}},"required":["username","password"]},"Error":{"type":"object","properties":{"error":{"type":"string"}},"xml":{"name":"Error"}},"AccessDeniedError":{"type":"object","properties":{"error":{"type":"string","example":"Access denied"}}},"InternalServerError":{"type":"object","properties":{"error":{"type":"string","example":"An error has occurred"}}},"IncorrectElementsError":{"type":"object","properties":{"error":{"type":"string","example":"incorrect elements"}}},"MissingElementsError":{"type":"object","properties":{"error":{"type":"string","example":"missing elements"}}},"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}}},"externalDocs":{"description":"Find out more about Glowmarkt","url":"https://glowmarkt.com/"}},"customOptions":{}}