Skip to content

Instantly share code, notes, and snippets.

@Aquanode
Last active October 14, 2016 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Aquanode/0d4b95a53520b65e657f to your computer and use it in GitHub Desktop.
Save Aquanode/0d4b95a53520b65e657f to your computer and use it in GitHub Desktop.

AoC API Usage

adds students/youth into the system

params:

  • student[i]
    • required:
      • [birth_date]
      • [first_name]
      • [last_name]
      • [school]
      • [classroom]
    • optional:
      • [id]
      • [gender]
      • [grade]

Example:

POST /api/students HTTP/1.1

Host: aoc.onboard.tools

{
    "student" : [
        {
            "first_name" : "John",
            "last_name" : "Cena",
            "birth_date" : "1998-10-01",
            "school" : "Wrestlemania School"
        },
        {
            "first_name" : "Ronda",
            "last_name" : "Rousey",
            "birth_date" : "1998-10-01",
            "school" : "Wrestlemania School",
            "gender" : "Female"
        }
    ]
}

Add Districts/AoC admins

params:

  • district[i]
    • required:
      • [name]
      • [email]
    • optional:
      • [address]
      • [phone]
  • user[i]
    • required:
      • [name]
      • [email]
    • optional:
      • [password]

Example:

POST /api/districts HTTP/1.1

Host: aoc.onboard.tools

{
    "district" : [
        {
            "name" : "A District",
            "email" : "valid@email.com"
        },
        {
            "name" : "Another District",
            "email" : "anothervalid@email.com",
            "phone" : "(403) 555-1234"
        },
    ],

    "user" : [
        {
            "name" : "Gloria B. Vitale",
            "email" : "gloriabvitale@teleworm.us"
        },
        {
            "name" : "Sarah R. Gutierrez",
            "email" : "sarahrgutierrez@teleworm.us",
            "password" : "Ingeiv9yah9"
        }
    ]
}

Adds Districts/AoC admins

params:

  • aoc[i]
    • required:
      • [name]
      • [email]
    • optional:
      • [address]
      • [phone]
  • user[i]
    • required:
      • [name]
      • [email]
    • optional:
      • [password]

Example:

POST /api/aoc HTTP/1.1

Host: aoc.onboard.tools

{
    "aoc" : [
        {
            "name" : "An Admin",
            "email" : "valid@email.com"
        },
        {
            "name" : "Another Admin",
            "email" : "anothervalid@email.com",
            "phone" : "(403) 555-1234"
        },
    ],

    "user" : [
        {
            "name" : "Gloria B. Vitale",
            "email" : "gloriabvitale@teleworm.us"
        },
        {
            "name" : "Sarah R. Gutierrez",
            "email" : "sarahrgutierrez@teleworm.us",
            "password" : "Ingeiv9yah9"
        }
    ]
}

Adds Schools

params:

  • school[i]
    • required:
      • [name]
  • user[i]
    • required:
      • [name]
      • [email]
    • optional:
      • [password]

Example:

POST /api/schools HTTP/1.1

Host: aoc.onboard.tools

{
    "district" : [
        {
            "name" : "A School",
            "email" : "valid@email.com"
        },
        {
            "name" : "Another School",
            "email" : "anothervalid@email.com",
            "phone" : "(403) 555-1234"
        },
    ],

    "user" : [
        {
            "name" : "Gloria B. Vitale",
            "email" : "gloriabvitale@teleworm.us"
        },
        {
            "name" : "Sarah R. Gutierrez",
            "email" : "sarahrgutierrez@teleworm.us",
            "password" : "Ingeiv9yah9"
        }
    ]
}

params:

  • group[i]
    • required:
      • [name]
  • user[i]
    • required:
      • [name]
      • [email]
    • optional:
      • [password]

Example:

POST /api/groups HTTP/1.1

Host: aoc.onboard.tools

{
    "group" : [
        {
            "name" : "API Test Group"
        },
        {
            "name" : "API Group"
        }
    ],

    "user" : [
        {
            "name" : "Gloria B. Vitale",
            "email" : "gloriabvitale@teleworm.us"
        },
        {
            "name" : "Sarah R. Gutierrez",
            "email" : "sarahrgutierrez@teleworm.us",
            "password" : "Ingeiv9yah9"
        }
    ]
}

params:

  • required
    • [email]
    • [password]

Example:

POST /api/user/details HTTP/1.1

Host: aoc.onboard.tools

{
  "email" : "gloriabvitale@teleworm.us",
  "password" : "Ingeiv9yah9"
}

params:

  • id (optional)

returns all surveys or if id is specified, a single survey is returned

params:

  • id (optional)

returns all students or if id is specified, a single student is returned

params:

  • id (required)

returns coach report based on the survey id

params:

  • id (required)

returns youth report based on the system's student survey id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment