Science Archive API (2.2.4)

Download OpenAPI specification:Download

API documentation for the OCS Science Archive

Frames

listFrames

query Parameters
limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

proposal_id
string

proposal_id

configuration_type
string

configuration_type

instrument_id
string

instrument_id

reduction_level
string

reduction_level

site_id
string

site_id

telescope_id
string

telescope_id

primary_optical_element
string

primary_optical_element

observation_id
string

observation_id

request_id
string

request_id

start
string

start

end
string

end

DATE_OBS
string

DATE_OBS

DAY_OBS
string

DAY_OBS

dayobs
string

dayobs

basename
string

basename

basename_exact
string

basename_exact

OBJECT
string

OBJECT

target_name
string

target_name

target_name_exact
string

target_name_exact

L1PUBDAT
string

L1PUBDAT

public
string

public

EXPTIME
string

EXPTIME

exposure_time
string

exposure_time

OBSTYPE
string

OBSTYPE

PROPID
string

PROPID

INSTRUME
string

INSTRUME

SITEID
string

SITEID

TELID
string

TELID

FILTER
string

FILTER

BLKUID
string

BLKUID

REQNUM
string

REQNUM

RLEVEL
string

RLEVEL

covers
string

covers

exclude_OBSTYPE
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"

Exclude Configuration Types

exclude_configuration_type
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"

Exclude Configuration Types

intersects
string

intersects

ordering
string

Which field to use when ordering the results.

Responses

Response samples

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

createFrame

Request Body schema:
basename
required
string

File basename without extension

area
required
string or null

GeoJSON area that this frame covers

related_frames
Array of integers[ items ]
required
Array of objects[ items ]

Set of versions associated with this file

headers
required
object
reduction_level
integer [ -32768 .. 32767 ]

Reduction level of the frame

observation_day
required
string <date>

Observation day in %Y%m%d format

observation_date
string or null <date-time>

Time of observation in UTC

proposal_id
string <= 200 characters

Textual proposal id

instrument_id
string <= 64 characters

Instrument used

target_name
string <= 200 characters

Target object name

site_id
string <= 3 characters

Originating site code. Usually the 3 character airport code of the nearest airport

telescope_id
string <= 4 characters

Originating telescope 4 character code. Ex. 1m0a or 0m4b

exposure_time
number or null

Exposure time, in seconds

primary_optical_element
string <= 100 characters

Primary Optical Element used. FITS header: FILTER

public_date
string or null <date-time>

The date the frame becomes public

configuration_type
required
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"
observation_id
integer or null [ 0 .. 2147483647 ]

Unique id associated with the observation

request_id
integer or null [ 0 .. 2147483647 ]

Unique id associated with the request this observation is a part of

related_frame_filenames
required
Array of strings

Set of related frames for this file

Responses

Request samples

Content type
{
  • "basename": "string",
  • "area": "string",
  • "related_frames": [
    ],
  • "version_set": [
    ],
  • "headers": { },
  • "reduction_level": -32768,
  • "observation_day": "2019-08-24",
  • "observation_date": "2019-08-24T14:15:22Z",
  • "proposal_id": "string",
  • "instrument_id": "string",
  • "target_name": "string",
  • "site_id": "str",
  • "telescope_id": "stri",
  • "exposure_time": 0,
  • "primary_optical_element": "string",
  • "public_date": "2019-08-24T14:15:22Z",
  • "configuration_type": "SPECTRUM",
  • "observation_id": 2147483647,
  • "request_id": 2147483647,
  • "related_frame_filenames": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "basename": "string",
  • "area": "string",
  • "related_frames": [
    ],
  • "version_set": [
    ],
  • "filename": "string",
  • "url": "string",
  • "reduction_level": -32768,
  • "observation_day": "2019-08-24",
  • "observation_date": "2019-08-24T14:15:22Z",
  • "proposal_id": "string",
  • "instrument_id": "string",
  • "target_name": "string",
  • "site_id": "str",
  • "telescope_id": "stri",
  • "exposure_time": 0,
  • "primary_optical_element": "string",
  • "public_date": "2019-08-24T14:15:22Z",
  • "configuration_type": "SPECTRUM",
  • "observation_id": 2147483647,
  • "request_id": 2147483647
}

aggregateFields

Aggregate field values based on start/end time. Returns the unique values shared across all FITS files for site, telescope, instrument, filter, proposal, and obstype.

query Parameters
start
string

Start time

end
string

End time

aggregate_field
string
Default: "ALL"

Field to retrieve aggregated values for. Defaults to all fields if not specified.

site_id
string

Aggregate all fields for a given site

telescope_id
string

Aggregate all fields for a given telescope

primary_optical_element
string

Aggregate all fields for a given filter

instrument_id
string

Aggregate all fields for a given instrument

configuration_type
string

Aggregate all fields for a given observation type

proposal_id
string

Aggregate all fields for a given proposal ID

Responses

Response samples

Content type
application/json
{
  • "sites": [
    ],
  • "telescopes": [
    ],
  • "filters": [
    ],
  • "instruments": [
    ],
  • "obstypes": [
    ],
  • "proposals": [
    ]
}

retrieveFrame

path Parameters
id
required
string
query Parameters
proposal_id
string

proposal_id

configuration_type
string

configuration_type

instrument_id
string

instrument_id

reduction_level
string

reduction_level

site_id
string

site_id

telescope_id
string

telescope_id

primary_optical_element
string

primary_optical_element

observation_id
string

observation_id

request_id
string

request_id

start
string

start

end
string

end

DATE_OBS
string

DATE_OBS

DAY_OBS
string

DAY_OBS

dayobs
string

dayobs

basename
string

basename

basename_exact
string

basename_exact

OBJECT
string

OBJECT

target_name
string

target_name

target_name_exact
string

target_name_exact

L1PUBDAT
string

L1PUBDAT

public
string

public

EXPTIME
string

EXPTIME

exposure_time
string

exposure_time

OBSTYPE
string

OBSTYPE

PROPID
string

PROPID

INSTRUME
string

INSTRUME

SITEID
string

SITEID

TELID
string

TELID

FILTER
string

FILTER

BLKUID
string

BLKUID

REQNUM
string

REQNUM

RLEVEL
string

RLEVEL

covers
string

covers

exclude_OBSTYPE
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"

Exclude Configuration Types

exclude_configuration_type
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"

Exclude Configuration Types

intersects
string

intersects

ordering
string

Which field to use when ordering the results.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "basename": "string",
  • "area": "string",
  • "related_frames": [
    ],
  • "version_set": [
    ],
  • "filename": "string",
  • "url": "string",
  • "reduction_level": -32768,
  • "observation_day": "2019-08-24",
  • "observation_date": "2019-08-24T14:15:22Z",
  • "proposal_id": "string",
  • "instrument_id": "string",
  • "target_name": "string",
  • "site_id": "str",
  • "telescope_id": "stri",
  • "exposure_time": 0,
  • "primary_optical_element": "string",
  • "public_date": "2019-08-24T14:15:22Z",
  • "configuration_type": "SPECTRUM",
  • "observation_id": 2147483647,
  • "request_id": 2147483647
}

updateFrame

path Parameters
id
required
string
query Parameters
proposal_id
string

proposal_id

configuration_type
string

configuration_type

instrument_id
string

instrument_id

reduction_level
string

reduction_level

site_id
string

site_id

telescope_id
string

telescope_id

primary_optical_element
string

primary_optical_element

observation_id
string

observation_id

request_id
string

request_id

start
string

start

end
string

end

DATE_OBS
string

DATE_OBS

DAY_OBS
string

DAY_OBS

dayobs
string

dayobs

basename
string

basename

basename_exact
string

basename_exact

OBJECT
string

OBJECT

target_name
string

target_name

target_name_exact
string

target_name_exact

L1PUBDAT
string

L1PUBDAT

public
string

public

EXPTIME
string

EXPTIME

exposure_time
string

exposure_time

OBSTYPE
string

OBSTYPE

PROPID
string

PROPID

INSTRUME
string

INSTRUME

SITEID
string

SITEID

TELID
string

TELID

FILTER
string

FILTER

BLKUID
string

BLKUID

REQNUM
string

REQNUM

RLEVEL
string

RLEVEL

covers
string

covers

exclude_OBSTYPE
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"

Exclude Configuration Types

exclude_configuration_type
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"

Exclude Configuration Types

intersects
string

intersects

ordering
string

Which field to use when ordering the results.

Request Body schema:
basename
required
string

File basename without extension

area
required
string or null

GeoJSON area that this frame covers

related_frames
Array of integers[ items ]
required
Array of objects[ items ]

Set of versions associated with this file

headers
required
object
reduction_level
integer [ -32768 .. 32767 ]

Reduction level of the frame

observation_day
required
string <date>

Observation day in %Y%m%d format

observation_date
string or null <date-time>

Time of observation in UTC

proposal_id
string <= 200 characters

Textual proposal id

instrument_id
string <= 64 characters

Instrument used

target_name
string <= 200 characters

Target object name

site_id
string <= 3 characters

Originating site code. Usually the 3 character airport code of the nearest airport

telescope_id
string <= 4 characters

Originating telescope 4 character code. Ex. 1m0a or 0m4b

exposure_time
number or null

Exposure time, in seconds

primary_optical_element
string <= 100 characters

Primary Optical Element used. FITS header: FILTER

public_date
string or null <date-time>

The date the frame becomes public

configuration_type
required
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"
observation_id
integer or null [ 0 .. 2147483647 ]

Unique id associated with the observation

request_id
integer or null [ 0 .. 2147483647 ]

Unique id associated with the request this observation is a part of

related_frame_filenames
required
Array of strings

Set of related frames for this file

Responses

Request samples

Content type
{
  • "basename": "string",
  • "area": "string",
  • "related_frames": [
    ],
  • "version_set": [
    ],
  • "headers": { },
  • "reduction_level": -32768,
  • "observation_day": "2019-08-24",
  • "observation_date": "2019-08-24T14:15:22Z",
  • "proposal_id": "string",
  • "instrument_id": "string",
  • "target_name": "string",
  • "site_id": "str",
  • "telescope_id": "stri",
  • "exposure_time": 0,
  • "primary_optical_element": "string",
  • "public_date": "2019-08-24T14:15:22Z",
  • "configuration_type": "SPECTRUM",
  • "observation_id": 2147483647,
  • "request_id": 2147483647,
  • "related_frame_filenames": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "basename": "string",
  • "area": "string",
  • "related_frames": [
    ],
  • "version_set": [
    ],
  • "filename": "string",
  • "url": "string",
  • "reduction_level": -32768,
  • "observation_day": "2019-08-24",
  • "observation_date": "2019-08-24T14:15:22Z",
  • "proposal_id": "string",
  • "instrument_id": "string",
  • "target_name": "string",
  • "site_id": "str",
  • "telescope_id": "stri",
  • "exposure_time": 0,
  • "primary_optical_element": "string",
  • "public_date": "2019-08-24T14:15:22Z",
  • "configuration_type": "SPECTRUM",
  • "observation_id": 2147483647,
  • "request_id": 2147483647
}

partialUpdateFrame

path Parameters
id
required
string
query Parameters
proposal_id
string

proposal_id

configuration_type
string

configuration_type

instrument_id
string

instrument_id

reduction_level
string

reduction_level

site_id
string

site_id

telescope_id
string

telescope_id

primary_optical_element
string

primary_optical_element

observation_id
string

observation_id

request_id
string

request_id

start
string

start

end
string

end

DATE_OBS
string

DATE_OBS

DAY_OBS
string

DAY_OBS

dayobs
string

dayobs

basename
string

basename

basename_exact
string

basename_exact

OBJECT
string

OBJECT

target_name
string

target_name

target_name_exact
string

target_name_exact

L1PUBDAT
string

L1PUBDAT

public
string

public

EXPTIME
string

EXPTIME

exposure_time
string

exposure_time

OBSTYPE
string

OBSTYPE

PROPID
string

PROPID

INSTRUME
string

INSTRUME

SITEID
string

SITEID

TELID
string

TELID

FILTER
string

FILTER

BLKUID
string

BLKUID

REQNUM
string

REQNUM

RLEVEL
string

RLEVEL

covers
string

covers

exclude_OBSTYPE
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"

Exclude Configuration Types

exclude_configuration_type
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"

Exclude Configuration Types

intersects
string

intersects

ordering
string

Which field to use when ordering the results.

Request Body schema:
basename
required
string

File basename without extension

area
required
string or null

GeoJSON area that this frame covers

related_frames
Array of integers[ items ]
required
Array of objects[ items ]

Set of versions associated with this file

headers
required
object
reduction_level
integer [ -32768 .. 32767 ]

Reduction level of the frame

observation_day
required
string <date>

Observation day in %Y%m%d format

observation_date
string or null <date-time>

Time of observation in UTC

proposal_id
string <= 200 characters

Textual proposal id

instrument_id
string <= 64 characters

Instrument used

target_name
string <= 200 characters

Target object name

site_id
string <= 3 characters

Originating site code. Usually the 3 character airport code of the nearest airport

telescope_id
string <= 4 characters

Originating telescope 4 character code. Ex. 1m0a or 0m4b

exposure_time
number or null

Exposure time, in seconds

primary_optical_element
string <= 100 characters

Primary Optical Element used. FITS header: FILTER

public_date
string or null <date-time>

The date the frame becomes public

configuration_type
required
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"
observation_id
integer or null [ 0 .. 2147483647 ]

Unique id associated with the observation

request_id
integer or null [ 0 .. 2147483647 ]

Unique id associated with the request this observation is a part of

related_frame_filenames
required
Array of strings

Set of related frames for this file

Responses

Request samples

Content type
{
  • "basename": "string",
  • "area": "string",
  • "related_frames": [
    ],
  • "version_set": [
    ],
  • "headers": { },
  • "reduction_level": -32768,
  • "observation_day": "2019-08-24",
  • "observation_date": "2019-08-24T14:15:22Z",
  • "proposal_id": "string",
  • "instrument_id": "string",
  • "target_name": "string",
  • "site_id": "str",
  • "telescope_id": "stri",
  • "exposure_time": 0,
  • "primary_optical_element": "string",
  • "public_date": "2019-08-24T14:15:22Z",
  • "configuration_type": "SPECTRUM",
  • "observation_id": 2147483647,
  • "request_id": 2147483647,
  • "related_frame_filenames": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "basename": "string",
  • "area": "string",
  • "related_frames": [
    ],
  • "version_set": [
    ],
  • "filename": "string",
  • "url": "string",
  • "reduction_level": -32768,
  • "observation_day": "2019-08-24",
  • "observation_date": "2019-08-24T14:15:22Z",
  • "proposal_id": "string",
  • "instrument_id": "string",
  • "target_name": "string",
  • "site_id": "str",
  • "telescope_id": "stri",
  • "exposure_time": 0,
  • "primary_optical_element": "string",
  • "public_date": "2019-08-24T14:15:22Z",
  • "configuration_type": "SPECTRUM",
  • "observation_id": 2147483647,
  • "request_id": 2147483647
}

destroyFrame

path Parameters
id
required
string
query Parameters
proposal_id
string

proposal_id

configuration_type
string

configuration_type

instrument_id
string

instrument_id

reduction_level
string

reduction_level

site_id
string

site_id

telescope_id
string

telescope_id

primary_optical_element
string

primary_optical_element

observation_id
string

observation_id

request_id
string

request_id

start
string

start

end
string

end

DATE_OBS
string

DATE_OBS

DAY_OBS
string

DAY_OBS

dayobs
string

dayobs

basename
string

basename

basename_exact
string

basename_exact

OBJECT
string

OBJECT

target_name
string

target_name

target_name_exact
string

target_name_exact

L1PUBDAT
string

L1PUBDAT

public
string

public

EXPTIME
string

EXPTIME

exposure_time
string

exposure_time

OBSTYPE
string

OBSTYPE

PROPID
string

PROPID

INSTRUME
string

INSTRUME

SITEID
string

SITEID

TELID
string

TELID

FILTER
string

FILTER

BLKUID
string

BLKUID

REQNUM
string

REQNUM

RLEVEL
string

RLEVEL

covers
string

covers

exclude_OBSTYPE
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"

Exclude Configuration Types

exclude_configuration_type
string
Enum: "SPECTRUM" "SKYFLAT" "STANDARD" "GUIDE" "TRAILED" "CATALOG" "EXPERIMENTAL" "DARK" "LAMPFLAT" "BIAS" "EXPOSE"

Exclude Configuration Types

intersects
string

intersects

ordering
string

Which field to use when ordering the results.

Responses

getHeaders

Return the metadata (headers) associated with the archive record

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

getRelatedFrames

Return the related files associated with the archive record

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "basename": "string",
  • "area": "string",
  • "related_frames": [
    ],
  • "version_set": [
    ],
  • "filename": "string",
  • "url": "string",
  • "reduction_level": -32768,
  • "observation_day": "2019-08-24",
  • "observation_date": "2019-08-24T14:15:22Z",
  • "proposal_id": "string",
  • "instrument_id": "string",
  • "target_name": "string",
  • "site_id": "str",
  • "telescope_id": "stri",
  • "exposure_time": 0,
  • "primary_optical_element": "string",
  • "public_date": "2019-08-24T14:15:22Z",
  • "configuration_type": "SPECTRUM",
  • "observation_id": 2147483647,
  • "request_id": 2147483647
}

getFunpackedFile

Instruct the server to download the given Version (one part of a Frame), run funpack on it, and return the uncompressed FITS file to the client.

This is designed to be used by the Archive Client ZIP file support to automatically uncompress FITS files for clients that cannot do it themselves.

path Parameters
id
required
string

Responses

Response samples

Content type
application/octet-stream
<uncompressed file contents>

getZipArchive

Return a zip archive of files matching the frame IDs specified in the request

Request Body schema:
frame_ids
required
Array of integers[ items >= 1 ]

Frame IDs of images to include in zip archive

uncompress
boolean
Default: false

Whether to uncompress the FITS files prior to creating zip archive

Responses

Request samples

Content type
{
  • "frame_ids": [
    ],
  • "uncompress": false
}

Response samples

Content type
application/zip
<zip file contents>

Versions

listVersions

query Parameters
limit
integer

Number of results to return per page.

offset
integer

The initial index from which to return the results.

md5
string

md5

Responses

Response samples

Content type
application/json
{}

retrieveVersion

path Parameters
id
required
string

A unique integer value identifying this version.

query Parameters
md5
string

md5

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "created": "2019-08-24T14:15:22Z",
  • "key": "string",
  • "md5": "string",
  • "extension": "string",
  • "url": "string"
}

Users

retrieveUser

Responses

Response samples

Content type
application/json
{
  • "username": "string",
  • "profile": {
    }
}

Health

healthCheck

Endpoint to check the health of the Science Archive service

Responses

Response samples

Content type
application/json
"ok"

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

Authentication

getAuthToken

Obtain the auth token associated with the given user account

Request Body schema:
username
required
string
password
required
string

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "token": "string"
}

revokeApiToken

A simple POST request (empty request body) with user authentication information in the HTTP header will revoke a user's API Token.

Responses

Response samples

Content type
application/json
null