Last active
August 29, 2015 14:27
-
-
Save MichaelJCole/7a684a7528fba7d54721 to your computer and use it in GitHub Desktop.
spec.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger": "2.0", | |
"info": { | |
"title": "test API", | |
"description": "test Swagger 2.0 API specification. This API spec can be used for integrating your Form.io project into non-HTML5 programs like \"native\" phone apps, \"legacy\" and \"enterprise\" systems, embedded \"Internet of Things\" applications (IoT), and other programming languages. Note: The URL's below are configured for your specific project and form.", | |
"termsOfService": "http://form.io/terms/", | |
"contact": { | |
"name": "Form.io Support", | |
"url": "http://help.form.io/", | |
"email": "[email protected]" | |
}, | |
"license": { | |
"name": "MIT", | |
"url": "http://opensource.org/licenses/MIT" | |
}, | |
"version": "1.0.0" | |
}, | |
"host": "api.localhost:3000", | |
"basePath": "/project/55b09c8f111b3a0100ac8c20/form/55b0a219111b3a0100ac8c28", | |
"schemes": [ | |
"http" | |
], | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"paths": { | |
"/project/55b09c8f111b3a0100ac8c20/form/55b0a219111b3a0100ac8c28/submission": { | |
"get": { | |
"tags": [ | |
"submission" | |
], | |
"summary": "List multiple submission resources.", | |
"description": "This operation allows you to list and search for submission resources provided query arguments.", | |
"operationId": "getsubmissions", | |
"responses": { | |
"200": { | |
"description": "Resource(s) found. Returned as array.", | |
"schema": { | |
"$ref": "#/definitions/submissionList" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized." | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "skip", | |
"in": "query", | |
"description": "How many records to skip when listing. Used for pagination.", | |
"required": false, | |
"type": "integer", | |
"default": 0 | |
}, | |
{ | |
"name": "limit", | |
"in": "query", | |
"description": "How many records to limit the output.", | |
"required": false, | |
"type": "integer", | |
"default": 10 | |
}, | |
{ | |
"name": "count", | |
"in": "query", | |
"description": "Set to true to return the number of records instead of the documents.", | |
"type": "boolean", | |
"required": false, | |
"default": false | |
}, | |
{ | |
"name": "sort", | |
"in": "query", | |
"description": "Which fields to sort the records on.", | |
"type": "string", | |
"required": false, | |
"default": "" | |
}, | |
{ | |
"name": "select", | |
"in": "query", | |
"description": "Select which fields will be returned by the query.", | |
"type": "string", | |
"required": false, | |
"default": "" | |
}, | |
{ | |
"name": "populate", | |
"in": "query", | |
"description": "Select which fields will be fully populated with the reference.", | |
"type": "string", | |
"required": false, | |
"default": "" | |
} | |
] | |
}, | |
"post": { | |
"tags": [ | |
"submission" | |
], | |
"summary": "Create a new submission", | |
"description": "Create a new submission", | |
"operationId": "createsubmission", | |
"responses": { | |
"201": { | |
"description": "The resource has been created." | |
}, | |
"400": { | |
"description": "An error has occured trying to create the resource." | |
}, | |
"401": { | |
"description": "Unauthorized. Note that anonymous submissions are *enabled* by default." | |
} | |
}, | |
"parameters": [ | |
{ | |
"in": "body", | |
"name": "body", | |
"description": "Data used to create a new submission", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/submission" | |
} | |
} | |
] | |
} | |
}, | |
"/project/55b09c8f111b3a0100ac8c20/form/55b0a219111b3a0100ac8c28/submission/{submissionId}": { | |
"get": { | |
"tags": [ | |
"submission" | |
], | |
"summary": "Return a specific submission instance.", | |
"description": "Return a specific submission instance.", | |
"operationId": "getsubmission", | |
"responses": { | |
"200": { | |
"description": "Resource found", | |
"schema": { | |
"$ref": "#/definitions/submission" | |
} | |
}, | |
"401": { | |
"description": "Unauthorized." | |
}, | |
"404": { | |
"description": "Resource not found" | |
}, | |
"500": { | |
"description": "An error has occurred." | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "submissionId", | |
"in": "path", | |
"description": "The ID of the submission that will be retrieved.", | |
"required": true, | |
"type": "string" | |
} | |
] | |
}, | |
"put": { | |
"tags": [ | |
"submission" | |
], | |
"summary": "Update a specific submission instance.", | |
"description": "Update a specific submission instance.", | |
"operationId": "updatesubmission", | |
"responses": { | |
"200": { | |
"description": "Resource updated", | |
"schema": { | |
"$ref": "#/definitions/submission" | |
} | |
}, | |
"400": { | |
"description": "Resource could not be updated." | |
}, | |
"401": { | |
"description": "Unauthorized." | |
}, | |
"404": { | |
"description": "Resource not found" | |
}, | |
"500": { | |
"description": "An error has occurred." | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "submissionId", | |
"in": "path", | |
"description": "The ID of the submission that will be updated.", | |
"required": true, | |
"type": "string" | |
}, | |
{ | |
"in": "body", | |
"name": "body", | |
"description": "Data used to update submission", | |
"required": true, | |
"schema": { | |
"$ref": "#/definitions/submission" | |
} | |
} | |
] | |
}, | |
"delete": { | |
"tags": [ | |
"submission" | |
], | |
"summary": "Delete a specific submission", | |
"description": "Delete a specific submission", | |
"operationId": "deletesubmission", | |
"responses": { | |
"204": { | |
"description": "Resource was deleted" | |
}, | |
"400": { | |
"description": "Resource could not be deleted." | |
}, | |
"401": { | |
"description": "Unauthorized." | |
}, | |
"404": { | |
"description": "Resource not found" | |
}, | |
"500": { | |
"description": "An error has occurred." | |
} | |
}, | |
"parameters": [ | |
{ | |
"name": "submissionId", | |
"in": "path", | |
"description": "The ID of the submission that will be deleted.", | |
"required": true, | |
"type": "string" | |
} | |
] | |
} | |
} | |
}, | |
"definitions": { | |
"submission": { | |
"properties": { | |
"roles": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"externalIds": { | |
"type": "array", | |
"items": { | |
"properties": { | |
"type": { | |
"type": "string" | |
}, | |
"id": { | |
"type": "string" | |
}, | |
"created": { | |
"type": "string", | |
"format": "date", | |
"description": "The date this resource was created." | |
}, | |
"modified": { | |
"type": "string", | |
"format": "date", | |
"description": "The date this resource was modified." | |
} | |
} | |
} | |
}, | |
"created": { | |
"type": "string", | |
"format": "date", | |
"description": "The date this resource was created." | |
}, | |
"modified": { | |
"type": "string", | |
"format": "date", | |
"description": "The date this resource was modified." | |
} | |
} | |
}, | |
"submissionList": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/submission" | |
} | |
} | |
}, | |
"securityDefinitions": { | |
"bearer": { | |
"type": "apiKey", | |
"name": "Authorization", | |
"in": "header" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment