Computer Availability API

This pages describes the syntax for a simple API to display current computer availability in the Penn State Labs environment.

Use is restricted to systems that are part of Penn State Labs and is subject to an SLA agreement. If approved, IP addresses of the production and development calling services, as well as an updated list of technical contacts, must be provided. Calling statistics are logged to a database; excessive, infrequent, or duplicates-an-existing-service calls will be subject to termination of the SLA.

Please contact us here to enroll, update contact/networking information, or for issues and requests.

Summary

Computer availability is determined by querying a URL with parameters, and a text-based, comma-delimited string is returned.

There are currently two URLs available for querying:

It is generally expected that Rooms.aspx is used manually to verify the RoomId and/or BuildingId for routine/automated calls to Computers.aspx, with RoomId and BuildingId either hard-coded into the calling application or stored in a configuration file (i.e., it is not intended to actively query Rooms.aspx since these values rarely, if ever, change).

Specifications

Rooms

This page returns a list of room(s) and building(s) at the specified campus.

Penn State Labs's campus codes match LionPATH's campus codes. Please use LionPATH's New Campus Code.
URL
https://api.labs.it.psu.edu/availability/Rooms.aspx

Parameters

A query string limits the list of rooms; with no query string, all Penn State Labs rooms with active computers are listed. Available parameters include the following:

  • Campus=<CampusCode>
  • BuildingId=<BuildingId>
  • RoomtType=(<RoomTypeId>)

where:

  • CampusCode is a two- or three-character string specifying a single Penn State Labs campus.
  • BuildingId is an integer specifying a single Penn State Labs building.
  • RoomTypeId is an integer specifying a single Penn State Labs room type:
    • 1 — Open Lab
    • 2 — Teaching Lab
    • 3 — Tech Class (typically a classroom with podium)
    • 4 — Hall Machines
    • 5 — Learning Center
    • 6 — Assistive Technology
    • 7 — Private Lab
    • 14 — Non-Tech GPC (general purpose classroom)
    • 15 — Library
    • 16 — Media Commons

Examples

Output Syntax

Output is a comma-separated list of rooms and buildings at the specified campus with the following columns:

RoomId, RoomName, BuildingId, Building, Campus,

where:

  • RoomId is an integer specifying a single Penn State Labs room.
  • RoomName is a string specifying the room's name.
  • BuildingId is an integer specifying a single Penn State Labs building.
  • Building is a string specifying the building's name.
  • Campus is a string of two to three characters specifying the campus code.
Example Output
RoomId, RoomName, BuildingId, Building, Campus, 
1266,213,247,Eiche Library,AL,
1306,213A,247,Eiche Library,AL,
3230,213L Altoona Library,247,Eiche Library,AL,

Computers

This page returns a list of computers in the specified room(s) or building(s) with a flag indicating whether or not someone is signed in. The calling application can use this, for example, to display a map of the room or building showing available computers.

URL
https://api.labs.it.psu.edu/availability/Computers.aspx

Required Parameters

A query string specifies which computers are to be listed. At least 1 of the following is required:

  • RoomId=<RoomId>
  • RoomIds=(<RoomId>,<RoomId>,...)
  • BuildingId=<BuildingId>
  • BuildingIds=(<BuildingId>,<BuildingId>,...)

where:

Optional Parameters

Additionally, the following parameters can be specified:

  • UnitId=<UnitId>
  • Totals=<ByRoom|ByBuilding>
  • IncludeWebLabs=<0|1>

where:

  • UnitId is an integer specifying a single Penn State Labs unit. To see your unit's UnitId, sign in to the Lab Tools application for IT staff.
  • Totals=ByRoom or Totals=ByBuilding results in total computers and total in-use by platform and room or building (instead of individual rows for each computer).
  • IncludeWebLabs=1 to include WebLabs computers in the results, or IncludeWebLabs=0 not to include WebLabs computers in the results. The default value is IncludeWebLabs=0 and does not need to be specified.

Examples

Output Syntax

Totals Not Used

Output is a comma-separated list of computers in the specified room or building with following columns:

ComputerId, RoomId, Platform, InUse, Attributes,

where:

  • ComputerId is an integer specifying the last octet of the computer's IP address.
  • RoomId is an integer specifying a single Penn State Labs room.
  • Platform is a character specifying the computer's operating system platform:
    • W — Microsoft Windows
    • M — Apple macOS
    • L — Linux
  • InUse is an integer specifying whether or not someone is currently signed-in:
    • 0 — not currently signed-in
    • 1 — currently signed-in
  • Attributes is a string of 0 or more upper-case characters denoting any of the computer's build attributes:
    • A — ADA workstation
    • L — CLM-Lite workstation
    • K — kiosk
    • D — Large display
    • M — Media reader
    • R — Release Station
    • S — Scanner
    • T — Collaborative area
    • W — WebLabs

    Note: The attributes C (consultant workstation) and P (podium) are always excluded from results. The W attribute (WebLabs) is excluded by default, but can be included with IncludeWebLabs=1.

Example Output
ComputerId, RoomId, Platform, InUse, Attributes, 
26,1217,W,0,,
27,1217,W,0,,
30,1217,W,0,,
31,1217,W,0,,
32,1217,W,1,,
33,1217,W,0,,
34,1217,W,0,,
35,1217,W,1,,
36,1217,W,1,,
37,1217,W,0,,
38,1217,W,0,,
96,1217,W,1,,
97,1217,W,0,,
98,1217,W,0,,
99,1217,W,0,,
100,1217,W,1,,
101,1217,W,0,,
102,1217,W,1,,
103,1217,W,0,,
104,1217,W,0,,
105,1217,W,1,,
Totals Used

Output is a comma-separated list of totals for the specified room or building with following columns:

RoomId|BuildingId, Platform, TotalComputers, InUseComputers,
Example Output
ComputerId, RoomId, Platform, InUse, Attributes, 
2155,M,81,0,
2182,M,2,0,
2183,M,1,0,
2184,M,2,2,
2185,M,2,0,
2188,M,2,2,
2189,M,2,0,
2190,M,2,0,
2198,M,16,6,
2199,M,2,0,
2209,R,1,0,
1192,W,1,0,
1193,W,4,0,
1194,W,36,1,
1195,W,40,5,
1196,W,32,0,
1197,W,44,6,
1198,W,30,6,
1217,W,22,0,
1218,W,24,4,
1219,W,4,1,
1220,W,9,1,
1222,W,37,3,
1223,W,34,2,
1809,W,5,0,
2156,W,59,0,
2198,W,40,0,
2199,W,7,2,
2200,W,8,0,
2216,W,1,0,
2938,W,2,0,
2939,W,1,0,
3738,W,1,0,
3798,W,6,1,
3822,W,3,0,
3830,W,3,0,
4022,W,5,1,
4088,W,1,1,
4139,W,2,0,

Map

This returns a JSON-formatted list of availability designed for use with a map. Included are buildings with coordinates and the number of systems available for each room.

URL
https://api.labs.it.psu.edu/availability/map

Optional Parameters

The following parameters can be specified:

  • Campus=<CampusCode>
  • Platform=<PlatformCode+>
  • RoomType=<RoomTypeCode+>
  • UseComputerLabLabel=<0|1>

where:

  • CampusCode is a two- or three-character string specifying a single Penn State Labs campus (use the LionPath New Campus Code).

     

    Notes
    • Default value (i.e., left blank): show all campuses
    • Only one campus may be specified with this parameter.

     

  • Platform is a string of one or more characters specifying which Penn State Labs operating system platforms to display:
    • W — Microsoft Windows
    • M — Apple macOS
    • L — Linux

     

    Notes
    • Default value (i.e., left blank): show all platforms
    • To show multiple platforms, append the appropriate PlatformCode (e.g., Platform=W for Windows, Platform=WM for Windows and macOS).
  •  

  • RoomType is a string of one or more characters specifying which Penn State Labs to display:
    • O — Open Lab
    • C — Teaching Lab
    • H — Hall Machines
    • L — Library
    • M — Media Commons

     

    Notes
    • Default value (i.e., left blank): show all room types
    • To show multiple room types, append the appropriate RoomTypeCode (e.g., RoomType=O for Open Lab, RoomType=OH for Open Lab and Hall Machines).
  •  

  • UseComputerLabLabel is an integer specifying whether or not to append "Computer Lab" to the building name:
    • 0 — just use the building name.
    • 1 — use the building name, appended with "Computer Lab".

     

    Notes
    • Default value (i.e., left blank): 0
    • This parameter only supports a value of 0 or 1.

Examples

Output Syntax

Output is a JSON-formatted list of computer lab availability with the following fields:

BuildingId, RoomId, Latitude, Longitude, Campus, Building, Room, RoomType, WindowsAvailable, WindowsTotal, MacAvailable, MacTotal, LinuxAvailable, LinuxTotal, Reserved, TotalComputers

where:

  • BuildingId is an integer specifying a single Penn State Labs building.
  • RoomId is an integer specifying a single Penn State Labs room.
  • Latitude is a string specifying the building's latitude coordinates.
  • Longitude is a string specifying the building's longitude coordinates.
  • Campus is a string of two to three characters specifying the campus code.
  • Building is a string specifying the building's name.
  • Room is a string specifying the room's name.
  • RoomType is a string specifying the room's type.
  • WindowsAvailable is an integer specifying the number of currently available (i.e., not currently used) Windows computers in the specified room. (Note: Reserved computers are excluded from this count.)
  • WindowsTotal is an integer specifying the total (i.e., used and unused) number of Windows computers in the specified room. (Note: Reserved computers are excluded from this count.)
  • MacAvailable is an integer specifying the number of currently available (i.e., not currently used) macOS computers in the specified room. (Note: Reserved computers are excluded from this count.)
  • MacTotal is an integer specifying the total (i.e., used and unused) number of macOS computers in the specified room. (Note: Reserved computers are excluded from this count.)
  • LinuxAvailable is an integer specifying the number of currently available (i.e., not currently used) Linux computers in the specified room. (Note: Reserved computers are excluded from this count.)
  • LinuxTotal is an integer specifying the total (i.e., used and unused) number of Linux computers in the specified room. (Note: Reserved computers are excluded from this count.)
  • Reserved is an integer specifying the total (i.e., used and unused) number of computers considered reserved. Reserved computers are physically located in a lab, but aren't available for use.
  • TotalAvailable is an integer specifying the total number of currently available (i.e., not currently used) computers across all platforms in the specified room, including reserved computers.
Notes
  • Computers with a W attribute (i.e., WebLabs computers) are marked as reserved and are not counted in platform -Available or -Total counts.
Example Output
[{"BuildingId":2,"RoomId":1,"Latitude":"40.8035","Longitude":"-77.8639","Campus":"UP","Building":"AgSci Computer Lab","Room":"113","RoomType":"Open Lab","WindowsAvailable":8,"WindowsTotal":15,"MacAvailable":6,"MacTotal":7,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":10,"TotalComputers":32},{"BuildingId":6,"RoomId":2,"Latitude":"40.8002","Longitude":"-77.8571","Campus":"UP","Building":"Beaver Computer Lab","Room":"1","RoomType":"Open Lab","WindowsAvailable":38,"WindowsTotal":42,"MacAvailable":7,"MacTotal":7,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":49},{"BuildingId":7,"RoomId":3,"Latitude":"40.7992","Longitude":"-77.8618","Campus":"UP","Building":"Boucke Computer Lab","Room":"103","RoomType":"Open Lab","WindowsAvailable":22,"WindowsTotal":38,"MacAvailable":18,"MacTotal":19,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":57},{"BuildingId":13,"RoomId":3701,"Latitude":"40.8049","Longitude":"-77.8562","Campus":"UP","Building":"EAL Computer Lab","Room":"123","RoomType":"Open Lab","WindowsAvailable":1,"WindowsTotal":1,"MacAvailable":0,"MacTotal":0,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":1},{"BuildingId":13,"RoomId":3820,"Latitude":"40.8049","Longitude":"-77.8562","Campus":"UP","Building":"EAL Computer Lab","Room":"133A","RoomType":"Open Lab","WindowsAvailable":1,"WindowsTotal":1,"MacAvailable":0,"MacTotal":0,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":1},{"BuildingId":13,"RoomId":4215,"Latitude":"40.8049","Longitude":"-77.8562","Campus":"UP","Building":"EAL Computer Lab","Room":"207","RoomType":"Open Lab","WindowsAvailable":1,"WindowsTotal":1,"MacAvailable":0,"MacTotal":0,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":1},{"BuildingId":20,"RoomId":13,"Latitude":"40.8064","Longitude":"-77.8623","Campus":"UP","Building":"Findlay Computer Lab","Room":"6","RoomType":"Open Lab","WindowsAvailable":60,"WindowsTotal":72,"MacAvailable":15,"MacTotal":16,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":88},{"BuildingId":25,"RoomId":17,"Latitude":"40.7937","Longitude":"-77.8631","Campus":"UP","Building":"Hammond Computer Lab","Room":"317","RoomType":"Open Lab","WindowsAvailable":29,"WindowsTotal":44,"MacAvailable":4,"MacTotal":4,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":48},{"BuildingId":75,"RoomId":3091,"Latitude":"40.7982","Longitude":"-77.8613","Campus":"UP","Building":"HUB Computer Lab","Room":"042","RoomType":"Open Lab","WindowsAvailable":9,"WindowsTotal":15,"MacAvailable":3,"MacTotal":3,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":18},{"BuildingId":231,"RoomId":3798,"Latitude":"40.7985","Longitude":"-77.8654","Campus":"UP","Building":"Paterno Computer Lab","Room":"201L","RoomType":"Open Lab","WindowsAvailable":4,"WindowsTotal":6,"MacAvailable":0,"MacTotal":0,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":6},{"BuildingId":37,"RoomId":23,"Latitude":"40.8010","Longitude":"-77.8585","Campus":"UP","Building":"Pollock Computer Lab","Room":"201","RoomType":"Open Lab","WindowsAvailable":84,"WindowsTotal":134,"MacAvailable":10,"MacTotal":16,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":150},{"BuildingId":39,"RoomId":4092,"Latitude":"40.7955","Longitude":"-77.8690","Campus":"UP","Building":"RecHall Computer Lab","Room":"CLM","RoomType":"Open Lab","WindowsAvailable":2,"WindowsTotal":2,"MacAvailable":0,"MacTotal":0,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":2},{"BuildingId":39,"RoomId":3898,"Latitude":"40.7955","Longitude":"-77.8690","Campus":"UP","Building":"RecHall Computer Lab","Room":"MVB","RoomType":"Open Lab","WindowsAvailable":1,"WindowsTotal":1,"MacAvailable":0,"MacTotal":0,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":1},{"BuildingId":40,"RoomId":2958,"Latitude":"40.7995","Longitude":"-77.8559","Campus":"UP","Building":"Redifer Computer Lab","Room":"205","RoomType":"Open Lab","WindowsAvailable":10,"WindowsTotal":24,"MacAvailable":2,"MacTotal":3,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":27},{"BuildingId":41,"RoomId":27,"Latitude":"40.7947","Longitude":"-77.8626","Campus":"UP","Building":"Sackett Computer Lab","Room":"324A","RoomType":"Open Lab","WindowsAvailable":23,"WindowsTotal":26,"MacAvailable":0,"MacTotal":0,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":26},{"BuildingId":45,"RoomId":33,"Latitude":"40.7970","Longitude":"-77.8658","Campus":"UP","Building":"Sparks Computer Lab","Room":"15","RoomType":"Open Lab","WindowsAvailable":4,"WindowsTotal":14,"MacAvailable":4,"MacTotal":5,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":19},{"BuildingId":53,"RoomId":34,"Latitude":"40.7958","Longitude":"-77.8674","Campus":"UP","Building":"Waring Computer Lab","Room":"107","RoomType":"Open Lab","WindowsAvailable":18,"WindowsTotal":29,"MacAvailable":18,"MacTotal":22,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":51},{"BuildingId":53,"RoomId":35,"Latitude":"40.7958","Longitude":"-77.8674","Campus":"UP","Building":"Waring Computer Lab","Room":"108","RoomType":"Open Lab","WindowsAvailable":33,"WindowsTotal":51,"MacAvailable":0,"MacTotal":0,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":51},{"BuildingId":54,"RoomId":36,"Latitude":"40.8028","Longitude":"-77.8661","Campus":"UP","Building":"Warnock Computer Lab","Room":"107","RoomType":"Open Lab","WindowsAvailable":18,"WindowsTotal":29,"MacAvailable":7,"MacTotal":8,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":37},{"BuildingId":36,"RoomId":2198,"Latitude":"40.7978","Longitude":"-77.8663","Campus":"UP","Building":"West Pattee Computer Lab","Room":"W102","RoomType":"Open Lab","WindowsAvailable":19,"WindowsTotal":41,"MacAvailable":5,"MacTotal":9,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":50},{"BuildingId":36,"RoomId":2156,"Latitude":"40.7978","Longitude":"-77.8663","Campus":"UP","Building":"West Pattee Computer Lab","Room":"W116","RoomType":"Open Lab","WindowsAvailable":17,"WindowsTotal":67,"MacAvailable":0,"MacTotal":0,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":67},{"BuildingId":36,"RoomId":2155,"Latitude":"40.7978","Longitude":"-77.8663","Campus":"UP","Building":"West Pattee Computer Lab","Room":"W140","RoomType":"Open Lab","WindowsAvailable":0,"WindowsTotal":0,"MacAvailable":24,"MacTotal":40,"LinuxAvailable":0,"LinuxTotal":0,"Reserved":0,"TotalComputers":40}]