Observatories API

From Deep Sky Chile

Deep Sky Chile Observatories API User Manual[edit]

The Deep Sky Chile Observatories API provides real-time information about the status of observatories, including the state of their roof and wall systems. This API allows users to query the current state of multiple observatories, displaying whether the roof and walls are open or closed.

Base URL[edit]

The base URL for accessing the API is: http://api.deepskychile.com/observatories

Endpoint[edit]

  • GET /observatories: Retrieves information about all observatories, including their roof and wall states.

Response Format[edit]

The API returns the data in JSON format with the following structure: {

   "observatories": [
       {
           "id": <observatory_id>,
           "name": <observatory_name>,
           "roofState": "<roof_state>",
           "wallState": "<wall_state>"
       },
       ...
   ]

}

Fields[edit]

  • id (integer): The unique identifier for the observatory.
  • name (string): The reference name of the observatory.
  • roofState (string): The state of the roof. Possible values are:
 * "open": The roof is open.
 * "closed": The roof is closed.
  • wallState (string): The state of the observatory's wall. Possible values are:
 * "open": The wall is open.
 * "closed": The wall is closed.

Example Response[edit]

{

   "observatories": [
       {
           "id": 1,
           "name": "Collective 1",
           "roofState": "closed",
           "wallState": "closed"
       },
       {
           "id": 2,
           "name": "Collective 2",
           "roofState": "closed",
           "wallState": "closed"
       },
       {
           "id": 3,
           "name": "Collective 3",
           "roofState": "closed",
           "wallState": "closed"
       },
       {
           "id": 6,
           "name": "Collective 4",
           "roofState": "closed",
           "wallState": "closed"
       }
   ]

}

Error Handling[edit]

If an error occurs while fetching the data, the API will return a generic HTTP error response (e.g., 500 Internal Server Error).

Example Request[edit]

To retrieve all observatories data, make a simple GET request to the following endpoint: GET http://api.deepskychile.com/observatories

Authentication[edit]

Currently, the API does not require authentication. Any future authentication requirements will be detailed here.

Conclusion[edit]

This API provides easy access to real-time data on the status of observatories at Deep Sky Chile. The roof and wall states are reported for each observatory, enabling users to track their operational status in a straightforward manner.

If you need further assistance or have additional questions about using the API, feel free to reach out.