Astro-COLIBRI

Astro-COLIBRI · GPT アクション

Astro-Colibri API

  • POST /latest_transientsGet Latest Transients
  • GET /source_detailsGet details of sources
  • GET /visibility_plots_detailedRetrieve detailed visibility plots

    This endpoint provides detailed visibility plots for astronomical observations.

  • GET /get_obs_listRetrieve observatory information

    This endpoint provides detailed information about a large number of astronomical observatories including their longitude and latitude.

元の API スキーマ
{
  "openapi": "3.1.0",
  "info": {
    "version": "1.0.0",
    "title": "Astro-Colibri API",
    "license": {
      "name": "MIT"
    }
  },
  "servers": [
    {
      "url": "https://astro-colibri.science"
    }
  ],
  "paths": {
    "/latest_transients": {
      "post": {
        "summary": "Get Latest Transients",
        "operationId": "getLatestTransients",
        "tags": [
          "transients"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filter": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "example": "FieldSpecification"
                      },
                      "field": {
                        "type": "string",
                        "example": "observatory"
                      },
                      "value": {
                        "type": "string",
                        "example": "icecube"
                      },
                      "operation": {
                        "type": "string",
                        "example": "=="
                      },
                      "typeField": {
                        "type": "string",
                        "example": "string"
                      }
                    },
                    "required": [
                      "type",
                      "field",
                      "value",
                      "operation",
                      "typeField"
                    ]
                  },
                  "time_range": {
                    "type": "object",
                    "properties": {
                      "max": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2024-01-19T00:00:00"
                      },
                      "min": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2024-01-04T00:00:00"
                      }
                    },
                    "required": [
                      "max",
                      "min"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List of transient events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/source_details": {
      "get": {
        "operationId": "getSourceDetails",
        "summary": "Get details of sources",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "Source name in the format 'IceCube-number'. Example: 'IceCube-231103A'",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Source information",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dec": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "ra": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    },
                    "trigger_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/visibility_plots_detailed": {
      "get": {
        "operationId": "getVisibilityPlots",
        "summary": "Retrieve detailed visibility plots",
        "description": "This endpoint provides detailed visibility plots for astronomical observations.",
        "parameters": [
          {
            "name": "pos_src",
            "in": "query",
            "required": true,
            "description": "Position of the source in a [ra, dec] format, where the array must contain exactly two elements, the right ascension (ra) and declination (dec).",
            "schema": {
              "type": "array",
              "items": {
                "type": "number"
              },
              "example": [
                44.5,
                -9
              ]
            }
          },
          {
            "name": "pos_obs",
            "in": "query",
            "required": true,
            "description": "Position of the observatory in a [lat, long, alt] format, where the array must contain exactly three elements, the latitude (lat), the longitude (long), and the altitude (alt).",
            "schema": {
              "type": "array",
              "items": {
                "type": "number"
              },
              "example": [
                -23.27,
                16.5,
                1835
              ]
            }
          },
          {
            "name": "source_name",
            "in": "query",
            "required": false,
            "description": "Name of the astronomical source.",
            "schema": {
              "type": "string",
              "example": "GRB 190829A"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Date for which the visibility plot is requested.",
            "schema": {
              "type": "string",
              "format": "date",
              "example": "2019-08-29"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with an url pointing to a visibility plot.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "img_url": {
                      "type": "string",
                      "format": "uri",
                      "example": "https://storage.googleapis.com/astro-colibri-visibility-plots/Astro-COLIBRI_visibility_ra44.5_dec-9.0_lat-23.27_long16.6_2024-01-28.png"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request if the parameters are invalid."
          },
          "404": {
            "description": "Not found if the data for the given parameters is not available."
          }
        }
      }
    },
    "/get_obs_list": {
      "get": {
        "operationId": "getObservatories",
        "summary": "Retrieve observatory information",
        "description": "This endpoint provides detailed information about a large number of astronomical observatories including their longitude and latitude.",
        "responses": {
          "200": {
            "description": "Successful response with the list of observatories.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "example": "Mauna Kea"
                    },
                    "lat": {
                      "type": "string",
                      "example": "19.703721211829983"
                    },
                    "long": {
                      "type": "string",
                      "example": "-155.4722"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request if the parameters are invalid."
          },
          "404": {
            "description": "Not found if the data for the given parameters is not available."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}