RealEd Solutions
Web API

Web API

Cookies

Whenever a student is logged in, three cookies are stored in the browser with path "/" and end-of-session expiration: "user", "ses", and "token".

http/https cookie "user" contains the logged-in student's name. Its presence or absence is used by server-side scripts to determine whether to show anonymous elements, such as the Login link, versus non-anonymous elements, such as the My Classes, My Account, and Logout links.

https-only cookies "ses" and "token" contain opaque authentication data.

Links

The RealEd pages all reside under top-level URL path "/reg/". Entry points from non-RealEd pages are as follows:

  • /reg/acct.php: Student "My Account" page.
  • /reg/cart.php: Shopping cart page. Sets the Continue Shopping button redirect to redir if savesrch=redir is specified. Adds class code, bookstore item name, or package name to the shopping cart if class=code, item=name, or pkg=name is specified. Additional classes, bookstore items, and packages may be specified using keys classN, itemN, and pkgN for N=2 and higher.
  • /reg/classes.php: Student "My Classes" page.
  • /reg/enroll.php?class=code: Course description and add-to-cart page for class code.
  • /reg/login.php: Student login page, with post-login redirect to redir if url=redir is specified.
  • /reg/logout.php: Student logout link.
  • /reg/bkprog.php: List of bookstore categories.
  • /reg/bklst.php: List of bookstore items, restricted to category code if prog=code is specified.

Database Information Retrieval

RealEd database queries are sent as HTTP POST requests in www-url-encoded format to this URL:

   https://ip-address:59822/site/pub.php

Each POST must contain the following name/value pairs:

  • _site=site
  • _page=pageid
where pageid identifies the action to be performed. The response is in www-url-encoded format and normally includes name/value pair "status=success" or "status=error".

"_page=inf" is handled as follows:

  • Any number of name/value pairs inf[key][i]=obj may be specified, where key identifies the type of information to be retrieved, i counts upward from 0, and obj identifies the object about information should be retrieved.
  • The response contains name/value pairs "inf[key][obj][j]=val", where key and obj are copied from the request, j counts from 0, and val is one of the requested values.
  • Currently supported key values:
    • crspub: course title for course code obj
    • crsdsc: course description for course code obj
    • crsblrb: blurbs associated with course code obj
    • crsjurs: jurisdiction codes associated with course code obj
    • crsjnums: approval numbers associated with course code obj
    • crsjsbjs: subjects associated with course code obj
    • crsjcreds: credit amounts associated with course code obj
    • first: first name of the logged-in user, obj is 0
    • middle: middle name of the logged-in user, obj is 0
    • last: last name of the logged-in user, obj is 0
    • email: email address of the logged-in user, obj is 0
    • suffix: name suffix of the logged-in user, obj is 0

Additional key values will be added as needed.

The following code demonstrates the use of some of the above key values, using demo.realedsolutions.com as the server: