Downtime Database (2.4.2)

Download OpenAPI specification:Download

An application with a database that stores periods of scheduled telescope downtime for an observatory with an API to access those downtimes.

api

listDowntimes

query Parameters
limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

ordering
string

Which field to use when ordering the results.

starts_before
string

Starts before

starts_after
string

Starts after

ends_before
string

Ends before

ends_after
string

Ends after

site
string
Enum: "mba" "tst"

Site code

enclosure
string
Enum: "doma" "domb" "domc" "domd"

Enclosure code

telescope
string
Enum: "1m0a" "2m0a"

Telescope code

instrument_type
string
Enum: "1M0-INSTRUMENT-A" "1M0-INSTRUMENT-B" "2M0-INSTRUMENT-A"

Instrument type

reason
string

Reason contains

created_after
string

Created After

created_before
string

Created Before

modified_after
string

Modified After

modified_before
string

Modified Before

order
string
Enum: "start" "-start" "end" "-end" "modified" "-modified" "created" "-created"

order

Responses

Response samples

Content type
application/json
{}

createDowntime

Request Body schema:
start
required
string <date-time>

Start date/time in %Y-%m-%dT%H:%M:%S format

end
required
string <date-time>

End date/time in %Y-%m-%dT%H:%M:%S format

site
required
string
Enum: "tst" "mba"

Site code to apply downtime on

enclosure
required
string
Enum: "doma" "domd" "domc" "domb"

Enclosure code to apply downtime on

telescope
required
string
Enum: "1m0a" "2m0a"

Telescope code to apply downtime on

instrument_type
string
Enum: "" "1M0-INSTRUMENT-B" "1M0-INSTRUMENT-A" "2M0-INSTRUMENT-A"

Instrument type to apply downtime on

reason
string <= 3000 characters

A descriptive reason for why this downtime exists

Responses

Request samples

Content type
{
  • "start": "2019-08-24T14:15:22Z",
  • "end": "2019-08-24T14:15:22Z",
  • "site": "tst",
  • "enclosure": "doma",
  • "telescope": "1m0a",
  • "instrument_type": "",
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "start": "2019-08-24T14:15:22Z",
  • "end": "2019-08-24T14:15:22Z",
  • "site": "tst",
  • "enclosure": "doma",
  • "telescope": "1m0a",
  • "instrument_type": "",
  • "reason": "string"
}

retrieveDowntime

path Parameters
id
required
string

A unique integer value identifying this downtime.

query Parameters
ordering
string

Which field to use when ordering the results.

starts_before
string

Starts before

starts_after
string

Starts after

ends_before
string

Ends before

ends_after
string

Ends after

site
string
Enum: "mba" "tst"

Site code

enclosure
string
Enum: "doma" "domb" "domc" "domd"

Enclosure code

telescope
string
Enum: "1m0a" "2m0a"

Telescope code

instrument_type
string
Enum: "1M0-INSTRUMENT-A" "1M0-INSTRUMENT-B" "2M0-INSTRUMENT-A"

Instrument type

reason
string

Reason contains

created_after
string

Created After

created_before
string

Created Before

modified_after
string

Modified After

modified_before
string

Modified Before

order
string
Enum: "start" "-start" "end" "-end" "modified" "-modified" "created" "-created"

order

Responses

Response samples

Content type
application/json
{
  • "start": "2019-08-24T14:15:22Z",
  • "end": "2019-08-24T14:15:22Z",
  • "site": "tst",
  • "enclosure": "doma",
  • "telescope": "1m0a",
  • "instrument_type": "",
  • "reason": "string"
}

updateDowntime

path Parameters
id
required
string

A unique integer value identifying this downtime.

query Parameters
ordering
string

Which field to use when ordering the results.

starts_before
string

Starts before

starts_after
string

Starts after

ends_before
string

Ends before

ends_after
string

Ends after

site
string
Enum: "mba" "tst"

Site code

enclosure
string
Enum: "doma" "domb" "domc" "domd"

Enclosure code

telescope
string
Enum: "1m0a" "2m0a"

Telescope code

instrument_type
string
Enum: "1M0-INSTRUMENT-A" "1M0-INSTRUMENT-B" "2M0-INSTRUMENT-A"

Instrument type

reason
string

Reason contains

created_after
string

Created After

created_before
string

Created Before

modified_after
string

Modified After

modified_before
string

Modified Before

order
string
Enum: "start" "-start" "end" "-end" "modified" "-modified" "created" "-created"

order

Request Body schema:
start
required
string <date-time>

Start date/time in %Y-%m-%dT%H:%M:%S format

end
required
string <date-time>

End date/time in %Y-%m-%dT%H:%M:%S format

site
required
string
Enum: "tst" "mba"

Site code to apply downtime on

enclosure
required
string
Enum: "doma" "domd" "domc" "domb"

Enclosure code to apply downtime on

telescope
required
string
Enum: "1m0a" "2m0a"

Telescope code to apply downtime on

instrument_type
string
Enum: "" "1M0-INSTRUMENT-B" "1M0-INSTRUMENT-A" "2M0-INSTRUMENT-A"

Instrument type to apply downtime on

reason
string <= 3000 characters

A descriptive reason for why this downtime exists

Responses

Request samples

Content type
{
  • "start": "2019-08-24T14:15:22Z",
  • "end": "2019-08-24T14:15:22Z",
  • "site": "tst",
  • "enclosure": "doma",
  • "telescope": "1m0a",
  • "instrument_type": "",
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "start": "2019-08-24T14:15:22Z",
  • "end": "2019-08-24T14:15:22Z",
  • "site": "tst",
  • "enclosure": "doma",
  • "telescope": "1m0a",
  • "instrument_type": "",
  • "reason": "string"
}

partialUpdateDowntime

path Parameters
id
required
string

A unique integer value identifying this downtime.

query Parameters
ordering
string

Which field to use when ordering the results.

starts_before
string

Starts before

starts_after
string

Starts after

ends_before
string

Ends before

ends_after
string

Ends after

site
string
Enum: "mba" "tst"

Site code

enclosure
string
Enum: "doma" "domb" "domc" "domd"

Enclosure code

telescope
string
Enum: "1m0a" "2m0a"

Telescope code

instrument_type
string
Enum: "1M0-INSTRUMENT-A" "1M0-INSTRUMENT-B" "2M0-INSTRUMENT-A"

Instrument type

reason
string

Reason contains

created_after
string

Created After

created_before
string

Created Before

modified_after
string

Modified After

modified_before
string

Modified Before

order
string
Enum: "start" "-start" "end" "-end" "modified" "-modified" "created" "-created"

order

Request Body schema:
start
required
string <date-time>

Start date/time in %Y-%m-%dT%H:%M:%S format

end
required
string <date-time>

End date/time in %Y-%m-%dT%H:%M:%S format

site
required
string
Enum: "tst" "mba"

Site code to apply downtime on

enclosure
required
string
Enum: "doma" "domd" "domc" "domb"

Enclosure code to apply downtime on

telescope
required
string
Enum: "1m0a" "2m0a"

Telescope code to apply downtime on

instrument_type
string
Enum: "" "1M0-INSTRUMENT-B" "1M0-INSTRUMENT-A" "2M0-INSTRUMENT-A"

Instrument type to apply downtime on

reason
string <= 3000 characters

A descriptive reason for why this downtime exists

Responses

Request samples

Content type
{
  • "start": "2019-08-24T14:15:22Z",
  • "end": "2019-08-24T14:15:22Z",
  • "site": "tst",
  • "enclosure": "doma",
  • "telescope": "1m0a",
  • "instrument_type": "",
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "start": "2019-08-24T14:15:22Z",
  • "end": "2019-08-24T14:15:22Z",
  • "site": "tst",
  • "enclosure": "doma",
  • "telescope": "1m0a",
  • "instrument_type": "",
  • "reason": "string"
}

destroyDowntime

path Parameters
id
required
string

A unique integer value identifying this downtime.

query Parameters
ordering
string

Which field to use when ordering the results.

starts_before
string

Starts before

starts_after
string

Starts after

ends_before
string

Ends before

ends_after
string

Ends after

site
string
Enum: "mba" "tst"

Site code

enclosure
string
Enum: "doma" "domb" "domc" "domd"

Enclosure code

telescope
string
Enum: "1m0a" "2m0a"

Telescope code

instrument_type
string
Enum: "1M0-INSTRUMENT-A" "1M0-INSTRUMENT-B" "2M0-INSTRUMENT-A"

Instrument type

reason
string

Reason contains

created_after
string

Created After

created_before
string

Created Before

modified_after
string

Modified After

modified_before
string

Modified Before

order
string
Enum: "start" "-start" "end" "-end" "modified" "-modified" "created" "-created"

order

Responses

authprofile

createAddUpdateUser

This view is meant to be called by the Oauth Server when a new user account is created. This will create the corresponding user account within this Oauth client app and give it the same api-token, so the user can access this application with their api-token without needing to initially login with their password. This should also be called on token change or on any user info change.

Request Body schema:
any

Responses

Request samples

Content type
null

Response samples

Content type
application/json
null