Skip to content

Commit

Permalink
update openapi.json
Browse files Browse the repository at this point in the history
Signed-off-by: Timotheus Pokorra <timotheus.pokorra@solidcharity.com>
  • Loading branch information
tpokorra committed Jan 21, 2025
1 parent dfa560d commit fc22217
Showing 1 changed file with 181 additions and 0 deletions.
181 changes: 181 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"isAnonymous",
"lastUpdated",
"submitMultiple",
"allowEdit",
"showExpiration",
"canSubmit",
"permissions",
Expand Down Expand Up @@ -164,6 +165,9 @@
"submitMultiple": {
"type": "boolean"
},
"allowEdit": {
"type": "boolean"
},
"showExpiration": {
"type": "boolean"
},
Expand Down Expand Up @@ -204,6 +208,19 @@
"submissionMessage": {
"type": "string",
"nullable": true
},
"answers": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Answer"
}
},
"newSubmission": {
"type": "boolean"
},
"submissionId": {
"type": "integer",
"format": "int64"
}
}
},
Expand Down Expand Up @@ -3381,6 +3398,170 @@
}
},
"/ocs/v2.php/apps/forms/api/v3/forms/{formId}/submissions/{submissionId}": {
"put": {
"operationId": "api-update-submission",
"summary": "Update an existing submission",
"tags": [
"api"
],
"security": [
{},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"answers"
],
"properties": {
"answers": {
"type": "object",
"description": "[question_id => arrayOfString]",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"shareHash": {
"type": "string",
"default": "",
"description": "public share-hash -> Necessary to submit on public link-shares."
}
}
}
}
}
},
"parameters": [
{
"name": "formId",
"in": "path",
"description": "the form id",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "submissionId",
"in": "path",
"description": "the submission id",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "the id of the updated submission",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "integer",
"format": "int64"
}
}
}
}
}
}
}
},
"400": {
"description": "Can only update submission if AllowEdit is set and the answers are valid",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
},
"403": {
"description": "Can only update your own submission",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {}
}
}
}
}
}
}
}
}
},
"delete": {
"operationId": "api-delete-submission",
"summary": "Delete a specific submission",
Expand Down

0 comments on commit fc22217

Please sign in to comment.