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: Submissions description: Submission operations - name: Scripts description: Script operations - name: ScriptPolicy description: Script policy operations security: - cookieAuth: [] paths: /submissions: get: summary: Get list of submissions operationId: listSubmissions tags: - Submissions parameters: - name: page in: query required: true schema: $ref: "#/components/schemas/Pagination" - name: filter in: query required: false schema: $ref: "#/components/schemas/SubmissionFilter" responses: "200": description: Successful response content: application/json: schema: type: array items: $ref: "#/components/schemas/Submission" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" post: summary: Create new submission operationId: createSubmission tags: - Submissions requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubmissionCreate' responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Id" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}: get: summary: Retrieve map with ID operationId: getSubmission tags: - Submissions parameters: - name: SubmissionID in: path required: true schema: type: integer format: int64 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}/model: patch: summary: Update model following role restrictions operationId: patchSubmissionModel tags: - Submissions parameters: - name: SubmissionID in: path required: true schema: type: integer format: int64 - name: ModelID in: query required: true schema: type: integer format: int64 - name: VersionID in: query required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/completed: patch: summary: Retrieve map with ID operationId: patchSubmissionCompleted tags: - Submissions parameters: - name: SubmissionID in: path required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/submit: patch: summary: Role Submitter changes status from UnderConstruction|ChangesRequested -> Submitted operationId: actionSubmissionSubmit tags: - Submissions parameters: - name: SubmissionID in: path required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/revoke: patch: summary: Role Submitter changes status from Submitted|ChangesRequested -> UnderConstruction operationId: actionSubmissionRevoke tags: - Submissions parameters: - name: SubmissionID in: path required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/trigger-validate: patch: summary: Role Reviewer triggers validation and changes status from Submitted|Accepted -> Validating operationId: actionSubmissionTriggerValidate tags: - Submissions parameters: - name: SubmissionID in: path required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/reject: patch: summary: Role Reviewer changes status from Submitted -> Rejected operationId: actionSubmissionReject tags: - Submissions parameters: - name: SubmissionID in: path required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/request-changes: patch: summary: Role Reviewer changes status from Validated|Accepted|Submitted -> ChangesRequested operationId: actionSubmissionRequestChanges tags: - Submissions parameters: - name: SubmissionID in: path required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/validate: patch: summary: Role Validator changes status from Validating -> Validated operationId: actionSubmissionValidate tags: - Submissions parameters: - name: SubmissionID in: path required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/publish: patch: summary: Role Validator changes status from Publishing -> Published operationId: actionSubmissionPublish tags: - Submissions parameters: - name: SubmissionID in: path required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /submissions/{SubmissionID}/status/trigger-publish: patch: summary: Role Admin changes status from Validated -> Publishing operationId: actionSubmissionTriggerPublish tags: - Submissions parameters: - name: SubmissionID in: path required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /script-policy: post: summary: Create a new script policy operationId: createScriptPolicy tags: - ScriptPolicy requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScriptPolicyCreate' responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Id" default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /script-policy/hash/{FromScriptHash}: get: summary: Get the policy for the given hash of script source code operationId: getScriptPolicyFromHash tags: - ScriptPolicy parameters: - name: FromScriptHash in: path required: true schema: type: string 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" /script-policy/id/{ScriptPolicyID}: get: summary: Get the specified script policy by ID operationId: getScriptPolicy tags: - ScriptPolicy parameters: - name: ScriptPolicyID in: path required: true schema: type: integer format: int64 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" patch: summary: Update the specified script policy by ID operationId: updateScriptPolicy tags: - ScriptPolicy parameters: - name: ScriptPolicyID in: path required: true schema: type: integer format: int64 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScriptPolicyUpdate' responses: "200": 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: - name: ScriptPolicyID in: path required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" /scripts: post: summary: Create a new script operationId: createScript tags: - Scripts requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScriptCreate' responses: "200": description: Successful response content: application/json: schema: $ref: "#/components/schemas/Id" 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 parameters: - name: ScriptID in: path required: true schema: type: integer format: int64 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" patch: summary: Update the specified script by ID operationId: updateScript tags: - Scripts parameters: - name: ScriptID in: path required: true schema: type: integer format: int64 requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScriptUpdate' responses: "200": 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: - name: ScriptID in: path required: true schema: type: integer format: int64 responses: "200": description: Successful response default: description: General Error content: application/json: schema: $ref: "#/components/schemas/Error" components: securitySchemes: cookieAuth: type: apiKey in: cookie name: session_id schemas: Id: required: - ID type: object properties: ID: type: integer format: int64 Submission: required: - ID - DisplayName - Creator - GameID - Date - Submitter - AssetID - AssetVersion - Completed - SubmissionType # - TargetAssetID - StatusID type: object properties: ID: type: integer format: int64 DisplayName: type: string Creator: type: string GameID: type: integer format: int32 Date: type: integer format: int64 Submitter: type: integer format: int64 AssetID: type: integer format: int64 AssetVersion: type: integer format: int64 Completed: type: boolean SubmissionType: type: integer format: int32 TargetAssetID: type: integer format: int64 StatusID: type: integer format: int32 SubmissionFilter: required: - ID type: object properties: ID: type: integer format: int64 DisplayName: type: string Creator: type: string GameID: type: integer format: int32 Date: type: integer format: int64 SubmissionCreate: required: - DisplayName - Creator - GameID - AssetID - AssetVersion # - TargetAssetID type: object properties: DisplayName: type: string Creator: type: string GameID: type: integer format: int32 AssetID: type: integer format: int64 AssetVersion: type: integer format: int64 TargetAssetID: type: integer format: int64 Script: required: - ID - Hash - Source - SubmissionID type: object properties: ID: type: integer format: int64 Hash: type: string Source: type: string SubmissionID: type: integer format: int64 ScriptCreate: required: - Source # - SubmissionID type: object properties: Source: type: string SubmissionID: type: integer format: int64 ScriptUpdate: required: - ID type: object properties: ID: type: integer format: int64 Source: type: string SubmissionID: type: integer format: int64 ScriptPolicy: required: - ID - FromScriptHash - ToScriptID - Policy type: object properties: ID: type: integer format: int64 FromScriptHash: type: string ToScriptID: type: integer format: int64 Policy: type: integer format: int32 ScriptPolicyCreate: required: - FromScriptID - ToScriptID - Policy type: object properties: FromScriptID: type: integer format: int64 ToScriptID: type: integer format: int64 Policy: type: integer format: int32 ScriptPolicyUpdate: required: - ID type: object properties: ID: type: integer format: int64 FromScriptID: type: integer format: int64 ToScriptID: type: integer format: int64 Policy: type: integer format: int32 Pagination: type: object required: - Page - Limit properties: Page: type: integer format: int32 minimum: 1 Limit: type: integer format: int32 minimum: 1 maximum: 100 Error: description: Represents error object type: object properties: code: type: integer format: int64 message: type: string required: - code - message