Skip to content

Instantly share code, notes, and snippets.

@stratosgear
Last active Mar 3, 2020
Embed
What would you like to do?
{
"openapi": "3.0.2",
"info": {
"title": "rapidxmm",
"version": "0.2.45",
"description": "API server for upper limits requests, currently supporting XMM only"
},
"paths": {
"/api/v1/version": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"summary": "Version",
"operationId": "version_api_v1_version_get"
}
},
"/api/v1/auth/access-token": {
"post": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Token"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"login",
"auth"
],
"summary": "Login Access Token",
"description": "OAuth2 compatible token login, get an access token for future requests",
"operationId": "login_access_token_api_v1_auth_access-token_post",
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/Body_login_access_token_api_v1_auth_access-token_post"
}
}
},
"required": true
}
}
},
"/api/v1/auth/test-token": {
"post": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
}
},
"tags": [
"login",
"auth"
],
"summary": "Post Token",
"description": "Test access token",
"operationId": "post_token_api_v1_auth_test-token_post",
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/v1/auth/user": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
}
},
"tags": [
"login",
"auth"
],
"summary": "Get User",
"description": "Test access token",
"operationId": "get_user_api_v1_auth_user_get",
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/v1/auth/refresh": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Token"
}
}
}
}
},
"tags": [
"login",
"auth"
],
"summary": "Get Refresh",
"description": "Refresh access token",
"operationId": "get_refresh_api_v1_auth_refresh_get",
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/v1/auth/password-recovery/{email}": {
"post": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Msg"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"login",
"auth"
],
"summary": "Post Password Recover",
"description": "Password Recovery",
"operationId": "post_password_recover_api_v1_auth_password-recovery__email__post",
"parameters": [
{
"required": true,
"schema": {
"title": "Email",
"type": "string"
},
"name": "email",
"in": "path"
}
]
}
},
"/api/v1/auth/reset-password/": {
"post": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Msg"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"login",
"auth"
],
"summary": "Post Reset Password",
"description": "Reset password",
"operationId": "post_reset_password_api_v1_auth_reset-password__post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Body_post_reset_password_api_v1_auth_reset-password__post"
}
}
},
"required": true
}
}
},
"/api/v1/auth/hasura": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
},
"tags": [
"login",
"auth"
],
"summary": "Get Hasura",
"description": "Implements an authentication webhook for the Hasura Apollo client.\nDescribed at:\n https://docs.hasura.io/1.0/graphql/manual/auth/authentication/webhook.html\nAccepts the JWT user token from the Hasura server and responds with user\naccess rights and roles. Hardcoded roles for now.",
"operationId": "get_hasura_api_v1_auth_hasura_get",
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/v1/users/": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response_Read_Users_Api_V1_Users__Get",
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"users"
],
"summary": "Read Users",
"description": "Retrieve users.",
"operationId": "read_users_api_v1_users__get",
"parameters": [
{
"required": false,
"schema": {
"title": "Skip",
"type": "integer",
"default": 0
},
"name": "skip",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Limit",
"type": "integer",
"default": 100
},
"name": "limit",
"in": "query"
}
],
"security": [
{
"OAuth2PasswordBearer": []
}
]
},
"post": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"users"
],
"summary": "Create User",
"description": "Create new user.",
"operationId": "create_user_api_v1_users__post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserCreate"
}
}
},
"required": true
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/v1/users/me": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
}
},
"tags": [
"users"
],
"summary": "Read User Me",
"description": "Get current user.",
"operationId": "read_user_me_api_v1_users_me_get",
"security": [
{
"OAuth2PasswordBearer": []
}
]
},
"put": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"users"
],
"summary": "Update User Me",
"description": "Update own user.",
"operationId": "update_user_me_api_v1_users_me_put",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Body_update_user_me_api_v1_users_me_put"
}
}
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/v1/users/open": {
"post": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"users"
],
"summary": "Create User Open",
"description": "Create new user without the need to be logged in.",
"operationId": "create_user_open_api_v1_users_open_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Body_create_user_open_api_v1_users_open_post"
}
}
},
"required": true
}
}
},
"/api/v1/users/{user_id}": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"users"
],
"summary": "Read User By Id",
"description": "Get a specific user by id.",
"operationId": "read_user_by_id_api_v1_users__user_id__get",
"parameters": [
{
"required": true,
"schema": {
"title": "User_Id",
"type": "integer"
},
"name": "user_id",
"in": "path"
}
],
"security": [
{
"OAuth2PasswordBearer": []
}
]
},
"put": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"users"
],
"summary": "Update User",
"description": "Update a user.",
"operationId": "update_user_api_v1_users__user_id__put",
"parameters": [
{
"required": true,
"schema": {
"title": "User_Id",
"type": "integer"
},
"name": "user_id",
"in": "path"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserUpdate"
}
}
},
"required": true
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/v1/utils/test-celery/": {
"post": {
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Msg"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"utils"
],
"summary": "Test Celery",
"description": "Test Celery worker.",
"operationId": "test_celery_api_v1_utils_test-celery__post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Msg"
}
}
},
"required": true
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/v1/utils/test-email/": {
"post": {
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Msg"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"utils"
],
"summary": "Test Email",
"description": "Test emails.",
"operationId": "test_email_api_v1_utils_test-email__post",
"parameters": [
{
"required": true,
"schema": {
"title": "Email_To",
"type": "string",
"format": "email"
},
"name": "email_to",
"in": "query"
}
],
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/v1/utils/npixels": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PointInSky"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"utils"
],
"summary": "Get list of npixels around a point",
"description": "Helper endpoint to convert (ra, dec) to a list of npixels for a given nside",
"operationId": "calculate_npixels_api_v1_utils_npixels_get",
"parameters": [
{
"description": "Right Ascension",
"required": true,
"schema": {
"title": "Ra",
"type": "number",
"description": "Right Ascension"
},
"name": "ra",
"in": "query"
},
{
"description": "Declination",
"required": true,
"schema": {
"title": "Dec",
"type": "number",
"description": "Declination"
},
"name": "dec",
"in": "query"
},
{
"description": "Nside",
"required": false,
"schema": {
"title": "Nside",
"type": "integer",
"description": "Nside",
"default": 15
},
"name": "nside",
"in": "query"
}
]
}
},
"/api/v1/utils/coords": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PointInSky"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"utils"
],
"summary": "Get coords of an npixel",
"description": "Helper endpoint to convert (ra, dec) to a list of npixels for a given nside",
"operationId": "calculate_npixels_api_v1_utils_coords_get",
"parameters": [
{
"description": "The npixel value",
"required": false,
"schema": {
"title": "Npixel",
"type": "number",
"description": "The npixel value",
"default": 0
},
"name": "npixel",
"in": "query"
},
{
"description": "Nside",
"required": false,
"schema": {
"title": "Nside",
"type": "integer",
"description": "Nside",
"default": 15
},
"name": "nside",
"in": "query"
}
]
}
},
"/api/v1/utils/ul_as_json": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response_Ul_As_Json_Api_V1_Utils_Ul_As_Json_Get",
"type": "array",
"items": {
"$ref": "#/components/schemas/UpperLimit"
}
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"utils"
],
"summary": "Get a number of random Upper Limits as a JSON response",
"operationId": "ul_as_json_api_v1_utils_ul_as_json_get",
"parameters": [
{
"description": "Number of UpperLimits to get",
"required": false,
"schema": {
"title": "Count",
"type": "integer",
"description": "Number of UpperLimits to get",
"default": 4
},
"name": "count",
"in": "query"
}
]
}
},
"/api/v1/utils/ul_as_csv": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"utils"
],
"summary": "Get a number of random Upper Limits as a .csv response",
"operationId": "ul_as_json_api_v1_utils_ul_as_csv_get",
"parameters": [
{
"description": "Number of UpperLimits to get",
"required": false,
"schema": {
"title": "Count",
"type": "integer",
"description": "Number of UpperLimits to get",
"default": 4
},
"name": "count",
"in": "query"
}
]
}
},
"/api/v1/items/": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response_Read_Items_Api_V1_Items__Get",
"type": "array",
"items": {
"$ref": "#/components/schemas/Item"
}
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"items"
],
"summary": "Read Items",
"description": "Retrieve items.",
"operationId": "read_items_api_v1_items__get",
"parameters": [
{
"required": false,
"schema": {
"title": "Skip",
"type": "integer",
"default": 0
},
"name": "skip",
"in": "query"
},
{
"required": false,
"schema": {
"title": "Limit",
"type": "integer",
"default": 100
},
"name": "limit",
"in": "query"
}
],
"security": [
{
"OAuth2PasswordBearer": []
}
]
},
"post": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Item"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"items"
],
"summary": "Create Item",
"description": "Create new item.",
"operationId": "create_item_api_v1_items__post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ItemCreate"
}
}
},
"required": true
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/v1/items/{id}": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Item"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"items"
],
"summary": "Read User Me",
"description": "Get item by ID.",
"operationId": "read_user_me_api_v1_items__id__get",
"parameters": [
{
"required": true,
"schema": {
"title": "Id",
"type": "integer"
},
"name": "id",
"in": "path"
}
],
"security": [
{
"OAuth2PasswordBearer": []
}
]
},
"put": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Item"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"items"
],
"summary": "Update Item",
"description": "Update an item.",
"operationId": "update_item_api_v1_items__id__put",
"parameters": [
{
"required": true,
"schema": {
"title": "Id",
"type": "integer"
},
"name": "id",
"in": "path"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ItemUpdate"
}
}
},
"required": true
},
"security": [
{
"OAuth2PasswordBearer": []
}
]
},
"delete": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Item"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"items"
],
"summary": "Delete Item",
"description": "Delete an item.",
"operationId": "delete_item_api_v1_items__id__delete",
"parameters": [
{
"required": true,
"schema": {
"title": "Id",
"type": "integer"
},
"name": "id",
"in": "path"
}
],
"security": [
{
"OAuth2PasswordBearer": []
}
]
}
},
"/api/v1/ulimits/json": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response_Upperlimit_From_Db_As_Row_Api_V1_Ulimits_Json_Get",
"type": "array",
"items": {
"$ref": "#/components/schemas/UpperLimit"
}
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"ulimits"
],
"summary": "Upperlimit From Db As Row",
"description": "Given a specific RA/DEC point in the sky get all Upper Limits there.\nCan filter by Observation type and/or Instrument",
"operationId": "upperlimit_from_db_as_row_api_v1_ulimits_json_get",
"parameters": [
{
"description": "Right Ascension",
"required": true,
"schema": {
"title": "Ra",
"type": "number",
"description": "Right Ascension"
},
"name": "ra",
"in": "query"
},
{
"description": "Declination",
"required": true,
"schema": {
"title": "Dec",
"type": "number",
"description": "Declination"
},
"name": "dec",
"in": "query"
},
{
"description": "Filter on Observation type",
"required": false,
"schema": {
"title": "Filter_Obstype",
"type": "string",
"description": "Filter on Observation type"
},
"name": "filter_obstype",
"in": "query"
},
{
"description": "Filter on Instrument",
"required": false,
"schema": {
"title": "Filter_Instrum",
"type": "string",
"description": "Filter on Instrument"
},
"name": "filter_instrum",
"in": "query"
}
]
}
},
"/api/v1/ulimits/bulk/json": {
"post": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response_Upperlimit_From_Db_As_Row_Api_V1_Ulimits_Bulk_Json_Post",
"type": "array",
"items": {
"$ref": "#/components/schemas/UpperLimit"
}
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"ulimits"
],
"summary": "Upperlimit From Db As Row",
"description": "Given an array of specific RA/DEC points in the sky get all Upper Limits there.\nCan filter by Observation type and/or Instrument",
"operationId": "upperlimit_from_db_as_row_api_v1_ulimits_bulk_json_post",
"parameters": [
{
"description": "Filter on Observation type",
"required": false,
"schema": {
"title": "Filter_Obstype",
"type": "string",
"description": "Filter on Observation type"
},
"name": "filter_obstype",
"in": "query"
},
{
"description": "Filter on Instrument",
"required": false,
"schema": {
"title": "Filter_Instrum",
"type": "string",
"description": "Filter on Instrument"
},
"name": "filter_instrum",
"in": "query"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"title": "Radecs",
"allOf": [
{
"$ref": "#/components/schemas/BulkRaDec"
}
],
"description": "Array of ra/dec"
}
}
},
"required": true
}
}
},
"/api/v1/ulimits/npixel/json": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response_Upperlimit_From_Db_From_Npixel_As_Row_Api_V1_Ulimits_Npixel_Json_Get",
"type": "array",
"items": {
"$ref": "#/components/schemas/UpperLimit"
}
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"ulimits"
],
"summary": "Upperlimit From Db From Npixel As Row",
"description": "Lookup for Upper Limits in a specific point in the sky, based on npixel values.\nThe nside order is always at nside 15.\nThis is used mainly in testing in order to have any easy way to do random lookups\nacross the whole sky. ",
"operationId": "upperlimit_from_db_from_npixel_as_row_api_v1_ulimits_npixel_json_get",
"parameters": [
{
"description": "Npixel number",
"required": true,
"schema": {
"title": "Npixel",
"type": "integer",
"description": "Npixel number"
},
"name": "npixel",
"in": "query"
},
{
"description": "Filter on Observation type",
"required": false,
"schema": {
"title": "Filter_Obstype",
"type": "string",
"description": "Filter on Observation type"
},
"name": "filter_obstype",
"in": "query"
},
{
"description": "Filter on Instrument",
"required": false,
"schema": {
"title": "Filter_Instrum",
"type": "string",
"description": "Filter on Instrument"
},
"name": "filter_instrum",
"in": "query"
}
]
}
},
"/api/v1/ulimits/npixel/bulk/json": {
"post": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response_Upperlimit_From_Db_From_Bulk_Npixels_As_Row_Api_V1_Ulimits_Npixel_Bulk_Json_Post",
"type": "array",
"items": {
"$ref": "#/components/schemas/UpperLimit"
}
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"ulimits"
],
"summary": "Upperlimit From Db From Bulk Npixels As Row",
"description": "Lookup for Upper Limits in multiple points in the sky, based on npixel values.\nThe nside order is always at nside 15.\nThis is used mainly in testing in order to have any easy way to do random lookups\nacross the whole sky. ",
"operationId": "upperlimit_from_db_from_bulk_npixels_as_row_api_v1_ulimits_npixel_bulk_json_post",
"parameters": [
{
"description": "Filter on Observation type",
"required": false,
"schema": {
"title": "Filter_Obstype",
"type": "string",
"description": "Filter on Observation type"
},
"name": "filter_obstype",
"in": "query"
},
{
"description": "Filter on Instrument",
"required": false,
"schema": {
"title": "Filter_Instrum",
"type": "string",
"description": "Filter on Instrument"
},
"name": "filter_instrum",
"in": "query"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"title": "Npixels",
"type": "array",
"items": {
"type": "integer"
},
"description": "Array of Npixel numbers"
}
}
},
"required": true
}
}
},
"/api/v1/ulimits/csv": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response_Upperlimit_From_Db_As_Json_Api_V1_Ulimits_Csv_Get",
"type": "array",
"items": {
"$ref": "#/components/schemas/UpperLimit"
}
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"ulimits"
],
"summary": "Upperlimit From Db As Json",
"description": "This ought to return Upper limits in csv format. Not Implemented yet!",
"operationId": "upperlimit_from_db_as_json_api_v1_ulimits_csv_get",
"parameters": [
{
"description": "Right Ascension",
"required": true,
"schema": {
"title": "Ra",
"type": "number",
"description": "Right Ascension"
},
"name": "ra",
"in": "query"
},
{
"description": "Declination",
"required": true,
"schema": {
"title": "Dec",
"type": "number",
"description": "Declination"
},
"name": "dec",
"in": "query"
},
{
"description": "Radius, in arcminutes",
"required": false,
"schema": {
"title": "Radius",
"type": "number",
"description": "Radius, in arcminutes",
"default": 0
},
"name": "radius",
"in": "query"
}
]
}
},
"/api/v1/jobs/{mission}": {
"post": {
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Job"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"jobs"
],
"summary": "Start",
"description": "Start process to calculate Upper Limits of a specific Mission Observation ID",
"operationId": "start_api_v1_jobs__mission__post",
"parameters": [
{
"required": true,
"schema": {
"title": "Mission",
"enum": [
"xmm"
],
"type": "string"
},
"name": "mission",
"in": "path"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JobData"
}
}
},
"required": true
}
}
},
"/api/v1/jobs/bulk/{mission}": {
"post": {
"responses": {
"201": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BulkJob"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"jobs"
],
"summary": "Start",
"description": "Start tasks of calculating Upper Limits of a specific Mission Observation ID",
"operationId": "start_api_v1_jobs_bulk__mission__post",
"parameters": [
{
"required": true,
"schema": {
"title": "Mission",
"enum": [
"xmm"
],
"type": "string"
},
"name": "mission",
"in": "path"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JobData"
}
}
},
"required": true
}
}
},
"/api/v1/jobs/cleanup/{jobid}": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Job"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"tags": [
"jobs"
],
"summary": "Cleanup",
"description": "Start process to calculate Upper Limits of a specific Mission Observation ID",
"operationId": "cleanup_api_v1_jobs_cleanup__jobid__get",
"parameters": [
{
"required": true,
"schema": {
"title": "Jobid",
"type": "integer"
},
"name": "jobid",
"in": "path"
}
]
}
}
},
"components": {
"schemas": {
"RaDec": {
"title": "RaDec",
"required": [
"ra",
"dec"
],
"type": "object",
"properties": {
"ra": {
"title": "Ra",
"type": "number"
},
"dec": {
"title": "Dec",
"type": "number"
}
}
},
"Body_create_user_open_api_v1_users_open_post": {
"title": "Body_create_user_open_api_v1_users_open_post",
"required": [
"password",
"email"
],
"type": "object",
"properties": {
"password": {
"title": "Password",
"type": "string"
},
"email": {
"title": "Email",
"type": "string",
"format": "email"
},
"full_name": {
"title": "Full_Name",
"type": "string"
}
}
},
"BulkJob": {
"title": "BulkJob",
"required": [
"id",
"obsids",
"batch_name"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "integer"
},
"mission": {
"title": "Mission",
"enum": [
"xmm"
],
"type": "string",
"default": "xmm"
},
"overwrite": {
"title": "Overwrite",
"type": "boolean",
"default": false
},
"use_pps": {
"title": "Use_Pps",
"type": "boolean",
"default": false
},
"keep_products": {
"title": "Keep_Products",
"type": "boolean",
"default": false
},
"quick_ingestion": {
"title": "Quick_Ingestion",
"type": "boolean",
"default": false
},
"exec_date": {
"title": "Exec_Date",
"type": "integer",
"default": 1583244959
},
"state": {
"title": "State",
"enum": [
"running",
"done",
"failed"
],
"type": "string",
"default": "running"
},
"obsids": {
"title": "Obsids",
"type": "string"
},
"batch_name": {
"title": "Batch_Name",
"type": "string"
}
}
},
"Flags": {
"title": "Flags",
"type": "object",
"properties": {
"bad_area_img": {
"title": "Bad_Area_Img",
"type": "boolean",
"default": false
},
"bad_area_bkg": {
"title": "Bad_Area_Bkg",
"type": "boolean",
"default": false
},
"bad_bkg": {
"title": "Bad_Bkg",
"type": "boolean",
"default": false
},
"near_src": {
"title": "Near_Src",
"type": "boolean",
"default": false
}
}
},
"Band": {
"title": "Band",
"type": "object",
"properties": {
"exposure": {
"title": "Exposure",
"type": "number",
"default": 0
},
"src_counts": {
"title": "Src_Counts",
"type": "integer",
"default": 0
},
"bck_counts": {
"title": "Bck_Counts",
"type": "number",
"default": 0
},
"ul_sigma1": {
"title": "Ul_Sigma1",
"type": "number",
"default": 0
},
"ul_sigma2": {
"title": "Ul_Sigma2",
"type": "number",
"default": 0
},
"ul_sigma3": {
"title": "Ul_Sigma3",
"type": "number",
"default": 0
},
"flags": {
"title": "Flags",
"allOf": [
{
"$ref": "#/components/schemas/Flags"
}
],
"default": {
"bad_area_img": false,
"bad_area_bkg": false,
"bad_bkg": false,
"near_src": false
}
}
}
},
"JobData": {
"title": "JobData",
"type": "object",
"properties": {
"obsid": {
"title": "Observation ID",
"type": "string",
"description": "Must be a valid Observation ID for the requested Mission"
},
"obsids": {
"title": "Bulk Observation IDs",
"type": "string",
"description": "Comma or new line separated list of Observation IDs"
},
"batch_name": {
"title": "Batch Name",
"type": "string",
"description": "If submiting multiple Observations, group them all under the same batch name, so you can monitor them easier."
},
"overwrite": {
"title": "Overide Upper Limits",
"type": "boolean",
"description": "Whether or not to allow the same Observation ID to be recalculated.",
"default": false
},
"use_pps": {
"title": "Use PPS Backgrounds",
"type": "boolean",
"description": "Whether to use XSA .PPS backgrounds or use custom RapidXMM background calculations.",
"default": false
},
"keep_products": {
"title": "Keep Products",
"type": "boolean",
"description": "Whether to keep the generated RapidXMM products once database ingestion completes. Allows investigation of generated products for debugging purposes.",
"default": false
},
"quick_ingestion": {
"title": "Quick Ingestion",
"type": "boolean",
"description": "Debug only. With Quick Ingestion on, only the limited number of npixels that are reported in the execution quality report are ingested. This speeds up the ingestion process dramatically (at the cost of only storing a few npixels only)",
"default": false
}
}
},
"Token": {
"title": "Token",
"required": [
"access_token",
"token_type"
],
"type": "object",
"properties": {
"access_token": {
"title": "Access_Token",
"type": "string"
},
"token_type": {
"title": "Token_Type",
"type": "string"
}
}
},
"BulkRaDec": {
"title": "BulkRaDec",
"type": "object",
"properties": {
"bulk": {
"title": "Bulk",
"type": "array",
"items": {
"$ref": "#/components/schemas/RaDec"
},
"default": []
}
}
},
"Item": {
"title": "Item",
"required": [
"title",
"id",
"owner_id"
],
"type": "object",
"properties": {
"title": {
"title": "Title",
"type": "string"
},
"description": {
"title": "Description",
"type": "string"
},
"id": {
"title": "Id",
"type": "integer"
},
"owner_id": {
"title": "Owner_Id",
"type": "integer"
}
}
},
"UpperLimit": {
"title": "UpperLimit",
"required": [
"ra",
"dec"
],
"type": "object",
"properties": {
"ra": {
"title": "Ra",
"exclusiveMaximum": 360,
"minimum": 0,
"type": "number"
},
"dec": {
"title": "Dec",
"maximum": 90,
"minimum": -90,
"type": "number"
},
"id": {
"title": "Id",
"type": "integer"
},
"npixel": {
"title": "Npixel",
"type": "integer",
"default": 0
},
"nside": {
"title": "Nside",
"type": "integer",
"default": 0
},
"obsid": {
"title": "Obsid",
"type": "string"
},
"obstype": {
"title": "Obstype",
"enum": [
"slew",
"pointed"
],
"type": "string",
"default": "pointed"
},
"start_date": {
"title": "Start_Date",
"type": "string",
"default": ""
},
"end_date": {
"title": "End_Date",
"type": "string",
"default": ""
},
"start_timestamp": {
"title": "Start_Timestamp",
"type": "integer",
"default": 0
},
"eef": {
"title": "Eef",
"type": "number",
"default": 0
},
"area_ratio": {
"title": "Area_Ratio",
"type": "number",
"default": 0
},
"instrum": {
"title": "Instrum",
"enum": [
"M1",
"M2",
"PN",
"INVALID"
],
"type": "string"
},
"filt": {
"title": "Filt",
"enum": [
"Open",
"Thin1",
"Thin2",
"Medium",
"Thick",
"INVALID"
],
"type": "string"
},
"band6": {
"$ref": "#/components/schemas/Band"
},
"band7": {
"$ref": "#/components/schemas/Band"
},
"band8": {
"$ref": "#/components/schemas/Band"
}
}
},
"Body_update_user_me_api_v1_users_me_put": {
"title": "Body_update_user_me_api_v1_users_me_put",
"type": "object",
"properties": {
"password": {
"title": "Password",
"type": "string"
},
"full_name": {
"title": "Full_Name",
"type": "string"
},
"email": {
"title": "Email",
"type": "string",
"format": "email"
}
}
},
"Body_login_access_token_api_v1_auth_access-token_post": {
"title": "Body_login_access_token_api_v1_auth_access-token_post",
"required": [
"username",
"password"
],
"type": "object",
"properties": {
"grant_type": {
"title": "Grant_Type",
"pattern": "password",
"type": "string"
},
"username": {
"title": "Username",
"type": "string"
},
"password": {
"title": "Password",
"type": "string"
},
"scope": {
"title": "Scope",
"type": "string",
"default": ""
},
"client_id": {
"title": "Client_Id",
"type": "string"
},
"client_secret": {
"title": "Client_Secret",
"type": "string"
}
}
},
"Job": {
"title": "Job",
"required": [
"id"
],
"type": "object",
"properties": {
"id": {
"title": "Id",
"type": "integer"
},
"mission": {
"title": "Mission",
"enum": [
"xmm"
],
"type": "string",
"default": "xmm"
},
"overwrite": {
"title": "Overwrite",
"type": "boolean",
"default": false
},
"use_pps": {
"title": "Use_Pps",
"type": "boolean",
"default": false
},
"keep_products": {
"title": "Keep_Products",
"type": "boolean",
"default": false
},
"quick_ingestion": {
"title": "Quick_Ingestion",
"type": "boolean",
"default": false
},
"exec_date": {
"title": "Exec_Date",
"type": "integer",
"default": 1583244959
},
"obsid": {
"title": "Obsid",
"type": "string"
},
"last_updated": {
"title": "Last_Updated",
"type": "string",
"format": "date-time",
"default": "2020-03-03T14:15:59.236688"
},
"state": {
"title": "State",
"enum": [
"submitted",
"initializing",
"downloading",
"executing",
"storing",
"cleaning",
"done",
"failed"
],
"type": "string",
"default": "submitted"
},
"input_dir": {
"title": "Input_Dir",
"type": "string",
"format": "directory-path"
},
"output_dir": {
"title": "Output_Dir",
"type": "string",
"format": "directory-path"
},
"log": {
"title": "Log",
"type": "string",
"default": ""
},
"report": {
"title": "Report"
},
"bulk_job_id": {
"title": "Bulk_Job_Id",
"type": "integer"
},
"warning_flag": {
"title": "Warning_Flag",
"type": "integer",
"default": 0
}
}
},
"UserUpdate": {
"title": "UserUpdate",
"type": "object",
"properties": {
"email": {
"title": "Email",
"type": "string"
},
"is_active": {
"title": "Is_Active",
"type": "boolean",
"default": true
},
"is_superuser": {
"title": "Is_Superuser",
"type": "boolean",
"default": false
},
"full_name": {
"title": "Full_Name",
"type": "string"
},
"id": {
"title": "Id",
"type": "integer"
},
"password": {
"title": "Password",
"type": "string"
}
}
},
"PointInSky": {
"title": "PointInSky",
"type": "object",
"properties": {
"nside": {
"title": "Healpix nside",
"type": "integer",
"description": "nside order to perform calculations on.",
"default": 15
},
"ra": {
"title": "Right Ascension",
"exclusiveMaximum": 360,
"minimum": 0,
"type": "number",
"description": "Right Ascension description",
"default": 0
},
"dec": {
"title": "Declination",
"maximum": 90,
"minimum": -90,
"type": "number",
"description": "Declination description",
"default": 0
},
"npixel": {
"title": "npixel value",
"minimum": 0,
"type": "integer",
"description": "npixel value",
"default": 0
}
},
"description": "PointInSky describes a Point in the sky with either an npixel value or RA/DEC\ncoordinates.\n\nIt can also perform coordinate conversions between RA/DEC and healpy npixels and\nvice versa."
},
"UserCreate": {
"title": "UserCreate",
"required": [
"email",
"password"
],
"type": "object",
"properties": {
"email": {
"title": "Email",
"type": "string"
},
"is_active": {
"title": "Is_Active",
"type": "boolean",
"default": true
},
"is_superuser": {
"title": "Is_Superuser",
"type": "boolean",
"default": false
},
"full_name": {
"title": "Full_Name",
"type": "string"
},
"id": {
"title": "Id",
"type": "integer"
},
"password": {
"title": "Password",
"type": "string"
}
}
},
"Msg": {
"title": "Msg",
"required": [
"msg"
],
"type": "object",
"properties": {
"msg": {
"title": "Msg",
"type": "string"
}
}
},
"Body_post_reset_password_api_v1_auth_reset-password__post": {
"title": "Body_post_reset_password_api_v1_auth_reset-password__post",
"required": [
"token",
"new_password"
],
"type": "object",
"properties": {
"token": {
"title": "Token",
"type": "string"
},
"new_password": {
"title": "New_Password",
"type": "string"
}
}
},
"User": {
"title": "User",
"type": "object",
"properties": {
"email": {
"title": "Email",
"type": "string"
},
"is_active": {
"title": "Is_Active",
"type": "boolean",
"default": true
},
"is_superuser": {
"title": "Is_Superuser",
"type": "boolean",
"default": false
},
"full_name": {
"title": "Full_Name",
"type": "string"
},
"id": {
"title": "Id",
"type": "integer"
}
}
},
"ItemUpdate": {
"title": "ItemUpdate",
"type": "object",
"properties": {
"title": {
"title": "Title",
"type": "string"
},
"description": {
"title": "Description",
"type": "string"
}
}
},
"ItemCreate": {
"title": "ItemCreate",
"required": [
"title"
],
"type": "object",
"properties": {
"title": {
"title": "Title",
"type": "string"
},
"description": {
"title": "Description",
"type": "string"
}
}
},
"ValidationError": {
"title": "ValidationError",
"required": [
"loc",
"msg",
"type"
],
"type": "object",
"properties": {
"loc": {
"title": "Location",
"type": "array",
"items": {
"type": "string"
}
},
"msg": {
"title": "Message",
"type": "string"
},
"type": {
"title": "Error Type",
"type": "string"
}
}
},
"HTTPValidationError": {
"title": "HTTPValidationError",
"type": "object",
"properties": {
"detail": {
"title": "Detail",
"type": "array",
"items": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
}
},
"securitySchemes": {
"OAuth2PasswordBearer": {
"type": "oauth2",
"flows": {
"password": {
"scopes": {},
"tokenUrl": "/api/v1/auth/access-token"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment