diff --git a/docs/_static/openapi.json b/docs/_static/openapi.json new file mode 100644 index 000000000..7ec70b6b0 --- /dev/null +++ b/docs/_static/openapi.json @@ -0,0 +1 @@ +{"openapi":"3.0.2","info":{"title":"Conda-Store","contact":{"name":"Quansight","url":"https://quansight.com"},"license":{"name":"BSD 3-Clause","url":"https://opensource.org/licenses/BSD-3-Clause"},"version":"0.4.0"},"paths":{"/conda-store/login/":{"get":{"tags":["auth"],"summary":"Get Login Method","operationId":"get_login_method_conda_store_login__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["auth"],"summary":"Post Login Method","operationId":"post_login_method_conda_store_login__post","parameters":[{"required":false,"schema":{"title":"Next","type":"string"},"name":"next","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/logout/":{"post":{"tags":["auth"],"summary":"Post Logout Method","operationId":"post_logout_method_conda_store_logout__post","parameters":[{"required":false,"schema":{"title":"Next","type":"string"},"name":"next","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/":{"get":{"tags":["api"],"summary":"Api Status","operationId":"api_status_conda_store_api_v1__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIGetStatus"}}}}}}},"/conda-store/api/v1/permission/":{"get":{"tags":["api"],"summary":"Api Get Permissions","operationId":"api_get_permissions_conda_store_api_v1_permission__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIGetPermission"}}}}}}},"/conda-store/api/v1/namespace/":{"get":{"tags":["api"],"summary":"Api List Namespaces","operationId":"api_list_namespaces_conda_store_api_v1_namespace__get","parameters":[{"required":false,"schema":{"title":"Page","type":"integer","default":1},"name":"page","in":"query"},{"required":false,"schema":{"title":"Order","type":"string"},"name":"order","in":"query"},{"required":false,"schema":{"title":"Size","type":"integer"},"name":"size","in":"query"},{"required":false,"schema":{"title":"Sort By","type":"array","items":{"type":"string"},"default":[]},"name":"sort_by","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIListNamespace"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/namespace/{namespace}/":{"get":{"tags":["api"],"summary":"Api Get Namespace","operationId":"api_get_namespace_conda_store_api_v1_namespace__namespace___get","parameters":[{"required":true,"schema":{"title":"Namespace","type":"string"},"name":"namespace","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIGetNamespace"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["api"],"summary":"Api Create Namespace","operationId":"api_create_namespace_conda_store_api_v1_namespace__namespace___post","parameters":[{"required":true,"schema":{"title":"Namespace","type":"string"},"name":"namespace","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIAckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["api"],"summary":"Api Delete Namespace","operationId":"api_delete_namespace_conda_store_api_v1_namespace__namespace___delete","parameters":[{"required":true,"schema":{"title":"Namespace","type":"string"},"name":"namespace","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIAckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/environment/":{"get":{"tags":["api"],"summary":"Api List Environments","operationId":"api_list_environments_conda_store_api_v1_environment__get","parameters":[{"required":false,"schema":{"title":"Search","type":"string"},"name":"search","in":"query"},{"required":false,"schema":{"title":"Namespace","type":"string"},"name":"namespace","in":"query"},{"required":false,"schema":{"title":"Name","type":"string"},"name":"name","in":"query"},{"required":false,"schema":{"title":"Page","type":"integer","default":1},"name":"page","in":"query"},{"required":false,"schema":{"title":"Order","type":"string"},"name":"order","in":"query"},{"required":false,"schema":{"title":"Size","type":"integer"},"name":"size","in":"query"},{"required":false,"schema":{"title":"Sort By","type":"array","items":{"type":"string"},"default":[]},"name":"sort_by","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIListEnvironment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/environment/{namespace}/{environment_name}/":{"get":{"tags":["api"],"summary":"Api Get Environment","operationId":"api_get_environment_conda_store_api_v1_environment__namespace___environment_name___get","parameters":[{"required":true,"schema":{"title":"Namespace","type":"string"},"name":"namespace","in":"path"},{"required":true,"schema":{"title":"Environment Name","type":"string"},"name":"environment_name","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIGetEnvironment"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/environment/{namespace}/{name}/":{"put":{"tags":["api"],"summary":"Api Update Environment Build","operationId":"api_update_environment_build_conda_store_api_v1_environment__namespace___name___put","parameters":[{"required":true,"schema":{"title":"Namespace","type":"string"},"name":"namespace","in":"path"},{"required":true,"schema":{"title":"Name","type":"string"},"name":"name","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_api_update_environment_build_conda_store_api_v1_environment__namespace___name___put"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIAckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["api"],"summary":"Api Delete Environment","operationId":"api_delete_environment_conda_store_api_v1_environment__namespace___name___delete","parameters":[{"required":true,"schema":{"title":"Namespace","type":"string"},"name":"namespace","in":"path"},{"required":true,"schema":{"title":"Name","type":"string"},"name":"name","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIAckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/specification/":{"get":{"tags":["api"],"summary":"Api Get Specification","operationId":"api_get_specification_conda_store_api_v1_specification__get","parameters":[{"required":false,"schema":{"title":"Channel","type":"array","items":{"type":"string"},"default":[]},"name":"channel","in":"query"},{"required":false,"schema":{"title":"Conda","type":"array","items":{"type":"string"},"default":[]},"name":"conda","in":"query"},{"required":false,"schema":{"title":"Pip","type":"array","items":{"type":"string"},"default":[]},"name":"pip","in":"query"},{"required":false,"schema":{"allOf":[{"$ref":"#/components/schemas/APIGetSpecificationFormat"}],"default":"yaml"},"name":"format","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["api"],"summary":"Api Post Specification","operationId":"api_post_specification_conda_store_api_v1_specification__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_api_post_specification_conda_store_api_v1_specification__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIPostSpecification"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/build/":{"get":{"tags":["api"],"summary":"Api List Builds","operationId":"api_list_builds_conda_store_api_v1_build__get","parameters":[{"required":false,"schema":{"title":"Page","type":"integer","default":1},"name":"page","in":"query"},{"required":false,"schema":{"title":"Order","type":"string"},"name":"order","in":"query"},{"required":false,"schema":{"title":"Size","type":"integer"},"name":"size","in":"query"},{"required":false,"schema":{"title":"Sort By","type":"array","items":{"type":"string"},"default":[]},"name":"sort_by","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIListBuild"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/build/{build_id}/":{"get":{"tags":["api"],"summary":"Api Get Build","operationId":"api_get_build_conda_store_api_v1_build__build_id___get","parameters":[{"required":true,"schema":{"title":"Build Id","type":"integer"},"name":"build_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIGetBuild"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["api"],"summary":"Api Put Build","operationId":"api_put_build_conda_store_api_v1_build__build_id___put","parameters":[{"required":true,"schema":{"title":"Build Id","type":"integer"},"name":"build_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIPostSpecification"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["api"],"summary":"Api Delete Build","operationId":"api_delete_build_conda_store_api_v1_build__build_id___delete","parameters":[{"required":true,"schema":{"title":"Build Id","type":"integer"},"name":"build_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIAckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/build/{build_id}/packages/":{"get":{"tags":["api"],"summary":"Api Get Build Packages","operationId":"api_get_build_packages_conda_store_api_v1_build__build_id__packages__get","parameters":[{"required":true,"schema":{"title":"Build Id","type":"integer"},"name":"build_id","in":"path"},{"required":false,"schema":{"title":"Search","type":"string"},"name":"search","in":"query"},{"required":false,"schema":{"title":"Exact","type":"string"},"name":"exact","in":"query"},{"required":false,"schema":{"title":"Build","type":"string"},"name":"build","in":"query"},{"required":false,"schema":{"title":"Page","type":"integer","default":1},"name":"page","in":"query"},{"required":false,"schema":{"title":"Order","type":"string"},"name":"order","in":"query"},{"required":false,"schema":{"title":"Size","type":"integer"},"name":"size","in":"query"},{"required":false,"schema":{"title":"Sort By","type":"array","items":{"type":"string"},"default":[]},"name":"sort_by","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIListCondaPackage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/build/{build_id}/logs/":{"get":{"tags":["api"],"summary":"Api Get Build Logs","operationId":"api_get_build_logs_conda_store_api_v1_build__build_id__logs__get","parameters":[{"required":true,"schema":{"title":"Build Id","type":"integer"},"name":"build_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/channel/":{"get":{"tags":["api"],"summary":"Api List Channels","operationId":"api_list_channels_conda_store_api_v1_channel__get","parameters":[{"required":false,"schema":{"title":"Page","type":"integer","default":1},"name":"page","in":"query"},{"required":false,"schema":{"title":"Order","type":"string"},"name":"order","in":"query"},{"required":false,"schema":{"title":"Size","type":"integer"},"name":"size","in":"query"},{"required":false,"schema":{"title":"Sort By","type":"array","items":{"type":"string"},"default":[]},"name":"sort_by","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIListCondaChannel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/package/":{"get":{"tags":["api"],"summary":"Api List Packages","operationId":"api_list_packages_conda_store_api_v1_package__get","parameters":[{"required":false,"schema":{"title":"Search","type":"string"},"name":"search","in":"query"},{"required":false,"schema":{"title":"Exact","type":"string"},"name":"exact","in":"query"},{"required":false,"schema":{"title":"Build","type":"string"},"name":"build","in":"query"},{"required":false,"schema":{"title":"Distinct On","type":"array","items":{"type":"string"},"default":[]},"name":"distinct_on","in":"query"},{"required":false,"schema":{"title":"Page","type":"integer","default":1},"name":"page","in":"query"},{"required":false,"schema":{"title":"Order","type":"string"},"name":"order","in":"query"},{"required":false,"schema":{"title":"Size","type":"integer"},"name":"size","in":"query"},{"required":false,"schema":{"title":"Sort By","type":"array","items":{"type":"string"},"default":[]},"name":"sort_by","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIListCondaPackage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/api/v1/build/{build_id}/yaml/":{"get":{"tags":["api"],"summary":"Api Get Build Yaml","operationId":"api_get_build_yaml_conda_store_api_v1_build__build_id__yaml__get","parameters":[{"required":true,"schema":{"title":"Build Id","type":"integer"},"name":"build_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/":{"get":{"tags":["registry"],"summary":"V2","operationId":"v2_v2__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v2/":{"get":{"tags":["registry"],"summary":"List Tags","operationId":"list_tags_v2__rest_path__get","parameters":[{"required":true,"schema":{"title":"Rest","type":"string"},"name":"rest","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/create/":{"get":{"tags":["ui"],"summary":"Ui Create Get Environment","operationId":"ui_create_get_environment_conda_store_create__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/conda-store/":{"get":{"tags":["ui"],"summary":"Ui List Environments","operationId":"ui_list_environments_conda_store__get","parameters":[{"required":false,"schema":{"title":"Search","type":"string"},"name":"search","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/namespace/":{"get":{"tags":["ui"],"summary":"Ui List Namespaces","operationId":"ui_list_namespaces_conda_store_namespace__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/conda-store/environment/{namespace}/{environment_name}/":{"get":{"tags":["ui"],"summary":"Ui Get Environment","operationId":"ui_get_environment_conda_store_environment__namespace___environment_name___get","parameters":[{"required":true,"schema":{"title":"Namespace","type":"string"},"name":"namespace","in":"path"},{"required":true,"schema":{"title":"Environment Name","type":"string"},"name":"environment_name","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/environment/{namespace}/{environment_name}/edit/":{"get":{"tags":["ui"],"summary":"Ui Edit Environment","operationId":"ui_edit_environment_conda_store_environment__namespace___environment_name__edit__get","parameters":[{"required":true,"schema":{"title":"Namespace","type":"string"},"name":"namespace","in":"path"},{"required":true,"schema":{"title":"Environment Name","type":"string"},"name":"environment_name","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/build/{build_id}/":{"get":{"tags":["ui"],"summary":"Ui Get Build","operationId":"ui_get_build_conda_store_build__build_id___get","parameters":[{"required":true,"schema":{"title":"Build Id","type":"integer"},"name":"build_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/user/":{"get":{"tags":["ui"],"summary":"Ui Get User","operationId":"ui_get_user_conda_store_user__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/conda-store/build/{build_id}/logs/":{"get":{"tags":["ui"],"summary":"Api Get Build Logs","operationId":"api_get_build_logs_conda_store_build__build_id__logs__get","parameters":[{"required":true,"schema":{"title":"Build Id","type":"integer"},"name":"build_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/build/{build_id}/lockfile/":{"get":{"tags":["ui"],"summary":"Api Get Build Lockfile","operationId":"api_get_build_lockfile_conda_store_build__build_id__lockfile__get","parameters":[{"required":true,"schema":{"title":"Build Id","type":"integer"},"name":"build_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conda-store/build/{build_id}/archive/":{"get":{"tags":["ui"],"summary":"Api Get Build Archive","operationId":"api_get_build_archive_conda_store_build__build_id__archive__get","parameters":[{"required":true,"schema":{"title":"Build Id","type":"integer"},"name":"build_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Redirect Home","operationId":"redirect_home__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/conda-store/metrics":{"get":{"tags":["metrics"],"summary":"Prometheus Metrics","operationId":"prometheus_metrics_conda_store_metrics_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/conda-store/celery":{"get":{"tags":["metrics"],"summary":"Trigger Task","operationId":"trigger_task_conda_store_celery_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"APIAckResponse":{"title":"APIAckResponse","required":["status"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"message":{"title":"Message","type":"string"}}},"APIGetBuild":{"title":"APIGetBuild","required":["status","data"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"data":{"$ref":"#/components/schemas/Build"},"message":{"title":"Message","type":"string"}}},"APIGetEnvironment":{"title":"APIGetEnvironment","required":["status","data"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"data":{"$ref":"#/components/schemas/Environment"},"message":{"title":"Message","type":"string"}}},"APIGetNamespace":{"title":"APIGetNamespace","required":["status","data"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"data":{"$ref":"#/components/schemas/Namespace"},"message":{"title":"Message","type":"string"}}},"APIGetPermission":{"title":"APIGetPermission","required":["status","data"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"data":{"$ref":"#/components/schemas/APIGetPermissionData"},"message":{"title":"Message","type":"string"}}},"APIGetPermissionData":{"title":"APIGetPermissionData","required":["authenticated","entity_permissions","primary_namespace"],"type":"object","properties":{"authenticated":{"title":"Authenticated","type":"boolean"},"entity_permissions":{"title":"Entity Permissions","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"primary_namespace":{"title":"Primary Namespace","type":"string"}}},"APIGetSpecificationFormat":{"title":"APIGetSpecificationFormat","enum":["yaml","lockfile"],"description":"An enumeration."},"APIGetStatus":{"title":"APIGetStatus","required":["status","data"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"data":{"$ref":"#/components/schemas/APIGetStatusData"},"message":{"title":"Message","type":"string"}}},"APIGetStatusData":{"title":"APIGetStatusData","required":["version"],"type":"object","properties":{"version":{"title":"Version","type":"string"}}},"APIListBuild":{"title":"APIListBuild","required":["status","data","page","size","count"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/Build"}},"message":{"title":"Message","type":"string"},"page":{"title":"Page","type":"integer"},"size":{"title":"Size","type":"integer"},"count":{"title":"Count","type":"integer"}}},"APIListCondaChannel":{"title":"APIListCondaChannel","required":["status","data","page","size","count"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/CondaChannel"}},"message":{"title":"Message","type":"string"},"page":{"title":"Page","type":"integer"},"size":{"title":"Size","type":"integer"},"count":{"title":"Count","type":"integer"}}},"APIListCondaPackage":{"title":"APIListCondaPackage","required":["status","data","page","size","count"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/CondaPackage"}},"message":{"title":"Message","type":"string"},"page":{"title":"Page","type":"integer"},"size":{"title":"Size","type":"integer"},"count":{"title":"Count","type":"integer"}}},"APIListEnvironment":{"title":"APIListEnvironment","required":["status","data","page","size","count"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/Environment"}},"message":{"title":"Message","type":"string"},"page":{"title":"Page","type":"integer"},"size":{"title":"Size","type":"integer"},"count":{"title":"Count","type":"integer"}}},"APIListNamespace":{"title":"APIListNamespace","required":["status","data","page","size","count"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"data":{"title":"Data","type":"array","items":{"$ref":"#/components/schemas/Namespace"}},"message":{"title":"Message","type":"string"},"page":{"title":"Page","type":"integer"},"size":{"title":"Size","type":"integer"},"count":{"title":"Count","type":"integer"}}},"APIPostSpecification":{"title":"APIPostSpecification","required":["status","data"],"type":"object","properties":{"status":{"$ref":"#/components/schemas/APIStatus"},"data":{"$ref":"#/components/schemas/APIPostSpecificationData"},"message":{"title":"Message","type":"string"}}},"APIPostSpecificationData":{"title":"APIPostSpecificationData","required":["build_id"],"type":"object","properties":{"build_id":{"title":"Build Id","type":"integer"}}},"APIStatus":{"title":"APIStatus","enum":["ok","error"],"description":"An enumeration."},"Body_api_post_specification_conda_store_api_v1_specification__post":{"title":"Body_api_post_specification_conda_store_api_v1_specification__post","type":"object","properties":{"specification":{"title":"Specification","type":"string","default":""},"namespace":{"title":"Namespace","type":"string"}}},"Body_api_update_environment_build_conda_store_api_v1_environment__namespace___name___put":{"title":"Body_api_update_environment_build_conda_store_api_v1_environment__namespace___name___put","required":["build_id"],"type":"object","properties":{"build_id":{"title":"Build Id","type":"integer"}}},"Build":{"title":"Build","required":["id","environment_id","status","size","scheduled_on"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"environment_id":{"title":"Environment Id","type":"integer"},"specification":{"$ref":"#/components/schemas/Specification"},"packages":{"title":"Packages","type":"array","items":{"$ref":"#/components/schemas/CondaPackage"}},"status":{"$ref":"#/components/schemas/BuildStatus"},"size":{"title":"Size","type":"integer"},"scheduled_on":{"title":"Scheduled On","type":"string","format":"date-time"},"started_on":{"title":"Started On","type":"string","format":"date-time"},"ended_on":{"title":"Ended On","type":"string","format":"date-time"}}},"BuildStatus":{"title":"BuildStatus","enum":["QUEUED","BUILDING","COMPLETED","FAILED"],"description":"An enumeration."},"CondaChannel":{"title":"CondaChannel","required":["id","name"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"},"last_update":{"title":"Last Update","type":"string","format":"date-time"}}},"CondaPackage":{"title":"CondaPackage","required":["id","channel","build","sha256","name","version"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"channel":{"$ref":"#/components/schemas/CondaChannel"},"build":{"title":"Build","type":"string"},"license":{"title":"License","type":"string"},"sha256":{"title":"Sha256","type":"string"},"name":{"title":"Name","type":"string"},"version":{"title":"Version","type":"string"},"summary":{"title":"Summary","type":"string"}}},"Environment":{"title":"Environment","required":["id","namespace","name","current_build_id"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"namespace":{"$ref":"#/components/schemas/Namespace"},"name":{"title":"Name","type":"string"},"current_build_id":{"title":"Current Build Id","type":"integer"},"current_build":{"$ref":"#/components/schemas/Build"}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"Namespace":{"title":"Namespace","required":["id","name"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"name":{"title":"Name","pattern":"^[A-Za-z0-9-+_=@$&?^|~.]+$","type":"string"}}},"Specification":{"title":"Specification","required":["id","name","spec","sha256","created_on"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"},"spec":{"title":"Spec","type":"object"},"sha256":{"title":"Sha256","type":"string"},"created_on":{"title":"Created On","type":"string","format":"date-time"}}},"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"}}}}}} \ No newline at end of file diff --git a/docs/api.md b/docs/api.md new file mode 100644 index 000000000..340b5b029 --- /dev/null +++ b/docs/api.md @@ -0,0 +1,27 @@ +# REST API + +Below is an interactive view of Conda-Store's OpenAPI specification. + + + + + + + + +
+ + diff --git a/docs/contributing.md b/docs/contributing.md index 2fb1b6fc5..53242294c 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -25,6 +25,7 @@ The following resources will be available: - conda-store web server running at [http://localhost:5000](http://localhost:5000) - [MinIO](https://min.io/) s3 running at [http://localhost:9000](http://localhost:9000) with username `admin` and password `password` - [PostgreSQL](https://www.postgresql.org/) running at [localhost:5432](localhost:5432) with username `admin` and password `password` database `conda-store` + - [Redis](https://www.redis.com/) running at [localhost:6379](localhost:6379) with password `password` - [JupyterHub](https://jupyter.org/hub) running at [http://localhost:8000](http://localhost:8000) with any username and password `test` On a fast machine this deployment should only take 10 or so seconds @@ -37,6 +38,13 @@ docker-compose down # not always necessary docker-compose up --build ``` +### Changes to API + +The REST API is considered somewhat stable. If any changes are made to +the API make sure the update the OpenAPI/Swagger specification in +`docs/_static/openapi.json`. This may be downloaded from the `/docs` +endpoint when running Conda-Store. + ## Documentation Install the following dependencies before contributing to the @@ -120,155 +128,6 @@ the feedstock with the following comment `@conda-forge-admin please rerender`. An example of this can be found in [PR #2](https://github.com/conda-forge/conda-store-feedstock/pull/2) -## REST API - -### Status - - - `GET /api/v1/` :: get status of conda-store - -### Permissions - - - `GET /api/v1/permission/` :: get the permissions for the currently entity. Does not require authentication and returns the permissions and authentication status for entity. - -### Namespace - - - `GET /api/v1/namespace/?page=&size=&sort_by=&order=` :: list namespaces - - allowed `sort_by` values: `name` for the name of the namespace - - - `GET /api/v1/namespace//` :: get namespace - - - `POST /api/v1/namespace//` :: create namespace - - - `DELETE /api/v1/namespace//` :: delete namespace - -### Environments - - - `GET /api/v1/environment/?search=&page=&size=&sort_by=&order=` :: list environments - - allowed `sort_by` values : `namespace` for namespace name, `name` for environment name - - - `GET /api/v1/environment///` :: get environment - - - `PUT /api/v1/environment///` :: update environment to given build id - - - `DELETE /api/v1/environment///` :: delete the environment along with all artifacts and builds - -### Specifications - - - `POST /api/v1/environment/` :: create given environment - - JSON message with optional namespace (will use `CondaStore.default_namespace` if not specified) and a specification string that's a valid environment.yaml for Conda, like so: - ``` - { - "namespace": "some_namespace", - "specification": "name: some_environment_name\ndependencies:\n - python=3.10.2=h543edf9_0_cpython\n" - } - ``` - -### Builds - - - `GET /api/v1/build/?page=&size=&sort_by=&order=` :: list builds - - allowed `sort_by` values : `id` to sort by build id - - - `GET /api/v1/build//` :: get build - - - `PUT /api/v1/build//` :: trigger new build of given build specification - - - `DELETE /api/v1/build//` :: delete given build along with all artifacts that are not in `c.CondaStore.build_artifacts_kept_on_deletion` - - - `GET /api/v1/build//logs/` :: get build logs - - - `GET /api/v1/build//yaml/` :: export environment.yml specification for the given build - - - `GET /api/v1/build//packages/?search=&build=&page=&size=&sort_by=&order=` :: list packages within build - - allowed `sort_by` values : `channel` to sort by channel name, `name` to sort by package name - - `build` string to search within `build` for example strings include - `py27_0` etc which can be useful for filtering specific versions of - packages. - - `search` will search within the package names for a match. The search is fuzzy by default. To get the packages with the exact given name, add the parameter `exact=1`. - -### Conda Channels - - - `GET /api/v1/channel/?page=&size=` :: list channels - -### Conda Packages - - - `GET /api/v1/package/?search=&build=&page=&size=?sort_by=?order=&distinct_on=` :: list packages - - allowed `sort_by` values : `channel` to sort by channel name, `name` to sort by package name - - allowed `distinct_on` values : `channel` to be distinct on channel name, `name` to be distinct on package name, `version` to be distinct on version. - - `build` string to search within `build` for example strings include - `py27_0` etc which can be useful for filtering specific versions of - packages. - - `search` will search within the package names for a match. The search is fuzzy by default. To get the packages with the exact given name, add the parameter `exact=1`. - -### REST API query format - -For several paginated results the following query parameters are accepted. - - - `page` page numbers indexing start at 1 - - `size` the number of results to return in each page. The max size - is determined by the - [Traitlets](https://traitlets.readthedocs.io/en/stable/) parameter - `c.CondaStoreServer.max_page_size` with default of 100. - - `sort_by` (can be multiple order_by parameters) indicating a multi-column - ordering. Each route has a list of allowed sorting keys: - for example `namespace`, `name`, `channel`. All paginated routes support - this and have a default specific to the given resource. - - `distinct_on` (can be multiple distinct_on parameters) indicating a - multi-column distinct on. Each route has a list of allowed distinct - keys. - - `order` is either `desc` descending or `asc` ascending with a - default of `asc`. Only one order parameter is accepted. - -If a query requests a page that does not exist a data response of an -empty list is returned. - -### REST API Response Format - -Several Standard Error Codes are returned - - 200 :: response was processed normally - - 400 :: indicates a bad request that is invalid - - 401 :: indicates that request was unauthenticated indicates that authentication is required - - 403 :: indicates that request was not authorized to access resource - - 404 :: indicates that request for resource was not found - - 500 :: hopefully you don't see this error. If you do this is a bug - -Response Format for Errors. - -```json -{ - "status": "error", - "message": "" -} -``` - -Response Format for Success. Several of these response parts are -optional. A route may optionally return a `message` that may be -displayed to the user. - -If the route is paginated it will return a `page`, `size`, and `count` -key. - -``` -{ - "status": "ok", - "message": "", - "data": [...], - "page": , - "size": , - "count": , -} -``` - -If the route is not paginated the `page`, `size`, and `count` keys will -not be returned. - -``` -{ - "status": "ok", - "message": "", - "data": {}, -} -``` - ## Architecture Conda Store was designed with the idea of scalable enterprise diff --git a/docs/index.rst b/docs/index.rst index 1e150e0d0..d0082626e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -100,6 +100,7 @@ Contents user_guide administration contributing + api Indices and tables ==================