Skip to content

Latest commit

 

History

History
522 lines (418 loc) · 8.42 KB

File metadata and controls

522 lines (418 loc) · 8.42 KB

API endpoints

DO NOT EDIT THIS, IT IS GENERATED BY /docs/api.json AND YOUR CHANGES WILL BE OVER WRITTEN

users

signedin

check if a user is signed in

  • url /api/users/signedin

  • verb GET

  • input

        EMPTY
  • output

        STATUS CODE 200
        {
          "signedin": "Boolean"
        }
  • auth NONE

signup

create a user given an email and password. On success (200) a cookie storing the user's session is returned along with a json object with error being null. On error the status code 400 is returned with a json object indicating the error in a string.

  • url /api/users/signup

  • verb POST

  • input

        {
          "email": "String",
          "password": "String"
        }
  • output

    • on success

            STATUS CODE 200
            {
              "error": null
            }
    • on error

            STATUS CODE 400
            {
              "error": "String"
            }
  • auth NONE

signin

sign in an existing user using an email and password. On success (200) a cookie storing the user's session is returned along with a json object with error being null. On error the status code 400 is returned with a json object indicating the error in a string.

  • url /api/users/signin

  • verb POST

  • input

        {
          "email": "String",
          "password": "String"
        }
  • output

    • on success

            STATUS CODE 200
            {
              "error": null
            }
    • on error

            STATUS CODE 400
            {
              "error": "String"
            }
  • auth NONE

signout

destroyes the current user's session if it exists always returns 200

  • verb GET

  • input

        EMPTY
  • output

        EMPTY
  • auth NONE

integrations

list

get a list of the current user's integrations

  • url /api/integrations

  • verb GET

  • input

        EMPTY
  • output

    • on success

            STATUS CODE 200
            [
              "String",
              "..."
            ]
    • on error

            STATUS CODE 400
            {
              "error": "String"
            }

github

initiate auth

redirects the user to the correct github url to start authorization

  • url /api/integrations/github

  • verb GET

  • input

        EMPTY
  • output

        STATUS CODE 302
  • auth SESSION

list repos

list all repos of the currently logged in user

  • url /api/integrations/github/repos

  • verb GET

  • input

        EMPTY
  • output

    • on success

            STATUS CODE 200
            [
              "String",
              "String",
              "..."
            ]
    • on error

            STATUS CODE 400
            {
              "error": "String"
            }
  • auth SESSION

set repos

set the users github repo to post issues to

  • url /api/integrations/github/repos

  • verb POST

  • input

        {
          "name": "String"
        }
  • output

    • on success

            STATUS CODE 200
            {
              "error": null
            }
    • on error

            STATUS CODE 400
            {
              "error": "String"
            }
  • auth SESSION

github auth

used by github to return the auth token after user is verified. Redirects to /create/github when auth is complete.

  • url /api/integrations/github/auth

  • verb GET

  • input

        code=String&scope=String
  • output

    • on success

            STATUS CODE 302
    • on error

            STATUS CODE 400
            {
              "error": "String"
            }
  • auth SESSION

URLs

list URLs

list all URLs of the currently logged in user

  • url /api/integrations/url/urls

  • verb GET

  • input

        EMPTY
  • output

    • on success

            STATUS CODE 200
            [
              "String",
              "String",
              "..."
            ]
    • on error

            STATUS CODE 400
            {
              "error": "String"
            }
  • auth SESSION

set URL

set the users URL to post comments to

  • url /api/integrations/url/urls

  • verb POST

  • input

        {
          "name": "String"
        }
  • output

    • on success

            STATUS CODE 200
            {
              "error": null
            }
    • on error

            STATUS CODE 400
            {
              "error": "String"
            }
  • auth SESSION

keys

list keys

get a list of the user's keys

  • url /api/keys

  • verb GET

  • input

        EMPTY
  • output

    • on success

            STATUS CODE 200
            [
              {
                "name": "String (Optional)",
                "api_key": "String",
                "endpoint": "String"
              }
            ]
    • on error

            STATUS CODE 400
            {
              "error": "String"
            }
  • auth SESSION

create key

get a list of the user's keys

  • url /api/keys

  • verb POST

  • input

        EMPTY
  • output

    • on success

            STATUS CODE 200
            {
              "key": "String"
            }
    • on error

            STATUS CODE 400
            {
              "error": "String"
            }
  • auth SESSION

annotation

create annotation

create an annotation

  • url /api/annotate

  • verb POST

  • input

        {
          "title": "String",
          "comment": "String",
          "to": "String",
          "from": "String",
          "selected": "String",
          "element": {
            "text": "String",
            "x": "Number",
            "y": "Number",
            "width": "Number",
            "height": "Number",
            "name": {
              "text": "String",
              "nth": "Number"
            },
            "class": {
              "text": "String",
              "nth": "Number"
            },
            "id": "String"
          }
        }
  • output

    • on success

            STATUS CODE 200
            {
              "error": null
            }
    • on error

            STATUS CODE 400
            {
              "error": "String"
            }
  • auth NONE