openapi: 3.1.0 info: title: StrafesNET Submissions - OpenAPI 3.1 description: Browse and manage map submissions. version: 0.1.0 servers: - url: https://submissions.strafes.net/v1 tags: - name: Mapfixes description: Mapfix operations - name: Maps description: Map queries - name: Operations description: Long-running operations - name: Session description: Session queries - name: Stats description: Statistics queries - name: Submissions description: Submission operations - name: Scripts description: Script operations - name: ScriptPolicy description: Script policy operations - name: Thumbnails description: Thumbnail operations - name: Users description: User operations security: - cookieAuth: [] paths: /stats: get: summary: Get aggregate statistics operationId: getStats tags: - Stats security: [] responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Stats" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /session/user: get: summary: Get information about the currently logged in user operationId: sessionUser tags: - Session responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/User" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /session/roles: get: summary: Get list of roles for the current session operationId: sessionRoles tags: - Session responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Roles" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /session/validate: get: summary: Ask if the current session is valid operationId: sessionValidate tags: - Session responses: "200": description: Successful response content: application/json: schema: type: boolean default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /maps: get: summary: Get list of maps operationId: listMaps tags: - Maps security: [] parameters: - $ref: "#/components/parameters/Page" - $ref: "#/components/parameters/Limit" - name: DisplayName in: query schema: type: string maxLength: 128 - name: Creator in: query schema: type: string maxLength: 128 - name: GameID in: query schema: type: integer format: int32 minimum: 1 maximum: 5 - name: Sort in: query schema: type: integer format: int32 minimum: 0 maximum: 4 description: > Sort order: * `0` - Disabled * `1` - DisplayNameAscending * `2` - DisplayNameDescending * `3` - DateAscending * `4` - DateDescending responses: "200": description: Successful response content: application/json: schema: type: array items: $ref: "#/components/schemas/Map" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /maps/{MapID}: get: summary: Retrieve map with ID operationId: getMap tags: - Maps security: [] parameters: - $ref: '#/components/parameters/MapID' responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Map" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /maps/{MapID}/combobulate: post: summary: Queue a map for combobulator processing operationId: combobulateMap tags: - Maps parameters: - name: MapID in: path required: true schema: type: integer format: int64 minimum: 0 responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /maps/{MapID}/download: get: summary: Download the map asset operationId: downloadMapAsset tags: - Maps parameters: - name: MapID in: path required: true schema: type: integer format: int64 minimum: 0 responses: "200": description: Successful response content: application/octet-stream: schema: type: string format: binary default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /maps-admin/seed-combobulator: post: summary: Queue all maps for combobulator processing operationId: seedCombobulator tags: - Maps responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes: get: summary: Get list of mapfixes operationId: listMapfixes tags: - Mapfixes security: [] parameters: - $ref: "#/components/parameters/Page" - $ref: "#/components/parameters/Limit" - name: DisplayName in: query schema: type: string maxLength: 128 - name: Creator in: query schema: type: string maxLength: 128 - name: GameID in: query schema: type: integer format: int32 minimum: 1 maximum: 5 description: > Game ID: * `1` - Bhop * `2` - Surf * `5` - FlyTrials - name: Sort in: query schema: type: integer format: int32 minimum: 0 maximum: 4 description: > Sort order: * `0` - Disabled * `1` - DisplayNameAscending * `2` - DisplayNameDescending * `3` - DateAscending * `4` - DateDescending - name: Submitter in: query schema: type: integer format: int64 minimum: 0 - name: AssetID in: query schema: type: integer format: int64 minimum: 0 - name: AssetVersion in: query schema: type: integer format: int64 minimum: 0 - name: TargetAssetID in: query schema: type: integer format: int64 minimum: 0 - name: StatusID in: query schema: type: integer format: int32 minimum: 0 maximum: 9 description: > // Phase: Creation * `0` - UnderConstruction * `1` - ChangesRequested // Phase: Review * `2` - Submitting * `3` - Submitted // Phase: Testing * `4` - AcceptedUnvalidated // pending script review, can re-trigger validation * `5` - Validating * `6` - Validated * `7` - Uploading // Phase: Final MapfixStatus * `8` - Uploaded // uploaded to the group, but pending release * `9` - Rejected responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Mapfixes" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" post: summary: Trigger the validator to create a mapfix operationId: createMapfix tags: - Mapfixes requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MapfixTriggerCreate' responses: "201": description: Successful response content: application/json: schema: $ref: "#/components/schemas/OperationID" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}: get: summary: Retrieve map with ID operationId: getMapfix tags: - Mapfixes security: [] parameters: - $ref: '#/components/parameters/MapfixID' responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Mapfix" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/audit-events: get: summary: Retrieve a list of audit events operationId: listMapfixAuditEvents tags: - Mapfixes security: [] parameters: - $ref: '#/components/parameters/MapfixID' - $ref: "#/components/parameters/Page" - $ref: "#/components/parameters/Limit" responses: "200": description: Successful response content: application/json: schema: type: array items: $ref: "#/components/schemas/AuditEvent" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/comment: post: summary: Post a comment to the audit log operationId: createMapfixAuditComment tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' requestBody: required: true content: text/plain: schema: type: string maxLength: 1024 responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/model: post: summary: Update model following role restrictions operationId: updateMapfixModel tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' - name: ModelID in: query required: true schema: type: integer format: int64 minimum: 0 - name: ModelVersion in: query required: true schema: type: integer format: int64 minimum: 0 responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/description: patch: summary: Update description (submitter only) operationId: updateMapfixDescription tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' requestBody: required: true content: text/plain: schema: type: string maxLength: 256 responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/completed: post: summary: Called by maptest when a player completes the map operationId: setMapfixCompleted tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/trigger-submit: post: summary: Role Submitter changes status from UnderConstruction|ChangesRequested -> Submitting operationId: actionMapfixTriggerSubmit tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/trigger-submit-unchecked: post: summary: Role Reviewer changes status from ChangesRequested -> Submitting operationId: actionMapfixTriggerSubmitUnchecked tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/reset-submitting: post: summary: Role Submitter manually resets submitting softlock and changes status from Submitting -> UnderConstruction operationId: actionMapfixResetSubmitting tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/revoke: post: summary: Role Submitter changes status from Submitted|ChangesRequested -> UnderConstruction operationId: actionMapfixRevoke tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/trigger-validate: post: summary: Role Reviewer triggers validation and changes status from Submitted -> Validating operationId: actionMapfixTriggerValidate tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/retry-validate: post: summary: Role Reviewer re-runs validation and changes status from Accepted -> Validating operationId: actionMapfixRetryValidate tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/reset-validating: post: summary: Role Reviewer manually resets validating softlock and changes status from Validating -> Accepted operationId: actionMapfixAccepted tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/reject: post: summary: Role Reviewer changes status from Submitted -> Rejected operationId: actionMapfixReject tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/request-changes: post: summary: Role Reviewer changes status from Validated|Accepted|Submitted -> ChangesRequested operationId: actionMapfixRequestChanges tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/trigger-upload: post: summary: Role MapfixUpload changes status from Validated -> Uploading operationId: actionMapfixTriggerUpload tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/reset-uploading: post: summary: Role MapfixUpload manually resets uploading softlock and changes status from Uploading -> Validated operationId: actionMapfixValidated tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/trigger-release: post: summary: Role MapfixUpload changes status from Uploaded -> Releasing operationId: actionMapfixTriggerRelease tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /mapfixes/{MapfixID}/status/reset-releasing: post: summary: Role MapfixUpload manually resets releasing softlock and changes status from Releasing -> Uploaded operationId: actionMapfixUploaded tags: - Mapfixes parameters: - $ref: '#/components/parameters/MapfixID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /operations/{OperationID}: get: summary: Retrieve operation with ID operationId: getOperation tags: - Operations parameters: - $ref: '#/components/parameters/OperationID' responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Operation" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions: get: summary: Get list of submissions operationId: listSubmissions tags: - Submissions security: [] parameters: - $ref: "#/components/parameters/Page" - $ref: "#/components/parameters/Limit" - name: DisplayName in: query schema: type: string maxLength: 128 - name: Creator in: query schema: type: string maxLength: 128 - name: GameID in: query schema: type: integer format: int32 minimum: 1 maximum: 5 description: > Game ID: * `1` - Bhop * `2` - Surf * `5` - FlyTrials - name: Sort in: query schema: type: integer format: int32 minimum: 0 maximum: 4 description: > Sort order: * `0` - Disabled * `1` - DisplayNameAscending * `2` - DisplayNameDescending * `3` - DateAscending * `4` - DateDescending - name: Submitter in: query schema: type: integer format: int64 minimum: 0 - name: AssetID in: query schema: type: integer format: int64 minimum: 0 - name: AssetVersion in: query schema: type: integer format: int64 minimum: 0 - name: UploadedAssetID in: query schema: type: integer format: int64 minimum: 0 - name: StatusID in: query schema: type: integer format: int32 minimum: 0 maximum: 10 description: > // Phase: Creation * `0` - UnderConstruction * `1` - ChangesRequested // Phase: Review * `2` - Submitting * `3` - Submitted // Phase: Testing * `4` - AcceptedUnvalidated // pending script review, can re-trigger validation * `5` - Validating * `6` - Validated * `7` - Uploading * `8` - Uploaded // uploaded to the group, but pending release // Phase: Final SubmissionStatus * `9` - Rejected * `10` - Released responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Submissions" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" post: summary: Trigger the validator to create a new submission operationId: createSubmission tags: - Submissions requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubmissionTriggerCreate' responses: "201": description: Successful response content: application/json: schema: $ref: "#/components/schemas/OperationID" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions-admin: post: summary: Trigger the validator to create a new submission operationId: createSubmissionAdmin tags: - Submissions requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubmissionTriggerCreate' responses: "201": description: Successful response content: application/json: schema: $ref: "#/components/schemas/OperationID" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}: get: summary: Retrieve map with ID operationId: getSubmission tags: - Submissions security: [] parameters: - $ref: '#/components/parameters/SubmissionID' responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Submission" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/audit-events: get: summary: Retrieve a list of audit events operationId: listSubmissionAuditEvents tags: - Submissions security: [] parameters: - $ref: '#/components/parameters/SubmissionID' - $ref: "#/components/parameters/Page" - $ref: "#/components/parameters/Limit" responses: "200": description: Successful response content: application/json: schema: type: array items: $ref: "#/components/schemas/AuditEvent" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/comment: post: summary: Post a comment to the audit log operationId: createSubmissionAuditComment tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' requestBody: required: true content: text/plain: schema: type: string maxLength: 1024 responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/model: post: summary: Update model following role restrictions operationId: updateSubmissionModel tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' - name: ModelID in: query required: true schema: type: integer format: int64 minimum: 0 - name: ModelVersion in: query required: true schema: type: integer format: int64 minimum: 0 responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/completed: post: summary: Called by maptest when a player completes the map operationId: setSubmissionCompleted tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/trigger-submit: post: summary: Role Submitter changes status from UnderConstruction|ChangesRequested -> Submitting operationId: actionSubmissionTriggerSubmit tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/trigger-submit-unchecked: post: summary: Role Reviewer changes status from ChangesRequested -> Submitting operationId: actionSubmissionTriggerSubmitUnchecked tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/reset-submitting: post: summary: Role Submitter manually resets submitting softlock and changes status from Submitting -> UnderConstruction operationId: actionSubmissionResetSubmitting tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/revoke: post: summary: Role Submitter changes status from Submitted|ChangesRequested -> UnderConstruction operationId: actionSubmissionRevoke tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/trigger-validate: post: summary: Role Reviewer triggers validation and changes status from Submitted -> Validating operationId: actionSubmissionTriggerValidate tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/retry-validate: post: summary: Role Reviewer re-runs validation and changes status from Accepted -> Validating operationId: actionSubmissionRetryValidate tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/reset-validating: post: summary: Role Reviewer manually resets validating softlock and changes status from Validating -> Accepted operationId: actionSubmissionAccepted tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/reject: post: summary: Role Reviewer changes status from Submitted -> Rejected operationId: actionSubmissionReject tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/request-changes: post: summary: Role Reviewer changes status from Validated|Accepted|Submitted -> ChangesRequested operationId: actionSubmissionRequestChanges tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/trigger-upload: post: summary: Role SubmissionUpload changes status from Validated -> Uploading operationId: actionSubmissionTriggerUpload tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/reset-uploading: post: summary: Role SubmissionUpload manually resets uploading softlock and changes status from Uploading -> Validated operationId: actionSubmissionValidated tags: - Submissions parameters: - $ref: '#/components/parameters/SubmissionID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /release-submissions: post: summary: Release a set of uploaded maps. Role SubmissionRelease operationId: releaseSubmissions tags: - Submissions requestBody: required: true content: application/json: schema: type: array minItems: 1 maxItems: 255 items: $ref: '#/components/schemas/ReleaseInfo' responses: "201": description: Successful response content: application/json: schema: $ref: "#/components/schemas/OperationID" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /script-policy: get: summary: Get list of script policies operationId: listScriptPolicy tags: - ScriptPolicy security: [] parameters: - $ref: "#/components/parameters/Page" - $ref: "#/components/parameters/Limit" - name: FromScriptHash in: query schema: type: string minLength: 16 maxLength: 16 - name: ToScriptID in: query schema: type: integer format: int64 minimum: 0 - name: Policy in: query schema: type: integer format: int32 minimum: 0 responses: "200": description: Successful response content: application/json: schema: type: array items: $ref: "#/components/schemas/ScriptPolicy" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" post: summary: Create a new script policy operationId: createScriptPolicy tags: - ScriptPolicy requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScriptPolicyCreate' responses: "201": description: Successful response content: application/json: schema: $ref: "#/components/schemas/ScriptPolicyID" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /script-policy/{ScriptPolicyID}: get: summary: Get the specified script policy by ID operationId: getScriptPolicy tags: - ScriptPolicy security: [] parameters: - $ref: '#/components/parameters/ScriptPolicyID' responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/ScriptPolicy" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" post: summary: Update the specified script policy by ID operationId: updateScriptPolicy tags: - ScriptPolicy parameters: - $ref: '#/components/parameters/ScriptPolicyID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScriptPolicyUpdate' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" delete: summary: Delete the specified script policy by ID operationId: deleteScriptPolicy tags: - ScriptPolicy parameters: - $ref: '#/components/parameters/ScriptPolicyID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /scripts: get: summary: Get list of scripts operationId: listScripts tags: - Script security: [] parameters: - $ref: "#/components/parameters/Page" - $ref: "#/components/parameters/Limit" - name: Hash in: query schema: type: string minLength: 16 maxLength: 16 - name: Name in: query schema: type: string maxLength: 128 - name: Source in: query schema: type: string maxLength: 1048576 - name: ResourceType in: query schema: type: integer format: int32 minimum: 0 - name: ResourceID in: query schema: type: integer format: int64 minimum: 0 responses: "200": description: Successful response content: application/json: schema: type: array items: $ref: "#/components/schemas/Script" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" post: summary: Create a new script operationId: createScript tags: - Scripts requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScriptCreate' responses: "201": description: Successful response content: application/json: schema: $ref: "#/components/schemas/ScriptID" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /scripts/{ScriptID}: get: summary: Get the specified script by ID operationId: getScript tags: - Scripts security: [] parameters: - $ref: '#/components/parameters/ScriptID' responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Script" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" post: summary: Update the specified script by ID operationId: updateScript tags: - Scripts parameters: - $ref: '#/components/parameters/ScriptID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScriptUpdate' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" delete: summary: Delete the specified script by ID operationId: deleteScript tags: - Scripts parameters: - $ref: '#/components/parameters/ScriptID' responses: "204": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /thumbnails/assets: post: summary: Batch fetch asset thumbnails operationId: batchAssetThumbnails tags: - Thumbnails security: [] requestBody: required: true content: application/json: schema: type: object required: - assetIds properties: assetIds: type: array items: type: integer format: uint64 maxItems: 100 description: Array of asset IDs (max 100) size: type: string enum: - "150x150" - "420x420" - "768x432" default: "420x420" description: Thumbnail size responses: "200": description: Successful response content: application/json: schema: type: object properties: thumbnails: type: object additionalProperties: type: string description: Map of asset ID to thumbnail URL default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /thumbnails/asset/{AssetID}: get: summary: Get single asset thumbnail operationId: getAssetThumbnail tags: - Thumbnails security: [] parameters: - name: AssetID in: path required: true schema: type: integer format: uint64 - name: size in: query schema: type: string enum: - "150x150" - "420x420" - "768x432" default: "420x420" responses: "302": description: Redirect to thumbnail URL headers: Location: description: URL to redirect to schema: type: string default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /thumbnails/users: post: summary: Batch fetch user avatar thumbnails operationId: batchUserThumbnails tags: - Thumbnails security: [] requestBody: required: true content: application/json: schema: type: object required: - userIds properties: userIds: type: array items: type: integer format: uint64 maxItems: 100 description: Array of user IDs (max 100) size: type: string enum: - "150x150" - "420x420" - "768x432" default: "150x150" description: Thumbnail size responses: "200": description: Successful response content: application/json: schema: type: object properties: thumbnails: type: object additionalProperties: type: string description: Map of user ID to thumbnail URL default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /thumbnails/user/{UserID}: get: summary: Get single user avatar thumbnail operationId: getUserThumbnail tags: - Thumbnails security: [] parameters: - name: UserID in: path required: true schema: type: integer format: uint64 - name: size in: query schema: type: string enum: - "150x150" - "420x420" - "768x432" default: "150x150" responses: "302": description: Redirect to thumbnail URL headers: Location: description: URL to redirect to schema: type: string default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /usernames: post: summary: Batch fetch usernames operationId: batchUsernames tags: - Users security: [] requestBody: required: true content: application/json: schema: type: object required: - userIds properties: userIds: type: array items: type: integer format: uint64 maxItems: 100 description: Array of user IDs (max 100) responses: "200": description: Successful response content: application/json: schema: type: object properties: usernames: type: object additionalProperties: type: string description: Map of user ID to username default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" components: securitySchemes: cookieAuth: type: apiKey in: cookie name: session_id parameters: MapID: name: MapID in: path required: true description: The unique identifier for a map. schema: type: integer format: int64 minimum: 0 MapfixID: name: MapfixID in: path required: true description: The unique identifier for a mapfix. schema: type: integer format: int64 minimum: 0 OperationID: name: OperationID in: path required: true description: The unique identifier for a long-running operation. schema: type: integer format: int32 minimum: 0 SubmissionID: name: SubmissionID in: path required: true description: The unique identifier for a submission. schema: type: integer format: int64 minimum: 0 ScriptID: name: ScriptID in: path required: true description: The unique identifier for a script. schema: type: integer format: int64 minimum: 0 ScriptPolicyID: name: ScriptPolicyID in: path required: true description: The unique identifier for a script policy. schema: type: integer format: int64 minimum: 0 Page: name: Page in: query required: true schema: type: integer format: int32 minimum: 1 Limit: name: Limit in: query required: true schema: type: integer format: int32 minimum: 0 maximum: 100 schemas: AuditEvent: type: object required: - ID - Date - User - Username - ResourceType - ResourceID - EventType - EventData properties: ID: type: integer format: int64 Date: type: integer format: int64 User: type: integer format: int64 Username: type: string maxLength: 64 ResourceType: type: integer format: int32 description: Is this a submission or is it a mapfix ResourceID: type: integer format: int64 EventType: type: integer format: int32 EventData: type: object description: Arbitrary event data additionalProperties: true OperationID: required: - OperationID type: object properties: OperationID: type: integer format: int32 minimum: 0 ScriptID: required: - ScriptID type: object properties: ScriptID: type: integer format: int64 minimum: 0 ScriptPolicyID: required: - ScriptPolicyID type: object properties: ScriptPolicyID: type: integer format: int64 minimum: 0 Roles: required: - Roles type: object properties: Roles: type: integer format: int32 minimum: 0 User: required: - UserID - Username - AvatarURL type: object properties: UserID: type: integer format: int64 minimum: 0 Username: type: string maxLength: 128 AvatarURL: type: string maxLength: 256 Map: required: - ID - DisplayName - Creator - GameID - Date - CreatedAt - UpdatedAt - Submitter - Thumbnail - AssetVersion - LoadCount - Modes type: object properties: ID: type: integer format: int64 minimum: 0 DisplayName: type: string maxLength: 128 Creator: type: string maxLength: 128 GameID: type: integer format: int32 minimum: 0 Date: type: integer format: int64 minimum: 0 CreatedAt: type: integer format: int64 UpdatedAt: type: integer format: int64 Submitter: type: integer format: uint64 Thumbnail: type: integer format: uint64 AssetVersion: type: integer format: uint64 LoadCount: type: integer format: uint32 Modes: type: integer format: uint32 Mapfix: required: - ID - DisplayName - Creator - GameID - CreatedAt - UpdatedAt - Submitter - AssetID - AssetVersion # - ValidatedAssetID # - ValidatedAssetVersion - Completed - TargetAssetID - StatusID - Description type: object properties: ID: type: integer format: int64 minimum: 0 DisplayName: type: string maxLength: 128 Creator: type: string maxLength: 128 GameID: type: integer format: int32 minimum: 0 CreatedAt: type: integer format: int64 minimum: 0 UpdatedAt: type: integer format: int64 minimum: 0 Submitter: type: integer format: int64 minimum: 0 AssetID: type: integer format: int64 minimum: 0 AssetVersion: type: integer format: int64 minimum: 0 ValidatedAssetID: type: integer format: int64 minimum: 0 ValidatedAssetVersion: type: integer format: int64 minimum: 0 Completed: type: boolean TargetAssetID: type: integer format: int64 minimum: 0 StatusID: type: integer format: int32 minimum: 0 Description: type: string maxLength: 256 Mapfixes: type: object required: - Total - Mapfixes properties: Total: type: integer format: int64 minimum: 0 Mapfixes: type: array items: $ref: "#/components/schemas/Mapfix" MapfixTriggerCreate: required: - AssetID - TargetAssetID - Description type: object properties: AssetID: type: integer format: int64 minimum: 0 TargetAssetID: type: integer format: int64 minimum: 0 Description: type: string maxLength: 256 Operation: required: - OperationID - Date - Owner - Status - StatusMessage - Path type: object properties: OperationID: type: integer format: int32 minimum: 0 Date: type: integer format: int64 minimum: 0 Owner: type: integer format: int64 minimum: 0 Status: type: integer format: int32 minimum: 0 StatusMessage: type: string maxLength: 256 Path: type: string maxLength: 128 Submission: required: - ID - DisplayName - Creator - GameID - CreatedAt - UpdatedAt - Submitter - AssetID - AssetVersion # - ValidatedAssetID # - ValidatedAssetVersion - Completed # - UploadedAssetID - StatusID type: object properties: ID: type: integer format: int64 minimum: 0 DisplayName: type: string maxLength: 128 Creator: type: string maxLength: 128 GameID: type: integer format: int32 minimum: 0 CreatedAt: type: integer format: int64 minimum: 0 UpdatedAt: type: integer format: int64 minimum: 0 Submitter: type: integer format: int64 minimum: 0 AssetID: type: integer format: int64 minimum: 0 AssetVersion: type: integer format: int64 minimum: 0 ValidatedAssetID: type: integer format: int64 minimum: 0 ValidatedAssetVersion: type: integer format: int64 minimum: 0 Completed: type: boolean UploadedAssetID: type: integer format: int64 minimum: 0 StatusID: type: integer format: int32 minimum: 0 Submissions: required: - Total - Submissions type: object properties: Total: type: integer format: int64 minimum: 0 Submissions: type: array items: $ref: "#/components/schemas/Submission" SubmissionTriggerCreate: required: - AssetID - DisplayName - Creator - GameID type: object properties: AssetID: type: integer format: int64 minimum: 0 DisplayName: type: string maxLength: 128 Creator: type: string maxLength: 128 GameID: type: integer format: int32 minimum: 0 ReleaseInfo: required: - SubmissionID - Date type: object properties: SubmissionID: type: integer format: int64 minimum: 0 Date: type: string format: date-time Script: required: - ID - Name - Hash - Source - ResourceType - ResourceID type: object properties: ID: type: integer format: int64 minimum: 0 Name: type: string maxLength: 128 Hash: type: string minLength: 16 maxLength: 16 Source: type: string maxLength: 1048576 ResourceType: type: integer format: int32 minimum: 0 ResourceID: type: integer format: int64 minimum: 0 ScriptCreate: required: - Name - Source - ResourceType # - ResourceID type: object properties: Name: type: string maxLength: 256 Source: type: string maxLength: 1048576 ResourceType: type: integer format: int32 minimum: 0 ResourceID: type: integer format: int64 minimum: 0 ScriptUpdate: required: - ID type: object properties: ID: type: integer format: int64 minimum: 0 Name: type: string maxLength: 128 Source: type: string maxLength: 1048576 ResourceType: type: integer format: int32 minimum: 0 ResourceID: type: integer format: int64 minimum: 0 ScriptPolicy: required: - ID - FromScriptHash - ToScriptID - Policy type: object properties: ID: type: integer format: int64 minimum: 0 FromScriptHash: type: string minLength: 16 maxLength: 16 ToScriptID: type: integer format: int64 minimum: 0 Policy: type: integer format: int32 minimum: 0 ScriptPolicyCreate: required: - FromScriptID - ToScriptID - Policy type: object properties: FromScriptID: type: integer format: int64 minimum: 0 ToScriptID: type: integer format: int64 minimum: 0 Policy: type: integer format: int32 minimum: 0 ScriptPolicyUpdate: required: - ID type: object properties: ID: type: integer format: int64 minimum: 0 FromScriptID: type: integer format: int64 minimum: 0 ToScriptID: type: integer format: int64 minimum: 0 Policy: type: integer format: int32 minimum: 0 Stats: description: Aggregate statistics for submissions and mapfixes type: object properties: TotalSubmissions: type: integer format: int64 minimum: 0 description: Total number of submissions TotalMapfixes: type: integer format: int64 minimum: 0 description: Total number of mapfixes ReleasedSubmissions: type: integer format: int64 minimum: 0 description: Number of released submissions ReleasedMapfixes: type: integer format: int64 minimum: 0 description: Number of released mapfixes SubmittedSubmissions: type: integer format: int64 minimum: 0 description: Number of submissions under review SubmittedMapfixes: type: integer format: int64 minimum: 0 description: Number of mapfixes under review required: - TotalSubmissions - TotalMapfixes - ReleasedSubmissions - ReleasedMapfixes - SubmittedSubmissions - SubmittedMapfixes Error: description: Represents error object type: object properties: code: type: integer format: int64 minimum: 0 message: type: string required: - code - message