"description":"API for the SWAT Account Service that allows creation, management, and authentication of SWAT accounts. A SWAT account can be used to access SWAT services, such as RCPD 3.0 (rcpd-service) and map marker. Accounts in RCPD 2.0 have been migrated to SWAT accounts with the same username and password.",
"description":"Activate a migrated account, by setting an email address and changing the password. This is required for all migrated accounts before they can be used to get tokens.",
"parameters":[{
"name":"username",
"in":"path",
"description":"The username of the account to activate.",
"message":"NullPointerException when deserializing value.",
"serviceName":"swat-account-service"
}
}
}
}
}
},
"204":{
"description":"Migrated account activated successfully. An email will have been sent to the provided email address with a verification link to verify the email address.",
"headers":{}
},
"400":{
"description":"Account has already been activated.",
"headers":{},
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/ErrorResponse"
},
"examples":{
"Account Already Activated Exception Response":{
"value":{
"reference":"kcog4koca5xhiegavarp",
"message":"Account has already been activated.",
"serviceName":"swat-account-service"
}
}
}
}
}
},
"401":{
"description":"The account does not exist or the password is incorrect.",
"headers":{},
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/ErrorResponse"
},
"examples":{
"Example Unauthorized Response":{
"value":{
"reference":"kcog4koca5xhiegavarp",
"message":"Invalid username or password.",
"serviceName":"swat-account-service"
}
}
}
}
}
},
"409":{
"description":"The requested email address is already registered to another SWAT account.",
"description":"Your password is correct, but must be changed.",
"headers":{},
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/ErrorResponse"
},
"examples":{
"Password Change Required Exception Response":{
"value":{
"reference":"kcog4koca5xhiegavarp",
"message":"Your password must be changed.",
"serviceName":"swat-account-service"
}
}
}
}
}
},
"500":{
"description":"An error occurred in the system.",
"headers":{},
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/ErrorResponse"
},
"examples":{
"General Exception Response example":{
"value":{
"reference":"kcog4koca5xhiegavarp",
"message":"NullPointerException when deserializing value.",
"serviceName":"swat-account-service"
}
}
}
}
}
}
},
"deprecated":false
}
},
"/account/{username}/request-verification-code":{
"post":{
"tags":["Email Verification Resource"],
"description":"Re-send the verification code for the specified account, creating a new code if the old code has expired.",
"parameters":[{
"name":"username",
"in":"path",
"description":"The username or email address of the account you wish to perform the action on.",
"required":true,
"deprecated":false,
"explode":false,
"schema":{
"type":"string",
"title":"String"
},
"example":"test@test.com"
}],
"responses":{
"500":{
"description":"An error occurred in the system.",
"headers":{},
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/ErrorResponse"
},
"examples":{
"General Exception Response example":{
"value":{
"reference":"kcog4koca5xhiegavarp",
"message":"NullPointerException when deserializing value.",
"serviceName":"swat-account-service"
}
}
}
}
}
},
"204":{
"description":"An email has been sent with a verification code for the specified email address. Please note, if the email address is not registered, this response will still be returned, in order to prevent malicious actors from discovering registered email addresses.",
"headers":{}
}
},
"deprecated":false
}
},
"/account/{username}/verify-email":{
"post":{
"tags":["Email Verification Resource"],
"description":"Verify that your email address is a real email address and you have access to it.",
"parameters":[{
"name":"username",
"in":"path",
"description":"The username or email address of the account you wish to perform the action on.",
"required":true,
"deprecated":false,
"explode":false,
"schema":{
"type":"string",
"title":"String"
},
"example":"test@test.com"
}],
"requestBody":{
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/VerifyEmailRequest"
}
}
},
"required":true
},
"responses":{
"500":{
"description":"An error occurred in the system.",
"headers":{},
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/ErrorResponse"
},
"examples":{
"General Exception Response example":{
"value":{
"reference":"kcog4koca5xhiegavarp",
"message":"NullPointerException when deserializing value.",
"serviceName":"swat-account-service"
}
}
}
}
}
},
"204":{
"description":"Your email address has been verified and you are now able to login and get a token.",
"headers":{}
},
"403":{
"description":"The provided verification code is not valid for the specified account.",
"headers":{},
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/ErrorResponse"
},
"examples":{
"Example Forbidden Response":{
"value":{
"reference":"kcog4koca5xhiegavarp",
"message":"HTTP 403 Forbidden",
"serviceName":"swat-account-service"
}
}
}
}
}
},
"404":{
"description":"The provided verification code does not exist.",
"headers":{},
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/ErrorResponse"
},
"examples":{
"Not Found Exception Response Example":{
"value":{
"reference":"kcog4koca5xhiegavarp",
"message":"email verification code [ {verificationCode} ] not found",
"description":"Request a one-time use code to be emailed to the account's email address that can be used to change the account's password.",
"parameters":[{
"name":"username",
"in":"path",
"description":"The username or email address of the account you wish to request a password reset code for.",
"required":true,
"deprecated":false,
"explode":false,
"schema":{
"type":"string",
"title":"String"
},
"example":"test@test.com"
}],
"responses":{
"500":{
"description":"An error occurred in the system.",
"headers":{},
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/ErrorResponse"
},
"examples":{
"General Exception Response example":{
"value":{
"reference":"kcog4koca5xhiegavarp",
"message":"NullPointerException when deserializing value.",
"serviceName":"swat-account-service"
}
}
}
}
}
},
"204":{
"description":"An email has been sent with a password reset code for the account specified by the email address. Please note, if the account is not registered, this response will still be returned, in order to prevent malicious actors from discovering registered email addresses.",
"headers":{}
}
},
"deprecated":false
}
},
"/account/{username}/reset-password":{
"post":{
"tags":["Password Resource"],
"description":"Use the one-time use code to change the account's password.",
"parameters":[{
"name":"username",
"in":"path",
"description":"The username or email address of the account to reset the password on.",
"description":"Change password of the specified account using the existing password to authenticate. Use this endpoint if you are unable to get a token because you are forced to update your password.",
"parameters":[{
"name":"username",
"in":"path",
"description":"The username or email address of the account to change the password on.",
"description":"User name, email address, and password for this account.",
"properties":{
"emailAddress":{
"type":"string",
"description":"The email address to register this account under. Must be in the standard email format, characters followed by @ followed by characters followed by . followed by characters.",
"example":"testemail@test.com",
"maxLength":100,
"minLength":0,
"title":"String"
},
"password":{
"type":"string",
"description":"The password for this SWAT account.",
"example":"password123",
"maxLength":100,
"minLength":8,
"title":"String"
},
"username":{
"type":"string",
"description":"The username for this SWAT account.",
"description":"A message describing the error that occurred.",
"example":"An error occurred.",
"maxLength":2147483647,
"minLength":0,
"title":"String"
},
"reference":{
"type":"string",
"description":"A unique reference for your error. Provide this to the admins to help track down your issue.",
"example":"kcog4koca5xhiegavarp",
"maxLength":20,
"minLength":20,
"title":"String"
},
"serviceName":{
"type":"string",
"description":"The name of this service. Will always be swat-account-service.",
"example":"swat-account-service",
"maxLength":20,
"minLength":20,
"title":"String"
}
},
"required":["message","reference","serviceName"],
"title":"ErrorResponse"
},
"ValidationErrorResponse":{
"type":"object",
"properties":{
"errors":{
"type":"object",
"additionalProperties":{
"type":"array",
"items":{
"type":"string",
"title":"String"
},
"title":"List<String>"
},
"description":"Key value pairs, where each key is the name of a property of the request object, and each value is a list of strings, each string indicating a validation error for that property.",
"example" : "{ \"username\": [\"must not be blank\" ] }",
"maxLength":2147483647,
"minLength":0,
"title":"Map<String,List<String>>"
},
"message":{
"type":"string",
"description":"A message describing the error that occurred.",
"example":"An error occurred.",
"maxLength":2147483647,
"minLength":0,
"title":"String"
},
"reference":{
"type":"string",
"description":"A unique reference for your error. Provide this to the admins to help track down your issue.",
"example":"kcog4koca5xhiegavarp",
"maxLength":20,
"minLength":20,
"title":"String"
},
"serviceName":{
"type":"string",
"description":"The name of this service. Will always be swat-account-service.",
"description":"The properties of your SWAT account you wish to update.",
"properties":{
"password":{
"type":["null","string"],
"description":"The new password for your account.",
"example":"mynewpassword123",
"maxLength":100,
"minLength":8,
"title":"String"
}
},
"title":"AccountUpdateRequest"
},
"ActivateMigratedAccountRequest":{
"type":"object",
"description":"The email address for the account, along with the current password to authenticate, and the new password.",
"properties":{
"currentPassword":{
"type":"string",
"description":"The current password for your migrated SWAT account you wish to activate.",
"example":"mypassword123",
"maxLength":2147483647,
"minLength":0,
"title":"String"
},
"emailAddress":{
"type":"string",
"description":"The email address to set for this account. Must be in the standard email format, characters followed by @ followed by characters followed by . followed by characters.",
"example":"myemailaddress@gmail.com",
"maxLength":100,
"minLength":0,
"title":"String"
},
"newPassword":{
"type":"string",
"description":"The new password for your SWAT account.",