1932 lines
66 KiB
YAML
1932 lines
66 KiB
YAML
openapi: 3.0.1
|
|
info:
|
|
title: SWAT Aftermath - RCPD Service
|
|
description: "Rank code manager service for storing rank codes, generating rank\
|
|
\ codes, earning titles, etc. The back end for RPCD 3.0"
|
|
version: 0.24.3
|
|
servers:
|
|
- url: https://swataftermath.com:9443/
|
|
tags:
|
|
- name: Account Resource
|
|
description: Resource for management of RCPD accounts
|
|
- name: Accounts Resource
|
|
description: Resource for retrieving multiple accounts.
|
|
- name: Rank Code Resource
|
|
description: Resource for saving and retrieving rank codes and builds.
|
|
- name: Unlocks Resource
|
|
description: Resource for retrieving the maximum rank unlocked for each SWAT build
|
|
element.
|
|
- name: Open API Resource
|
|
description: Resource that provides the Open API documentation for this service.
|
|
paths:
|
|
/account/{username}:
|
|
get:
|
|
tags:
|
|
- Account Resource
|
|
summary: Get RCPD account.
|
|
description: "Get the specified RCPD account if it exists. Auth token is optional\
|
|
\ for this resource. If provided, and you are the owner of the account, you\
|
|
\ will see all information for the account."
|
|
operationId: getAccount
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: The username of the RCPD account you wish to retrieve. The username
|
|
is case sensitive.
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: teller55
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: The requested RCPD account.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/AccountResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
put:
|
|
tags:
|
|
- Account Resource
|
|
summary: Update properties of the specified account
|
|
description: "Update certain fields of an RCPD account. This is a partial PUT\
|
|
\ operation, where only the fields you want to update must be provided."
|
|
operationId: updateAccount
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: The username of the RCPD account you wish to update. The username
|
|
is case sensitive.
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: teller55
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/AccountUpdateRequest"
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"403":
|
|
description: You are not allowed to perform the requested action.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"422":
|
|
description: The request body was invalid and could not be processed
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ValidationErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/account:
|
|
get:
|
|
tags:
|
|
- Account Resource
|
|
summary: Get default RCPD account.
|
|
description: Get the default RCPD account for this user.
|
|
operationId: getDefaultAccount
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: The requested RCPD account.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/AccountResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
post:
|
|
tags:
|
|
- Account Resource
|
|
summary: Create a new RPCD account
|
|
description: "Create a new RPCD account with the given username, and owned by\
|
|
\ the user of the provided token."
|
|
operationId: newAccount
|
|
requestBody:
|
|
description: The details of the RPCD account to create.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/AccountCreationRequest"
|
|
required: true
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"201":
|
|
description: The RCPD account has been created.
|
|
headers:
|
|
Location:
|
|
description: The URL of the newly-created RCPD account.
|
|
style: simple
|
|
schema:
|
|
type: uri
|
|
example: /account/Teller55
|
|
"400":
|
|
description: The request did not include a request body.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"409":
|
|
description: The username is already registered.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"422":
|
|
description: The request body was invalid and could not be processed
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ValidationErrorResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/account/{username}/set-default:
|
|
post:
|
|
tags:
|
|
- Account Resource
|
|
summary: Set default account for user
|
|
description: Set the default RCPD account for this user. Must be an account
|
|
this user owns.
|
|
operationId: setDefaultAccount
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: The username of the RCPD account to set as the default account
|
|
for this user. The username is case sensitive.
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: teller55
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"204":
|
|
description: The account has successfully been set to be the default account.
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"403":
|
|
description: You are not allowed to perform the requested action.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/accounts/active-count:
|
|
get:
|
|
tags:
|
|
- Accounts Resource
|
|
summary: Get number of active players.
|
|
description: Get the number of active RCPD users. Active means somebody who
|
|
has logged in or done things on their account recently.
|
|
operationId: countActiveAccounts
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
text/plain:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: The number of active RCPD users.
|
|
content:
|
|
text/plain:
|
|
example: 47
|
|
/accounts:
|
|
get:
|
|
tags:
|
|
- Accounts Resource
|
|
summary: Get users' accounts.
|
|
description: Get all the RCPD accounts owned by this user.
|
|
operationId: getAccounts
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: A list of RCPD account summaries.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/AccountSummaryResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/accounts/leaderboard:
|
|
get:
|
|
tags:
|
|
- Accounts Resource
|
|
summary: Get the leaderboard
|
|
description: "Get accounts on the leaderboard, ordered by account rank and points."
|
|
operationId: getLeaderboard
|
|
parameters:
|
|
- name: limit
|
|
in: query
|
|
description: The maximum number of accounts to be returned.
|
|
schema:
|
|
type: integer
|
|
format: int32
|
|
default: 30
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: The leaderboard accounts.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/AccountSummaryResponse"
|
|
/accounts/search:
|
|
get:
|
|
tags:
|
|
- Accounts Resource
|
|
summary: Search for accounts.
|
|
description: "Search for any accounts matching the provided username. The results\
|
|
\ will include both partial matches, and sound-alike matches. (IE if you search\
|
|
\ for John, the results will include Jon)"
|
|
operationId: searchAccounts
|
|
parameters:
|
|
- name: searchName
|
|
in: query
|
|
description: The partial or sound-alike username to search for.
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: teller
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: A list of RCPD account summaries whose usernames match the
|
|
provided search query.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/AccountSummaryResponse"
|
|
"400":
|
|
description: Username to search for was not provided. Includes if the provided
|
|
query param is blank.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
/account/rank-code/{rankCode}:
|
|
delete:
|
|
tags:
|
|
- Rank Code Resource
|
|
summary: Delete saved build for default account.
|
|
description: Delete a saved build on the user's default account.
|
|
operationId: deleteSavedBuild
|
|
parameters:
|
|
- name: rankCode
|
|
in: path
|
|
description: "The SWAT: Aftermath hero build rank code that identifies the\
|
|
\ saved build to be deleted."
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: 1522-4120-7272-0500
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"204":
|
|
description: The request was executed successfully. The build is deleted
|
|
if it existed.
|
|
"400":
|
|
description: The provided rank code is invalid.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/account/{username}/rank-code/{rankCode}:
|
|
delete:
|
|
tags:
|
|
- Rank Code Resource
|
|
summary: Delete saved build for specified account.
|
|
description: Delete a saved build on the specified account. The user must own
|
|
the account.
|
|
operationId: deleteSavedBuild_1
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: The RCPD account to delete the saved build from. The username
|
|
is case sensitive.
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: teller55
|
|
- name: rankCode
|
|
in: path
|
|
description: "The SWAT: Aftermath hero build rank code that identifies the\
|
|
\ saved build to be deleted."
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: 1522-4120-7272-0500
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"204":
|
|
description: The request was executed successfully. The build is deleted
|
|
if it existed.
|
|
"400":
|
|
description: The provided rank code is invalid.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"403":
|
|
description: You are not allowed to perform the requested action.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/account/generate:
|
|
post:
|
|
tags:
|
|
- Rank Code Resource
|
|
summary: Generate a rank code for default account.
|
|
description: Generate a SWAT rank code using the default RCPD account for this
|
|
user.
|
|
operationId: generate
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/BuildRequest"
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: "The generated rank code, along with the details of the hero\
|
|
\ build, including any medals or titles."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/HeroBuildResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/account/{username}/generate:
|
|
post:
|
|
tags:
|
|
- Rank Code Resource
|
|
summary: Generate a rank code for specified account.
|
|
description: Generate a SWAT rank code using the specified RCPD account. The
|
|
account must be owned by the user.
|
|
operationId: generate_1
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: The RCPD account to get saved builds for. The username is case
|
|
sensitive.
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: teller55
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/BuildRequest"
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: "The generated rank code, along with the details of the hero\
|
|
\ build, including any medals or titles."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/HeroBuildResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"403":
|
|
description: You are not allowed to perform the requested action.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/account/saved-builds:
|
|
get:
|
|
tags:
|
|
- Rank Code Resource
|
|
summary: Get saved builds for default account.
|
|
description: Get the saved builds for the default RCPD account.
|
|
operationId: getSavedBuilds
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: The saved builds.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/HeroBuildResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/account/{username}/saved-builds:
|
|
get:
|
|
tags:
|
|
- Rank Code Resource
|
|
summary: Get saved builds for account.
|
|
description: "Get the saved builds for the specified RCPD account. If the account\
|
|
\ is not owned by the user, or no token is provided, a public view of the\
|
|
\ saved builds will be returned."
|
|
operationId: getSavedBuilds_1
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: The RCPD account to get saved builds for. The username is case
|
|
sensitive.
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: teller55
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: The saved builds.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/HeroBuildResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/account/rank-code:
|
|
post:
|
|
tags:
|
|
- Rank Code Resource
|
|
summary: Save a rank code to the default account
|
|
description: "Save a rank code, along with an optional name for this build.\
|
|
\ This will be saved to the default account for this user."
|
|
operationId: saveRankCode
|
|
requestBody:
|
|
description: The rank code and optional build name.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/RankCodeRequest"
|
|
required: true
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: "The saved build, plus any other saved builds that have had\
|
|
\ medals or titles updated as a result of the new build being saved. If\
|
|
\ the build that was saved had earned any medals or titles, then all saved\
|
|
\ builds with the same class/trait/specialization combination will be\
|
|
\ updated and returned. This avoids the scenario of earning a medal/title\
|
|
\ on one build, and then earning the same medal/title on another build\
|
|
\ with the same class/trait/specialization combination which shares the\
|
|
\ new medal/title."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
minItems: 1
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/HeroBuildResponse"
|
|
"400":
|
|
description: The provided rank code is invalid.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"422":
|
|
description: The request body was invalid and could not be processed
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ValidationErrorResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/account/{username}/rank-code:
|
|
post:
|
|
tags:
|
|
- Rank Code Resource
|
|
summary: Save a rank code to the specified account
|
|
description: "Save a rank code, along with an optional name for this build,\
|
|
\ to the specified RCPD account."
|
|
operationId: saveRankCode_1
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: The RCPD account to save this rank code to. The username is case
|
|
sensitive.
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: teller55
|
|
requestBody:
|
|
description: The rank code and optional build name.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/RankCodeRequest"
|
|
required: true
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: "The saved build, plus any other saved builds that have had\
|
|
\ medals or titles updated as a result of the new build being saved. If\
|
|
\ the build that was saved had earned any medals or titles, then all saved\
|
|
\ builds with the same class/trait/specialization combination will be\
|
|
\ updated and returned. This avoids the scenario of earning a medal/title\
|
|
\ on one build, and then earning the same medal/title on another build\
|
|
\ with the same class/trait/specialization combination which shares the\
|
|
\ new medal/title."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
minItems: 1
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/HeroBuildResponse"
|
|
"400":
|
|
description: The provided rank code is invalid.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"403":
|
|
description: You are not allowed to perform the requested action.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"422":
|
|
description: The request body was invalid and could not be processed
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ValidationErrorResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/account/unlocks:
|
|
get:
|
|
tags:
|
|
- Unlocks Resource
|
|
summary: Get unlocks for default account.
|
|
description: Get the currently unlocked rank for each SWAT build element for
|
|
the user's default account.
|
|
operationId: getUnlocks
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: The maximum unlocked rank of each element of a SWAT build.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/UnlocksResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/account/{username}/unlocks:
|
|
get:
|
|
tags:
|
|
- Unlocks Resource
|
|
summary: Get unlocks for specified account.
|
|
description: Get the currently unlocked rank for each SWAT build element for
|
|
the specified RCPD account. The account must be owned by the user.
|
|
operationId: getUnlocks_1
|
|
parameters:
|
|
- name: username
|
|
in: path
|
|
description: The RCPD account to retrieve the unlocks for. The username is
|
|
case sensitive.
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: teller55
|
|
responses:
|
|
"500":
|
|
description: Something went wrong when processing the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"502":
|
|
description: A dependent service or database had an error.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"200":
|
|
description: The maximum unlocked rank of each element of a SWAT build.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/UnlocksResponse"
|
|
"401":
|
|
description: "Authorization header is not present, or token is invalid or\
|
|
\ expired."
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"503":
|
|
description: The security infrastructure cannot currently handle the request.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"403":
|
|
description: You are not allowed to perform the requested action.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
"404":
|
|
description: The requested resource could not be found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
security:
|
|
- SWAT-Token: []
|
|
/openapi.{type}:
|
|
get:
|
|
tags:
|
|
- Open API Resource
|
|
description: Get the Open API documentation in JSON or YAML format.
|
|
operationId: getOpenApiSpec
|
|
parameters:
|
|
- name: type
|
|
in: path
|
|
description: The extension type of the Open API documentation file. Must be
|
|
either yaml or json.
|
|
required: true
|
|
schema:
|
|
pattern: json|yaml
|
|
type: string
|
|
enum:
|
|
- yaml
|
|
- json
|
|
example: yaml
|
|
responses:
|
|
"200":
|
|
description: The Open API documentation in JSON or YAML format.
|
|
content:
|
|
application/json: {}
|
|
application/yml: {}
|
|
/openapi/{file}:
|
|
get:
|
|
tags:
|
|
- Open API Resource
|
|
description: "Retrieve a file required for the Swagger UI. It is recommended\
|
|
\ to retrieve the index.html file, and allow the index.html file to retrieve\
|
|
\ the assets it needs."
|
|
operationId: getFile
|
|
parameters:
|
|
- name: file
|
|
in: path
|
|
description: The file to retrieve.
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: index.html
|
|
responses:
|
|
"200":
|
|
description: The requested file.
|
|
content:
|
|
image/png: {}
|
|
text/css: {}
|
|
text/html: {}
|
|
text/javascript: {}
|
|
text/plain: {}
|
|
"404":
|
|
description: The requested file was not found.
|
|
content:
|
|
text/plain: {}
|
|
"415":
|
|
description: The requested file format is not a format supported by this
|
|
resource.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/ErrorResponse"
|
|
components:
|
|
schemas:
|
|
ErrorResponse:
|
|
type: object
|
|
properties:
|
|
reference:
|
|
type: string
|
|
description: A unique reference for your error. Provide this to the admins
|
|
to help track down your issue.
|
|
example: kcog4koca5xhiegavarp
|
|
message:
|
|
type: string
|
|
description: A message describing the error that occurred.
|
|
example: An error occurred.
|
|
serviceName:
|
|
type: string
|
|
description: The name of this service. Will always be rcpd-service.
|
|
example: rcpd-service
|
|
description: "Response indicating an error has occurred, with a unique reference\
|
|
\ and a description of the error."
|
|
AccountResponse:
|
|
title: Account Response
|
|
type: object
|
|
properties:
|
|
username:
|
|
type: string
|
|
description: The username of this RCPD account.
|
|
example: Teller55
|
|
icon:
|
|
type: integer
|
|
description: An integer representing the icon (display picture) for the
|
|
account.
|
|
format: int32
|
|
example: 0
|
|
description:
|
|
type: string
|
|
description: A public message for the account that will be displayed on
|
|
the leaderboard and to people viewing the account.
|
|
nullable: true
|
|
example: Swat season 2 lets go!
|
|
squad:
|
|
type: string
|
|
description: The group/clan this account belongs to.
|
|
nullable: true
|
|
example: XLR8
|
|
note:
|
|
type: string
|
|
description: A private note for this account. Only visible to the account
|
|
owner.
|
|
nullable: true
|
|
example: My super secret plan for winning every EXT game.
|
|
rank:
|
|
maximum: 11
|
|
minimum: 1
|
|
type: integer
|
|
description: The account rank as an integer.
|
|
format: int32
|
|
example: 1
|
|
points:
|
|
type: integer
|
|
description: The amount of points this account has earned through titles.
|
|
format: int64
|
|
example: 100
|
|
leaderboardRanking:
|
|
type: integer
|
|
description: "The rank of this account amongst all RCPD accounts, based\
|
|
\ on the number of points this account has earned. Will be null if the\
|
|
\ account is inactive."
|
|
format: int32
|
|
nullable: true
|
|
example: 10
|
|
honorGuard:
|
|
type: boolean
|
|
description: Whether this account has joined the honor guard.
|
|
example: true
|
|
titles:
|
|
$ref: "#/components/schemas/AccountTitlesResponse"
|
|
corrupt:
|
|
type: boolean
|
|
description: "Whether this account has used a code generator to save generated\
|
|
\ rank codes, rather than earning codes solely through playing SWAT: Aftermath."
|
|
example: false
|
|
lastActive:
|
|
type: integer
|
|
description: "The last time this account was active (logged in to, saved\
|
|
\ a build, generated a build, etc.) represented as milliseconds from epoch."
|
|
format: int64
|
|
example: 1695474479000
|
|
active:
|
|
type: boolean
|
|
description: Whether this account has been logged into or done anything
|
|
recently.
|
|
description: A response containing information about an RCPD account.
|
|
AccountTitlesResponse:
|
|
title: Account Titles Response
|
|
type: object
|
|
properties:
|
|
valiantMartyr:
|
|
type: boolean
|
|
description: Whether this account has won a Nightmare game.
|
|
citySavior:
|
|
type: boolean
|
|
description: Whether this account has won an Extinction game.
|
|
livingLegend:
|
|
type: boolean
|
|
description: "Whether this account has unlocked all classes, guns, armors,\
|
|
\ traits, and specializations to rank 12."
|
|
monsterSlayer:
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires killing Megazilla on multiple hero builds.
|
|
format: int32
|
|
vigilantHero:
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires completing a Nightmare or Extinction game without
|
|
dying on multiple hero builds.
|
|
format: int32
|
|
coreElite:
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires earning an Impressive title on multiple hero builds.
|
|
format: int32
|
|
loneRanger:
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning solo Nightmare games with multiple classes.
|
|
format: int32
|
|
hardenedVeteran:
|
|
maximum: 1
|
|
minimum: 0
|
|
type: integer
|
|
description: "Requires winning Nightmare games with different player counts.\
|
|
\ Solo games do not count. You must win with every possible other player\
|
|
\ combination, IE 2 players, 3 players, 4 players, etc."
|
|
format: int32
|
|
renownedVeteran:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: "Requires winning Extinction games with different player counts.\
|
|
\ IE, win with 2 players, win with 3 players, etc. 7/8 combinations are\
|
|
\ required for tier 1, all 8 combinations are required for tier 2."
|
|
format: int32
|
|
highlyDecorated:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: "Requires earning all medals except KEY on one build for multiple\
|
|
\ classes. 10 classes required for tier 1, 12 classes required for tier\
|
|
\ 2."
|
|
format: int32
|
|
keyMaster:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: "Requires earning KEY on multiple classes. 10 classes required\
|
|
\ for tier 1, 12 classes required for tier 2."
|
|
format: int32
|
|
swatCenturion:
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare with different unique builds.
|
|
format: int32
|
|
infiniteLegion:
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Extinction with different unique builds.
|
|
format: int32
|
|
allSniperWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Sniper combination.
|
|
format: int32
|
|
allMedicWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Medic combination.
|
|
format: int32
|
|
allTacticianWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Tactician combination.
|
|
format: int32
|
|
allPsychologistWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Psychologist combination.
|
|
format: int32
|
|
allMaverickWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Maverick combination.
|
|
format: int32
|
|
allHeavyOrdnanceWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Heavy Ordnance combination.
|
|
format: int32
|
|
allDemolitionWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Demolitions combination.
|
|
format: int32
|
|
allCyborgWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Cyborg combination.
|
|
format: int32
|
|
allPyrotechnicianWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Pyrotechnician combination.
|
|
format: int32
|
|
allWatchmanWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Watchman combination.
|
|
format: int32
|
|
allTechOpsWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Tech Ops combination.
|
|
format: int32
|
|
allUmbrellaCloneWins:
|
|
maximum: 2
|
|
minimum: 0
|
|
type: integer
|
|
description: Requires winning Nightmare and/or Extinction with every unique
|
|
Umbrella Clone combination.
|
|
format: int32
|
|
description: "A response including all the titles this account has earned. For\
|
|
\ the integer properties, a value of 0 means the title is unearned; 1 or higher\
|
|
\ means the title is earned, and indicates the level of that title."
|
|
AccountCreationRequest:
|
|
required:
|
|
- username
|
|
type: object
|
|
properties:
|
|
username:
|
|
maxLength: 15
|
|
minLength: 3
|
|
type: string
|
|
description: The username of the new RCPD account. This must be the same
|
|
as the name used in Warcraft III.
|
|
example: Teller55
|
|
description: The username for the new RCPD account.
|
|
ValidationErrorResponse:
|
|
type: object
|
|
properties:
|
|
reference:
|
|
type: string
|
|
description: A unique reference for your error. Provide this to the admins
|
|
to help track down your issue.
|
|
example: kcog4koca5xhiegavarp
|
|
message:
|
|
type: string
|
|
description: A message describing the error that occurred.
|
|
example: An error occurred.
|
|
errors:
|
|
type: object
|
|
additionalProperties:
|
|
type: array
|
|
description: "The properties for the given request that were invalid,\
|
|
\ along with all the reasons why each property was invalid."
|
|
example:
|
|
username:
|
|
- must not be blank
|
|
- size must be between 3 and 15
|
|
items:
|
|
type: string
|
|
description: "The properties for the given request that were invalid,\
|
|
\ along with all the reasons why each property was invalid."
|
|
example: "{\"username\":[\"must not be blank\",\"size must be between\
|
|
\ 3 and 15\"]}"
|
|
description: "The properties for the given request that were invalid, along\
|
|
\ with all the reasons why each property was invalid."
|
|
example:
|
|
username:
|
|
- must not be blank
|
|
- size must be between 3 and 15
|
|
serviceName:
|
|
type: string
|
|
description: The name of this service. Will always be rcpd-service.
|
|
example: rcpd-service
|
|
description: "Response indicating the request was invalid, along with the validation\
|
|
\ errors."
|
|
AccountUpdateRequest:
|
|
title: Account Update Request
|
|
type: object
|
|
properties:
|
|
icon:
|
|
maximum: 11
|
|
minimum: 0
|
|
type: integer
|
|
description: The integer that represents the display icon for the account.
|
|
format: int32
|
|
example: 0
|
|
description:
|
|
maxLength: 255
|
|
minLength: 0
|
|
type: string
|
|
description: The description that will be displayed for this account.
|
|
example: I am the best SWAT player ever!
|
|
squad:
|
|
maxLength: 32
|
|
minLength: 0
|
|
type: string
|
|
description: The squad/clan this account belongs to.
|
|
example: XLR8
|
|
note:
|
|
maxLength: 255
|
|
minLength: 0
|
|
type: string
|
|
description: A private note for this account that only the account owner
|
|
can see.
|
|
example: This is my private note for my eyes only.
|
|
description: "A request to update various things on an account. All parameters\
|
|
\ are optional. To delete a value, provide an empty string. This will delete\
|
|
\ the value in the database."
|
|
AccountSummaryResponse:
|
|
type: object
|
|
properties:
|
|
username:
|
|
type: string
|
|
description: The username of this RCPD account.
|
|
example: Teller55
|
|
icon:
|
|
type: integer
|
|
description: An integer representing the icon (display picture) for the
|
|
account.
|
|
format: int32
|
|
example: 0
|
|
description:
|
|
type: string
|
|
description: A public message for the account that will be displayed on
|
|
the leaderboard and to people viewing the account.
|
|
nullable: true
|
|
example: Swat season 2 lets go!
|
|
squad:
|
|
type: string
|
|
description: The group/clan this account belongs to.
|
|
nullable: true
|
|
example: XLR8
|
|
rank:
|
|
maximum: 11
|
|
minimum: 1
|
|
type: integer
|
|
description: The account rank as an integer.
|
|
format: int32
|
|
example: 1
|
|
corrupt:
|
|
type: boolean
|
|
description: "Whether this account has used a code generator to save generated\
|
|
\ rank codes, rather than earning codes solely through playing SWAT: Aftermath."
|
|
example: false
|
|
active:
|
|
type: boolean
|
|
description: Whether this account has been logged into or done anything
|
|
recently.
|
|
lastActive:
|
|
type: integer
|
|
description: "The last time this account was active (logged in to, saved\
|
|
\ a build, generated a build, etc.) represented as milliseconds from epoch."
|
|
format: int64
|
|
example: 1695474479000
|
|
honorGuard:
|
|
type: boolean
|
|
description: Whether this account has joined the honor guard.
|
|
example: true
|
|
description: An RCPD account summary.
|
|
HeroBuildResponse:
|
|
title: Hero Build Response
|
|
type: object
|
|
properties:
|
|
rankCode:
|
|
type: string
|
|
description: "The SWAT: Aftermath rank code for this build, which can be\
|
|
\ used in a game of SWAT: Aftermath to load this build. Will not be included\
|
|
\ for public view."
|
|
nullable: true
|
|
example: 6595-0027-2041-6700
|
|
swatClass:
|
|
type: string
|
|
description: The class of this build. http://redscull.com/swat/readmeafterclasses.html
|
|
example: Sniper
|
|
enum:
|
|
- Sniper
|
|
- Medic
|
|
- Tactician
|
|
- Psychologist
|
|
- Maverick
|
|
- HeavyOrdnance
|
|
- Demolitions
|
|
- Cyborg
|
|
- Pyrotechnician
|
|
- Watchman
|
|
- TechOps
|
|
- UmbrellaClone
|
|
gun:
|
|
type: string
|
|
description: The gun used by this build. http://redscull.com/swat/readmeafterweapons.html
|
|
example: SniperRifle
|
|
enum:
|
|
- AssaultRifle
|
|
- SniperRifle
|
|
- Chaingun
|
|
- RocketLauncher
|
|
- Flamethrower
|
|
- LaserRifle
|
|
- GatlingLaser
|
|
- Pistols
|
|
armor:
|
|
type: string
|
|
description: The armor used by this build. http://redscull.com/swat/readmeafterarmor.html
|
|
example: Light
|
|
enum:
|
|
- Light
|
|
- Medium
|
|
- Heavy
|
|
- Advanced
|
|
trait:
|
|
type: string
|
|
description: The trait used by this build. http://redscull.com/swat/readmeaftertraits.html
|
|
example: Dragoon
|
|
enum:
|
|
- Skilled
|
|
- Gifted
|
|
- Survivalist
|
|
- Dragoon
|
|
- Acrobat
|
|
- SwiftLearner
|
|
- Healer
|
|
- FlowerChild
|
|
- ChemReliant
|
|
- RadResistant
|
|
- Gadgeteer
|
|
- Prowler
|
|
- Energizer
|
|
- PackRat
|
|
- Engineer
|
|
- Reckless
|
|
specialization:
|
|
type: string
|
|
description: The specialization used by this build. http://redscull.com/swat/readmeafterspecs.html
|
|
example: Weaponry
|
|
enum:
|
|
- Weaponry
|
|
- PowerArmor
|
|
- EnergyCells
|
|
- Cybernetics
|
|
- Triage
|
|
- Chemistry
|
|
- Leadership
|
|
- Robotics
|
|
- Espionage
|
|
talent:
|
|
type: string
|
|
description: The talent used by this build. Only included if the build's
|
|
rank is 9 or higher. http://redscull.com/swat/readmeaftertalents.html
|
|
nullable: true
|
|
example: Tinkering
|
|
enum:
|
|
- Courage
|
|
- Wiring
|
|
- Running
|
|
- Spotting
|
|
- Toughness
|
|
- Tinkering
|
|
- Hacking
|
|
rank:
|
|
maximum: 12
|
|
minimum: 1
|
|
type: integer
|
|
description: The rank of this build. http://redscull.com/swat/readmeafterrank.html
|
|
format: int32
|
|
example: 1
|
|
maxRank:
|
|
maximum: 12
|
|
minimum: 3
|
|
type: integer
|
|
description: "The maximum rank this build can achieve, determined by the\
|
|
\ highest difficulty this build has beaten. http://redscull.com/swat/readmeafterrank.html"
|
|
format: int32
|
|
example: 3
|
|
key:
|
|
type: boolean
|
|
description: Whether this build has earned the Key to the City medal. http://redscull.com/swat/readmeafterrank.html#medals
|
|
moh:
|
|
type: boolean
|
|
description: Whether this build has earned the Medal of Honor medal. http://redscull.com/swat/readmeafterrank.html#medals
|
|
pcc:
|
|
type: boolean
|
|
description: Whether this build has earned the Police Combat Cross medal.
|
|
http://redscull.com/swat/readmeafterrank.html#medals
|
|
cob:
|
|
type: boolean
|
|
description: Whether this build has earned the Commendation Bar medal. http://redscull.com/swat/readmeafterrank.html#medals
|
|
lsa:
|
|
type: boolean
|
|
description: Whether this build has earned the Life Saving Award medal.
|
|
http://redscull.com/swat/readmeafterrank.html#medals
|
|
rem:
|
|
maximum: 3
|
|
minimum: 0
|
|
type: integer
|
|
description: "Whether this build has earned the Recognition for Exceptional\
|
|
\ Merit medal, and what level. http://redscull.com/swat/readmeafterrank.html#medals"
|
|
format: int32
|
|
example: 0
|
|
honorGuard:
|
|
type: boolean
|
|
description: Whether this build is an honor guard build.
|
|
nightmare:
|
|
type: boolean
|
|
description: Whether this build has beaten Nightmare difficulty. http://redscull.com/swat/readmeafterobjectives.html
|
|
Will not be included for public view.
|
|
extinction:
|
|
type: boolean
|
|
description: Whether this build has beaten Extinction difficulty. http://redscull.com/swat/readmeafterobjectives.html
|
|
Will not be included for public view.
|
|
megazilla:
|
|
type: boolean
|
|
description: Whether this build has helped to kill Megazilla. http://redscull.com/swat/readmeafterobjectives.html#megazilla
|
|
Will not be included for public view.
|
|
deathless:
|
|
type: boolean
|
|
description: Whether this build has completed Nightmare or Extinction difficulty
|
|
without dying. Will not be included for public view.
|
|
impressive:
|
|
type: boolean
|
|
description: Whether this build has participated in a game that earned a
|
|
Medal of Honor while already having a Medal of Honor. http://redscull.com/swat/readmeafterrank.html#medals
|
|
Will not be included for public view.
|
|
solo:
|
|
type: boolean
|
|
description: Whether this build has beaten a solo Nightmare game. http://redscull.com/swat/readmeafterobjectives.html
|
|
Will not be included for public view.
|
|
buildName:
|
|
type: string
|
|
description: An optional name used to identify this build.
|
|
nullable: true
|
|
example: hacking psy
|
|
description: "A response object describing a SWAT hero, including rank code\
|
|
\ and build name."
|
|
BuildRequest:
|
|
title: Build Request
|
|
required:
|
|
- armor
|
|
- gun
|
|
- specialization
|
|
- swatClass
|
|
- talent
|
|
- trait
|
|
type: object
|
|
properties:
|
|
swatClass:
|
|
type: string
|
|
description: The class of this SWAT hero.
|
|
writeOnly: true
|
|
example: Psychologist
|
|
enum:
|
|
- Sniper
|
|
- Medic
|
|
- Tactician
|
|
- Psychologist
|
|
- Maverick
|
|
- HeavyOrdnance
|
|
- Demolitions
|
|
- Cyborg
|
|
- Pyrotechnician
|
|
- Watchman
|
|
- TechOps
|
|
- UmbrellaClone
|
|
gun:
|
|
type: string
|
|
description: The gun this SWAT hero uses.
|
|
writeOnly: true
|
|
example: AssaultRifle
|
|
enum:
|
|
- AssaultRifle
|
|
- SniperRifle
|
|
- Chaingun
|
|
- RocketLauncher
|
|
- Flamethrower
|
|
- LaserRifle
|
|
- GatlingLaser
|
|
- Pistols
|
|
armor:
|
|
type: string
|
|
description: The armor this SWAT hero uses.
|
|
writeOnly: true
|
|
example: Medium
|
|
enum:
|
|
- Light
|
|
- Medium
|
|
- Heavy
|
|
- Advanced
|
|
trait:
|
|
type: string
|
|
description: The trait of this SWAT hero.
|
|
writeOnly: true
|
|
example: Healer
|
|
enum:
|
|
- Skilled
|
|
- Gifted
|
|
- Survivalist
|
|
- Dragoon
|
|
- Acrobat
|
|
- SwiftLearner
|
|
- Healer
|
|
- FlowerChild
|
|
- ChemReliant
|
|
- RadResistant
|
|
- Gadgeteer
|
|
- Prowler
|
|
- Energizer
|
|
- PackRat
|
|
- Engineer
|
|
- Reckless
|
|
specialization:
|
|
type: string
|
|
description: The specialization of this SWAT hero.
|
|
writeOnly: true
|
|
example: Triage
|
|
enum:
|
|
- Weaponry
|
|
- PowerArmor
|
|
- EnergyCells
|
|
- Cybernetics
|
|
- Triage
|
|
- Chemistry
|
|
- Leadership
|
|
- Robotics
|
|
- Espionage
|
|
talent:
|
|
type: string
|
|
description: The talent of this SWAT hero.
|
|
writeOnly: true
|
|
example: Hacking
|
|
enum:
|
|
- Courage
|
|
- Wiring
|
|
- Running
|
|
- Spotting
|
|
- Toughness
|
|
- Tinkering
|
|
- Hacking
|
|
rank:
|
|
maximum: 12
|
|
minimum: 1
|
|
type: integer
|
|
description: "The rank of this SWAT hero. Will be capped at the lowest rank\
|
|
\ part of the build. For example, if the requested talent is only available\
|
|
\ at rank 4, the build will be capped to rank 4, even if the requested\
|
|
\ rank is higher. This parameter is optional; if not specified, the build\
|
|
\ will be generated at the highest possible rank."
|
|
format: int32
|
|
example: 10
|
|
spoof:
|
|
maxLength: 15
|
|
minLength: 3
|
|
type: string
|
|
description: "The name to generate this rank code for, different to the\
|
|
\ account's name. If this name is provided, the rank code will be capped\
|
|
\ at rank 11, and not include any medals."
|
|
example: teller55
|
|
description: A request containing all the parts for a SWAT hero.
|
|
RankCodeRequest:
|
|
title: Rank Code Request
|
|
required:
|
|
- rankCode
|
|
type: object
|
|
properties:
|
|
rankCode:
|
|
maxLength: 19
|
|
minLength: 16
|
|
type: string
|
|
description: "The SWAT: Aftermath rank code to save. Must be either 16 or\
|
|
\ 19 characters in length."
|
|
example: 6595-0027-2041-6700
|
|
buildName:
|
|
maxLength: 32
|
|
minLength: 0
|
|
type: string
|
|
description: An optional name for this build.
|
|
example: Solo HO
|
|
description: A rank code and optional build name to save.
|
|
UnlocksResponse:
|
|
title: Unlocks Response
|
|
type: object
|
|
properties:
|
|
swatClasses:
|
|
type: object
|
|
additionalProperties:
|
|
type: integer
|
|
format: int32
|
|
guns:
|
|
type: object
|
|
additionalProperties:
|
|
type: integer
|
|
format: int32
|
|
armor:
|
|
type: object
|
|
additionalProperties:
|
|
type: integer
|
|
format: int32
|
|
traits:
|
|
type: object
|
|
additionalProperties:
|
|
type: integer
|
|
format: int32
|
|
specializations:
|
|
type: object
|
|
additionalProperties:
|
|
type: integer
|
|
format: int32
|
|
talents:
|
|
type: object
|
|
additionalProperties:
|
|
type: integer
|
|
format: int32
|
|
description: "The maximum rank achieved for every part of a SWAT hero; classes,\
|
|
\ guns, armors, traits, specializations, and talents. The keys for each map\
|
|
\ can be found by viewing the request schema for the /account/generate endpoint."
|