Configuration Database (2.1.1)

Download OpenAPI specification:Download

Observatory Configuration Database is a simple frontend to a relational database where we attempt to represent the physical state of a Telescope Network. It provides a RESTful API as well as HTML views of the data. This is used by other applications in the observatory control system to understand what components make up the observatory, and to allow for automated validation of component properties.This API documentation outlines the RESTful access, creation and modification of the components of the Configuration Database.

Sites

listSites

query Parameters
limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

name
string

Site name

code
string

3-letter site code

Responses

Response samples

Content type
application/json
{
  • "count": 123,
  • "results": [
    ]
}

createSite

Request Body schema:
name
string <= 200 characters

Site name

code
required
string <= 3 characters

3-letter site code

active
boolean

Whether the site is active and able to accept observations

timezone
required
integer [ -12 .. 14 ]

Offset from UTC in hours

restart
string

Daily restart time in UTC

tz
string <= 64 characters

Timezone Name

lat
number [ -90 .. 90 ]

Site latitude in decimal degrees

long
number [ -180 .. 180 ]

Site longitude in decimal degrees

elevation
required
integer [ -500 .. 100000 ]

Site elevation in meters

Responses

Request samples

Content type
{
  • "name": "string",
  • "code": "str",
  • "active": true,
  • "timezone": -12,
  • "restart": "string",
  • "tz": "string",
  • "lat": -90,
  • "long": -180,
  • "elevation": -500
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "code": "str",
  • "active": true,
  • "timezone": -12,
  • "restart": "string",
  • "tz": "string",
  • "lat": -90,
  • "long": -180,
  • "elevation": -500,
  • "enclosure_set": [
    ],
  • "__str__": "string"
}

retrieveSite

path Parameters
id
required
string

A unique integer value identifying this site.

query Parameters
name
string

Site name

code
string

3-letter site code

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "code": "str",
  • "active": true,
  • "timezone": -12,
  • "restart": "string",
  • "tz": "string",
  • "lat": -90,
  • "long": -180,
  • "elevation": -500,
  • "enclosure_set": [
    ],
  • "__str__": "string"
}

updateSite

path Parameters
id
required
string

A unique integer value identifying this site.

query Parameters
name
string

Site name

code
string

3-letter site code

Request Body schema:
name
string <= 200 characters

Site name

code
required
string <= 3 characters

3-letter site code

active
boolean

Whether the site is active and able to accept observations

timezone
required
integer [ -12 .. 14 ]

Offset from UTC in hours

restart
string

Daily restart time in UTC

tz
string <= 64 characters

Timezone Name

lat
number [ -90 .. 90 ]

Site latitude in decimal degrees

long
number [ -180 .. 180 ]

Site longitude in decimal degrees

elevation
required
integer [ -500 .. 100000 ]

Site elevation in meters

Responses

Request samples

Content type
{