openapi: 3.0.0 info: description: This is a simple Qrvey API Demo version: 3.0.0 title: Qrvey Demo API OAS contact: email: help@qrvey.com name: Support Team license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html tags: - name: developers description: Operations available to regular developers paths: /user: get: tags: - developers summary: lists users operationId: listUsers description: | Returns a list with all the users/accounts based on the API Key. parameters: - name: x-api-key in: header description: Your API Key. required: true schema: type: string responses: "200": description: API Key is valid content: application/json: schema: type: array items: $ref: "#/components/schemas/UserStatus" "400": description: bad input parameter post: tags: - developers summary: adds a user operationId: addUser description: Add a new account (user) to your instance by providing email and password parameters. The API will return a userid token that can be used in subsequent API requests. The function requires the API Key, email address, and password to be provided. A first_name, last_name, and organization may also be provided when the account is created. Use the Update User API call to change the password and other associated data. parameters: - name: x-api-key in: header description: Your API Key. required: true schema: type: string requestBody: content: application/json: schema: $ref: "#/components/schemas/NewUser" description: User details required: true responses: "200": description: user created content: application/json: schema: $ref: "#/components/schemas/UserStatus" "400": description: invalid input, object invalid content: application/json: schema: type: object required: - status - message properties: status: type: integer description: Error status code example: 400 message: type: string description: The detailed error message example: User already exists servers: - url: https://virtserver.swaggerhub.com/Ian-MacDonald-Hogan/QrveyDemo/3.0.0 components: schemas: UserID: type: object required: - userid properties: userid: type: string description: The user id allocated by the server. example: wbzjg88 UserDetails: type: object required: - email properties: email: type: string format: email description: The email address of the user. example: new.user@some.org first_name: type: string description: The first name of the user. example: Ima last_name: type: string description: The last name of the user. example: Coder organisation: type: string description: The organisation the user belongs to. example: Coders'R'Us NewUser: allOf: - $ref: "#/components/schemas/UserDetails" - type: object required: - password properties: password: type: string format: password description: Initial password. example: SOmeSeekret UserStatus: allOf: - $ref: "#/components/schemas/UserID" - $ref: "#/components/schemas/UserDetails" - type: object properties: createDate: type: string format: date-time description: The date and time the user was created. lastLoginDate: type: string format: date-time description: The date and time the user last logged in to the user interface. QuestionBase: type: object required: - id properties: questionIndex: type: integer description: Question index in the web form example: 1 id: type: string description: The id of the question - must be unique for this application object. incomplete: type: boolean description: Flag to indicate the question is complete. example: false question: type: string enum: - MAIN - OPTIONAL description: If the value is MAIN then the question is required, otherwist it is optional. example: optional text: type: string description: The prompt text for the question. example: What is your answer? description: type: string description: Text to be shown after the question prompt. example: We collect this information to help our developers meet client needs. AddressQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object required: - type properties: type: type: string enum: - ADDRESS description: This is the type of question, and may only be the specified value. answers: type: array items: schema: type: object required: - answer properties: answer: type: string enum: - ANSWER description: Valid answer - an Answer object. description: The set of allowable answers - only 1 entry is allowed and that must be the string ANSWER. example: [{answer: "ANSWER"}] DateQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object required: - type properties: type: type: string enum: - DATE description: This is the type of question, and may only be the specified value. DropdownQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - DROPDOWN description: This is the type of question, and may only be the specified value. EmailFormQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - EMAIL_FORM description: This is the type of question, and may only be the specified value. ExpressionQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - EXPRESSION description: This is the type of question, and may only be the specified value. HeadlineQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - HEADLINE description: This is the type of question, and may only be the specified value. ImageQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - IMAGE description: This is the type of question, and may only be the specified value. ImageUploadQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - IMAGEUPLOAD description: This is the type of question, and may only be the specified value. LongTextQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - LONGTEXT description: This is the type of question, and may only be the specified value. MultipleChoiceQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - MULTIPLE_CHOICE description: This is the type of question, and may only be the specified value. NameQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - NAME description: This is the type of question, and may only be the specified value. NumericQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - NUMERIC description: This is the type of question, and may only be the specified value. PasswordQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - PASSWORD description: This is the type of question, and may only be the specified value. PhoneQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - PHONE description: This is the type of question, and may only be the specified value. RankingQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - RANKING description: This is the type of question, and may only be the specified value. RatingQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - RATING description: This is the type of question, and may only be the specified value. SignatureQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - SIGNATURE description: This is the type of question, and may only be the specified value. SingleChoiceQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - SINGLE_CHOICE description: This is the type of question, and may only be the specified value. SlidebarQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - SIDEBAR description: This is the type of question, and may only be the specified value. TextfieldQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - TEXTFIELD description: This is the type of question, and may only be the specified value. USAddressQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - USADDRESS description: This is the type of question, and may only be the specified value. YesNoQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - type: object properties: type: type: string enum: - YES_NO description: This is the type of question, and may only be the specified value. Question: oneOf: - $ref: "#/components/schemas/AddressQuestion" - $ref: "#/components/schemas/DateQuestion" - $ref: "#/components/schemas/DropdownQuestion" - $ref: "#/components/schemas/EmailFormQuestion" - $ref: "#/components/schemas/ExpressionQuestion" - $ref: "#/components/schemas/HeadlineQuestion" - $ref: "#/components/schemas/ImageQuestion" - $ref: "#/components/schemas/ImageUploadQuestion" - $ref: "#/components/schemas/LongTextQuestion" - $ref: "#/components/schemas/MultipleChoiceQuestion" - $ref: "#/components/schemas/NameQuestion" - $ref: "#/components/schemas/NumericQuestion" - $ref: "#/components/schemas/PasswordQuestion" - $ref: "#/components/schemas/PhoneQuestion" - $ref: "#/components/schemas/RankingQuestion" - $ref: "#/components/schemas/RatingQuestion" - $ref: "#/components/schemas/SignatureQuestion" - $ref: "#/components/schemas/SingleChoiceQuestion" - $ref: "#/components/schemas/SlidebarQuestion" - $ref: "#/components/schemas/TextfieldQuestion" - $ref: "#/components/schemas/USAddressQuestion" - $ref: "#/components/schemas/YesNoQuestion" AppObject: allOf: - $ref: "#/components/schemas/UserID" - type: object required: - userid - appid - name - description - appType - status properties: appid: type: string description: The application id allocated by the server. example: ZSzjg23 name: type: string description: The name of the application object. Usually used as the name of the object in the UI. example: This is a great quiz description: type: string description: The description of the application, usually displayed on the first page of the UI for the object. example: Please take this quiz to test your professional knowledge. appType: type: string enum: - FORM - QUIZ - SURVEY description: The type of the application object. status: type: string enum: - DRAFT - RUNNING - PAUSED description: The status of the application object. questions: type: array items: $ref: "#/components/schemas/Question"