RESTful API

Are you new to the eduTrac SIS online user's manual? If so, click here for a starting point. If you are looking for technical documentation, then check out the Wiki.

 

eduTrac SIS (etSIS) has a very simple RESTful API. When you install etSIS, you will need to add an api key on the General Settings screen. You can get a unique api key by visiting https://www.edutracsis.com/api-key/1.1/.

API Structure and Design

(C)reate > POST   /api/table
(R)ead   > GET    /api/table
(R)ead   > GET    /api/table/column/data
(U)pdate > PUT    /api/table/column/id
(D)elete > DELETE /api/table/column/id
# Get all rows from the "books" table
GET http://example.com/api/books/?key=9sw8wusWiukw
 
# Get a single row from the "books" table (where "123" is the bookID)
GET http://example.com/api/books/bookID/123/?key=9sw8wusWiukw
 
# Get all rows from the "books" table where the "genre" field equals "SciFi"
GET http://example.com/api/books/genre/SciFi/?key=9sw8wusWiukw
 
# Create a new row in the "books" table where the POST data corresponds to the database fields
POST http://example.com/api/books/?key=9sw8wusWiukw
 
# Update book "123" in the "books" table where the PUT data corresponds to the database fields
PUT http://example.com/api/books/bookID/123/?key=9sw8wusWiukw
 
# Delete book "123" from the "books" table
DELETE http://example.com/books/bookID/123/?key=9sw8wusWiukw

Responses

All of the responses are in json format. A GET response from the books table might look like the following:

[
    {
        "bookID": "123",
        "bookName": "Through Mulberry Woods",
        "author": "Ferguson, G.",
        "catNumber": "BJD9WJs9",
        "genre": "Short Stories"
    },
    ...
]

A successful POST response will return:

{
    "success": {
        "code": 201,
        "status": "Created"
    }
}

A successful PUT and DELETE response will return:

{
    "success": {
        "code": 200,
        "status": "OK"
    }
}

An unsuccessful POST and PUT response will return:

{
    "error": {
        "code": 409,
        "status": "Conflict"
    }
}

An unsuccessful DELETE response will return:

{
    "error": {
        "code": 404,
        "status": "Not Found"
    }
}

 

Last Modified: Dec 22, 2015 @ 11:36 PM

Was this article helpful?

Related Articles