Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
907 lines (906 sloc) 21.3 KB
swagger: "2.0"
basePath: /
consumes:
- application/json
definitions:
AuthMethodProvider:
default: Undefined
enum:
- Undefined
- EmailAndPassword
- SSHKey
type: string
InventoryItemItem:
default: Unknown
enum:
- Unknown
type: string
LevelVersionDriver:
default: Unknown
enum:
- Unknown
- Docker
type: string
TournamentVisibility:
default: UnknownVisibility
enum:
- UnknownVisibility
- Private
- Unlisted
- Public
type: string
entityAchievement:
properties:
argument:
type: string
author:
$ref: '#/definitions/entityTournamentMember'
author_id:
type: string
comment:
type: string
is_global:
format: boolean
type: boolean
level_validation:
$ref: '#/definitions/entityLevelValidation'
level_validationt_id:
type: string
metadata:
$ref: '#/definitions/entityMetadata'
type:
$ref: '#/definitions/entityAchievementType'
type: object
entityAchievementType:
default: Undefined
enum:
- Undefined
- Buy1Level
- Buy5Levels
- Buy10Levels
- Buy20Levels
- Buy50Levels
- Validate1Level
- Validate5Levels
- Validate10Levels
- Validate20Levels
- Validate50Levels
- Validate1Coupon
- Validate5Coupons
- Validate10Coupons
- Validate20Coupons
- Validate50Coupons
- Validate100Coupons
- Author1Level
- Author2Levels
- Author5Levels
- Author10Levels
- EarlyAdopterTop100
- EarlyAdopterTop1000
- Old1Year
- Send1PullRequest
- Send2PullRequests
- Send5PullRequests
- Send10Pullrequests
- Staff
- Contributor
- BugHunter
- Moderator
- HackThePlatform
title: fields
type: string
entityAuthMethod:
properties:
email_address:
type: string
identifier:
type: string
is_verified:
format: boolean
type: boolean
metadata:
$ref: '#/definitions/entityMetadata'
password_hash:
type: string
provider:
$ref: '#/definitions/AuthMethodProvider'
salt:
type: string
totp_token:
type: string
url:
type: string
user:
$ref: '#/definitions/entityUser'
user_id:
type: string
type: object
entityCoupon:
properties:
hash:
title: fields
type: string
max_validation_count:
format: int32
type: integer
metadata:
$ref: '#/definitions/entityMetadata'
tournament:
$ref: '#/definitions/entityTournament'
title: associations
tournament_id:
type: string
validations:
items:
$ref: '#/definitions/entityCouponValidation'
type: array
value:
format: int32
type: integer
type: object
entityCouponValidation:
properties:
author:
$ref: '#/definitions/entityTournamentMember'
title: associations
author_id:
type: string
comment:
title: fields
type: string
coupon:
$ref: '#/definitions/entityCoupon'
coupon_id:
type: string
metadata:
$ref: '#/definitions/entityMetadata'
type: object
entityDump:
properties:
achievements:
items:
$ref: '#/definitions/entityAchievement'
type: array
auth_methods:
items:
$ref: '#/definitions/entityAuthMethod'
type: array
coupon_validations:
items:
$ref: '#/definitions/entityCouponValidation'
type: array
coupons:
items:
$ref: '#/definitions/entityCoupon'
type: array
events:
items:
$ref: '#/definitions/entityEvent'
type: array
hypervisors:
items:
$ref: '#/definitions/entityHypervisor'
type: array
inventory_items:
items:
$ref: '#/definitions/entityInventoryItem'
type: array
level_flavors:
items:
$ref: '#/definitions/entityLevelFlavor'
type: array
level_instances:
items:
$ref: '#/definitions/entityLevelInstance'
type: array
level_subscriptions:
items:
$ref: '#/definitions/entityLevelSubscription'
type: array
level_validations:
items:
$ref: '#/definitions/entityLevelValidation'
type: array
level_versions:
items:
$ref: '#/definitions/entityLevelVersion'
type: array
levels:
items:
$ref: '#/definitions/entityLevel'
type: array
notifications:
items:
$ref: '#/definitions/entityNotification'
type: array
team_members:
items:
$ref: '#/definitions/entityTeamMember'
type: array
teams:
items:
$ref: '#/definitions/entityTeam'
type: array
tournament_members:
items:
$ref: '#/definitions/entityTournamentMember'
type: array
tournament_teams:
items:
$ref: '#/definitions/entityTournamentTeam'
type: array
tournaments:
items:
$ref: '#/definitions/entityTournament'
type: array
user_sessions:
items:
$ref: '#/definitions/entityUserSession'
type: array
users:
items:
$ref: '#/definitions/entityUser'
type: array
whoswho_attempts:
items:
$ref: '#/definitions/entityWhoswhoAttempt'
type: array
type: object
entityEvent:
properties:
metadata:
$ref: '#/definitions/entityMetadata'
type: object
entityHypervisor:
properties:
address:
type: string
level_instances:
items:
$ref: '#/definitions/entityLevelInstance'
type: array
metadata:
$ref: '#/definitions/entityMetadata'
name:
type: string
status:
$ref: '#/definitions/entityHypervisorStatus'
type: object
entityHypervisorStatus:
default: Unknown
enum:
- Unknown
- Active
- Inactive
type: string
entityInventoryItem:
properties:
item:
$ref: '#/definitions/InventoryItemItem'
metadata:
$ref: '#/definitions/entityMetadata'
owner:
$ref: '#/definitions/entityTournamentMember'
owner_id:
type: string
type: object
entityLevel:
properties:
author:
type: string
description:
type: string
is_draft:
format: boolean
type: boolean
locale:
type: string
metadata:
$ref: '#/definitions/entityMetadata'
name:
type: string
preview_url:
type: string
versions:
items:
$ref: '#/definitions/entityLevelVersion'
type: array
type: object
entityLevelFlavor:
properties:
instances:
items:
$ref: '#/definitions/entityLevelInstance'
type: array
level_version:
$ref: '#/definitions/entityLevel'
level_version_id:
type: string
metadata:
$ref: '#/definitions/entityMetadata'
subscriptions:
items:
$ref: '#/definitions/entityLevelSubscription'
type: array
type: object
entityLevelInstance:
properties:
flavor:
$ref: '#/definitions/entityLevelFlavor'
flavor_id:
type: string
hypervisor:
$ref: '#/definitions/entityHypervisor'
hypervisor_id:
type: string
metadata:
$ref: '#/definitions/entityMetadata'
status:
$ref: '#/definitions/entityLevelInstanceStatus'
type: object
entityLevelInstanceStatus:
default: Unknown
enum:
- Unknown
- Active
- Inactive
type: string
entityLevelList:
properties:
items:
items:
$ref: '#/definitions/entityLevel'
type: array
type: object
entityLevelSubscription:
properties:
level_flavor:
$ref: '#/definitions/entityLevelFlavor'
level_flavor_id:
type: string
metadata:
$ref: '#/definitions/entityMetadata'
tournament_team:
$ref: '#/definitions/entityTournamentTeam'
tournament_team_id:
type: string
validations:
items:
$ref: '#/definitions/entityLevelValidation'
type: array
type: object
entityLevelValidation:
properties:
author_comment:
type: string
corrector_comment:
type: string
level_subscription:
$ref: '#/definitions/entityLevelSubscription'
level_subscription_id:
type: string
metadata:
$ref: '#/definitions/entityMetadata'
status:
$ref: '#/definitions/entityLevelValidationStatus'
type: object
entityLevelValidationStatus:
default: Unknown
enum:
- Unknown
- Sent
- Accepted
- Refused
- AutoAccepted
type: string
entityLevelVersion:
properties:
changelog:
type: string
driver:
$ref: '#/definitions/LevelVersionDriver'
flavors:
items:
$ref: '#/definitions/entityLevelFlavor'
type: array
is_draft:
format: boolean
type: boolean
is_latest:
format: boolean
type: boolean
level:
$ref: '#/definitions/entityLevel'
level_id:
type: string
metadata:
$ref: '#/definitions/entityMetadata'
source_url:
type: string
version:
type: string
type: object
entityMetadata:
properties:
created_at:
format: date-time
type: string
id:
type: string
updated_at:
format: date-time
type: string
type: object
entityNotification:
properties:
args:
type: string
click_url:
type: string
is_read:
format: boolean
type: boolean
metadata:
$ref: '#/definitions/entityMetadata'
msg:
type: string
user:
$ref: '#/definitions/entityUser'
user_id:
type: string
type: object
entityTeam:
properties:
gravatar_url:
type: string
locale:
type: string
members:
items:
$ref: '#/definitions/entityTeamMember'
type: array
metadata:
$ref: '#/definitions/entityMetadata'
name:
type: string
received_whoswho_attempts:
items:
$ref: '#/definitions/entityWhoswhoAttempt'
type: array
tournament_teams:
items:
$ref: '#/definitions/entityTournamentTeam'
type: array
type: object
entityTeamList:
properties:
items:
items:
$ref: '#/definitions/entityTeam'
type: array
type: object
entityTeamMember:
properties:
metadata:
$ref: '#/definitions/entityMetadata'
role:
$ref: '#/definitions/entityTeamMemberRole'
team:
$ref: '#/definitions/entityTeam'
team_id:
type: string
user:
$ref: '#/definitions/entityUser'
user_id:
type: string
type: object
entityTeamMemberRole:
default: Undefined
enum:
- Undefined
- Owner
- Member
type: string
entityTournament:
properties:
coupons:
items:
$ref: '#/definitions/entityCoupon'
type: array
is_default:
format: boolean
type: boolean
metadata:
$ref: '#/definitions/entityMetadata'
name:
type: string
status:
$ref: '#/definitions/entityTournamentStatus'
teams:
items:
$ref: '#/definitions/entityTournamentTeam'
type: array
visibility:
$ref: '#/definitions/TournamentVisibility'
type: object
entityTournamentList:
properties:
items:
items:
$ref: '#/definitions/entityTournament'
type: array
type: object
entityTournamentMember:
properties:
achievements:
items:
$ref: '#/definitions/entityAchievement'
type: array
coupons:
items:
$ref: '#/definitions/entityCoupon'
type: array
items:
items:
$ref: '#/definitions/entityInventoryItem'
type: array
metadata:
$ref: '#/definitions/entityMetadata'
received_whoswho_attempts:
items:
$ref: '#/definitions/entityWhoswhoAttempt'
type: array
role:
$ref: '#/definitions/entityTournamentMemberRole'
sent_whoswho_attempts:
items:
$ref: '#/definitions/entityWhoswhoAttempt'
type: array
tournament_team:
$ref: '#/definitions/entityTournamentTeam'
tournament_team_id:
type: string
user:
$ref: '#/definitions/entityUser'
user_id:
type: string
type: object
entityTournamentMemberRole:
default: Undefined
enum:
- Undefined
- Owner
- Member
type: string
entityTournamentStatus:
default: UnknownStatus
enum:
- UnknownStatus
- Started
- Stopped
type: string
entityTournamentTeam:
properties:
is_default:
format: boolean
type: boolean
level_subscriptions:
items:
$ref: '#/definitions/entityLevelSubscription'
type: array
members:
items:
$ref: '#/definitions/entityTournamentMember'
type: array
metadata:
$ref: '#/definitions/entityMetadata'
team:
$ref: '#/definitions/entityTeam'
team_id:
type: string
tournament:
$ref: '#/definitions/entityTournament'
tournament_id:
type: string
type: object
entityUser:
properties:
auth_methods:
items:
$ref: '#/definitions/entityAuthMethod'
type: array
gravatar_url:
type: string
is_staff:
format: boolean
type: boolean
locale:
type: string
memberships:
items:
$ref: '#/definitions/entityTeamMember'
type: array
metadata:
$ref: '#/definitions/entityMetadata'
notifications:
items:
$ref: '#/definitions/entityNotification'
type: array
sessions:
items:
$ref: '#/definitions/entityUserSession'
type: array
tournament_memberships:
items:
$ref: '#/definitions/entityTournamentMember'
type: array
username:
type: string
website_url:
type: string
title: User defines a User Account / Profile
type: object
entityUserList:
properties:
items:
items:
$ref: '#/definitions/entityUser'
type: array
type: object
entityUserSession:
properties:
metadata:
$ref: '#/definitions/entityMetadata'
user:
$ref: '#/definitions/entityUser'
user_id:
type: string
username:
type: string
type: object
entityWhoswhoAttempt:
properties:
author:
$ref: '#/definitions/entityTournamentMember'
title: associations
author_id:
type: string
metadata:
$ref: '#/definitions/entityMetadata'
success:
format: boolean
title: fields
type: boolean
target_member:
$ref: '#/definitions/entityTournamentMember'
target_member_id:
type: string
target_team:
$ref: '#/definitions/entityTournamentTeam'
target_team_id:
type: string
type: object
serverAuthenticateInput:
description: AuthenticateInput contains everything (credentials) to authenticate
a user and create a new session.
properties:
password:
type: string
username:
type: string
type: object
serverAuthenticateOutput:
description: AuthenticateOutput contains a session token (JWT).
properties:
token:
type: string
type: object
serverVoid:
example: {}
title: Void is an empty message
type: object
externalDocs:
description: More about Pathwar
url: https://github.com/pathwar/pathwar
host: api.pathwar.net
info:
contact:
email: staff@pathwar.net
name: Pathwar Team
url: https://github.com/pathwar/pathwar
license:
name: Apache-2.0
url: https://github.com/pathwar/pathwar/blob/master/LICENSE
title: Pathwar API
version: "1.0"
paths:
/api/authenticate:
post:
operationId: Authenticate
parameters:
- in: body
name: body
required: true
schema:
$ref: '#/definitions/serverAuthenticateInput'
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/serverAuthenticateOutput'
"403":
description: Returned when the user does not have permission to access the
resource.
schema: {}
"404":
description: Returned when the resource does not exist.
schema:
format: string
summary: Create a session based on credentials
tags:
- Server
/api/dev/generate-fake-data:
post:
operationId: GenerateFakeData
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/serverVoid'
"403":
description: Returned when the user does not have permission to access the
resource.
schema: {}
"404":
description: Returned when the resource does not exist.
schema:
format: string
tags:
- Server
/api/dev/sql-dump:
post:
operationId: Dump
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/entityDump'
"403":
description: Returned when the user does not have permission to access the
resource.
schema: {}
"404":
description: Returned when the resource does not exist.
schema:
format: string
tags:
- Server
/api/levels:
get:
operationId: Levels
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/entityLevelList'
"403":
description: Returned when the user does not have permission to access the
resource.
schema: {}
"404":
description: Returned when the resource does not exist.
schema:
format: string
summary: List levels
tags:
- Server
/api/ping:
get:
operationId: Ping
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/serverVoid'
"403":
description: Returned when the user does not have permission to access the
resource.
schema: {}
"404":
description: Returned when the resource does not exist.
schema:
format: string
summary: Verify the service is up and running
tags:
- Server
/api/teams:
get:
operationId: Teams
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/entityTeamList'
"403":
description: Returned when the user does not have permission to access the
resource.
schema: {}
"404":
description: Returned when the resource does not exist.
schema:
format: string
summary: List teams
tags:
- Server
/api/tournaments:
get:
operationId: Tournaments
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/entityTournamentList'
"403":
description: Returned when the user does not have permission to access the
resource.
schema: {}
"404":
description: Returned when the resource does not exist.
schema:
format: string
summary: List tournaments
tags:
- Server
/api/user-session:
get:
operationId: UserSession
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/entityUserSession'
"403":
description: Returned when the user does not have permission to access the
resource.
schema: {}
"404":
description: Returned when the resource does not exist.
schema:
format: string
summary: Get current user's session
tags:
- Server
/api/users:
get:
operationId: Users
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/entityUserList'
"403":
description: Returned when the user does not have permission to access the
resource.
schema: {}
"404":
description: Returned when the resource does not exist.
schema:
format: string
summary: List users
tags:
- Server
produces:
- application/json
schemes:
- https
- wss
security:
- ApiKeyAuth: []
BasicAuth: []
securityDefinitions:
ApiKeyAuth:
in: header
name: X-API-Key
type: apiKey
BasicAuth:
type: basic
You can’t perform that action at this time.