{ "openapi": "3.0.2", "info": { "title": "Floxhub Catalog Server", "summary": "Catalog Server API for Floxhub", "description": "\n# Floxhub Catalog Service API\n\n![packages](https://api.preview.flox.dev/api/v1/catalog/status/badges/packages.svg)\n", "version": "unknown", "x-logo": { "url": "https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" } }, "paths": { "/api/v1/catalog/search": { "get": { "tags": [ "catalog" ], "summary": "Search for packages", "description": "Search the catalog(s) under the given criteria for matching packages.\n\nRequired Query Parameters:\n- **search_term**: The search term to search on.\n- **system**: This is returned but does not affect results\n\nOptional Query Parameters:\n- **catalogs**: Comma separated list of catalog names to search; defaults to all catalogs\n- **page**: Optional page number for pagination (def = 0)\n- **pageSize**: Optional page size for pagination (def = 10)\n\nReturns:\n- **PackageSearchResult**: A list of PackageInfo and the total result count", "operationId": "search_api_v1_catalog_search_get", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "system", "in": "query", "required": true, "schema": { "$ref": "#/components/schemas/PackageSystem" } }, { "name": "search_term", "in": "query", "required": false, "schema": { "title": "Search Term", "nullable": true, "type": "string", "pattern": "[a-zA-Z0-9\\-\\.\\\\@%_,]{2,200}" } }, { "name": "catalogs", "in": "query", "required": false, "schema": { "title": "Catalogs", "nullable": true, "type": "string" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Page" } }, { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer", "default": 10, "title": "Pagesize" } } ], "responses": { "200": { "description": "A list of matching packages", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageSearchResult" } } } }, "422": { "description": "The search terms given could not be processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/packages/{attr_path}": { "get": { "tags": [ "catalog" ], "summary": "Shows available packages of a specific package", "description": "Returns a list of versions for a given attr_path\n\nRequired Query Parameters:\n- **attr_path**: The attr_path, must be valid.\n\nOptional Query Parameters:\n- **page**: Optional page number for pagination (def = 0)\n- **pageSize**: Optional page size for pagination (def = 10)\n\nReturns:\n- **PackagesResult**: A list of PackageResolutionInfo and the total result count", "operationId": "packages_api_v1_catalog_packages__attr_path__get", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "attr_path", "in": "path", "required": true, "schema": { "type": "string", "title": "Attr Path" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Page" } }, { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer", "default": 10, "title": "Pagesize" } } ], "responses": { "200": { "description": "A list of packages attr_path", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackagesResult" } } } }, "404": { "description": "attr_path was not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "Request validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/resolve": { "post": { "tags": [ "catalog" ], "summary": "Resolve a list of Package Groups", "description": "Resolves a list of package groups, each being a list of package descriptors.\n\nRequired Body:\n- **groups**: An object with an `items` array of PackageGroups to resolve.\n\nOptional Query Parameters:\n- **none**\n\nReturns:\n- **ResolvedPackageGroups**: A object with an `items` array of\n `ResolvedPackageGroup` items.\n\nResolution Rules:\n- Each `PackageGroup` is resolved independently.\n- Each page that has a package that meets each of the descriptors in that group is returned in the results\n- The latest page will include details for each package in the group from that page\n- The remainder pages are returned without details (to get those details... TBD)\n\nA Package Descriptor match:\n- **name**: [required] - is not used in matching, only for reference (TBD is\n there a uniqueness constraint?)\n- **attr_path**: [required] - this must match the nix attribute path exactly and in full\n- **version**: [optional] - Either a literal version to match or a **semver** constraint.\n This will be treated as a **semver** IFF TBD, otherwise it will be treated as\n a literal string match to the nix `version` field. If this is detected as a **semver**,\n packages whose `version` field cannot be parsed as a **semver** will be excluded.\n- **allow_pre_release**: [optional] - Defaults to False. Only applies\n when a **semver** constraint is given. If true, a `version` that can\n be parsed as a valid semver, that includes a pre-release suffix will\n be included as a candidate. Otherwise, they will be excluded.\n- **allow_broken**: [optional] - Defaults to False. A package\n marked as broken = True will be excluded unless this is set to True.\n- **allow_unfree**: [optional] - Defaults to True. A package\n marked as unfree = True will be excluded unless this is set to True.\n- **allow_insecure**: [optional] - Defaults to False. A package\n marked as insecure = True will be excluded unless this is set to True.\n- **allow_missing_builds**: [optional] - Defaults to\n False. A package is expected to have been built if it\n is not marked as broken, unfree, or insecure. A package\n that is expected to have been built, but none of it's outputs have been\n observed to build, will attempt to be excluded unless this is set to\n True. This constraint may be softened if the group can not be resolved\n with it enforced. If this occurs, the ressponse will note this by\n including a warning level message.", "operationId": "resolve_api_v1_catalog_resolve_post", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "candidate_pages", "in": "query", "required": false, "schema": { "type": "integer", "default": 0, "title": "Candidate Pages" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageGroups" } } } }, "responses": { "200": { "description": "A list of resolved package groups", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolvedPackageGroups" } } } }, "422": { "description": "Request validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/settings/{key}": { "post": { "tags": [ "settings" ], "summary": "Adjust various settings", "description": "Adjusts various settings on the catalog service.\n\nQuery Parameters:\n- **key**: The the key to adjust.\n - \"plan\" - Enables the logging of the DB query plan for queries for\n **value** seconds. It will be scheduled to turn off automatically after\n that.", "operationId": "settings_api_v1_catalog_settings__key__post", "parameters": [ { "name": "key", "in": "path", "required": true, "schema": { "type": "string", "title": "Key" } }, { "name": "value", "in": "query", "required": true, "schema": { "type": "string", "title": "Value" } } ], "responses": { "200": { "description": "Successful.", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Request validation error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/status/healthcheck": { "get": { "tags": [ "status" ], "summary": "Perform basic catalog health check", "description": "Run some basic health checks on the catalog service.\n\nReturns:\n- **HealthCheck**: A dictionary of various health check values.", "operationId": "get_catalog_health_check_api_v1_catalog_status_healthcheck_get", "responses": { "200": { "description": "Health check results", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthCheck" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/status/catalog": { "get": { "tags": [ "status" ], "summary": "Get basic catalog database status", "description": "Gather some basic status values from the database.\n\nReturns:\n- **CatalogStatus**: A dictionary of various status values.", "operationId": "get_catalog_status_api_v1_catalog_status_catalog_get", "responses": { "200": { "description": "Catalog Status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CatalogStatus" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/status/service": { "get": { "tags": [ "status" ], "summary": "Get basic service status", "description": "Returns basic service status\n\nReturns:\n- **ServiceStatus**: A dictionary of various status values.", "operationId": "get_service_status_api_v1_catalog_status_service_get", "responses": { "200": { "description": "Service Status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceStatus" } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/status/sentry-debug": { "get": { "tags": [ "status" ], "summary": "Trigger Error", "operationId": "trigger_error_api_v1_catalog_status_sentry_debug_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v1/catalog/catalogs/": { "post": { "tags": [ "catalogs" ], "summary": "Create a new user catalog", "description": "Create a new user catalog\n\nRequired Query Parameters:\n- **name**: The name of the new catalog\n\n\nReturns:\n- **UserCatalog**: The new user catalog", "operationId": "create_catalog_api_v1_catalog_catalogs__post", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } } ], "responses": { "201": { "description": "The new user catalog was created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCatalog" } } } }, "409": { "description": "The catalog name already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The catalog name is invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/catalogs/{catalog_name}": { "get": { "tags": [ "catalogs" ], "summary": "Get user catalog metadata", "description": "Get user catalog metadata\n\nRequired Query Parameters:\n- **catalog_name**: The name of the catalog\n\n\nReturns:\n- **UserCatalog**: The user catalog", "operationId": "get_catalog_api_v1_catalog_catalogs__catalog_name__get", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } } ], "responses": { "200": { "description": "The user catalog metadata", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCatalog" } } } }, "404": { "description": "The catalog with the given name was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The search terms given could not be processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "tags": [ "catalogs" ], "summary": "Delete a user catalog", "description": "Delete a user catalog\n\nRequired Query Parameters:\n- **catalog_name**: The name of catalog to delete\n\n\nReturns:\n- **None**", "operationId": "delete_catalog_api_v1_catalog_catalogs__catalog_name__delete", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "501": { "description": "Deletion of user catalogs is not yet implemented", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The catalog name is invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/catalogs/{catalog_name}/packages": { "post": { "tags": [ "catalogs" ], "summary": "Create a new package in a user catalog", "description": "Creates a catalog package\n\nPath Parameters:\n- **catalog_name**: The name of catalog to place the package into\n\nRequired Query Parameters:\n- **name**: The name of package (attr_path) to create\n\nReturns:\n- **UserPackage**", "operationId": "create_catalog_package_api_v1_catalog_catalogs__catalog_name__packages_post", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } }, { "name": "name", "in": "query", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9.\\-_]{3,128}", "title": "Package Name", "name": "package_name", "example": "curl" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPackageCreate" } } } }, "responses": { "201": { "description": "The new package was created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPackage" } } } }, "200": { "description": "The package already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPackage" } } } }, "404": { "description": "The catalog could not be found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "409": { "description": "The package already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "get": { "tags": [ "catalogs" ], "summary": "List packages available in a catalog", "description": "Lists available packages in a catalog\n\nPath Parameters:\n- **catalog_name**: The name of the catalog\n\nReturns:\n- **UserPackageList**", "operationId": "get_catalog_packages_api_v1_catalog_catalogs__catalog_name__packages_get", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } } ], "responses": { "200": { "description": "The list of packages", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPackageList" } } } }, "404": { "description": "The catalog could not be found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/catalogs/{catalog_name}/packages/{package_name}": { "get": { "tags": [ "catalogs" ], "summary": "Get package info", "description": "Get package info\n\nPath Parameters:\n- **catalog_name**: The name of the catalog\n- **package_name**: The name of the package\n\nReturns:\n- **UserPackage**", "operationId": "get_catalog_package_api_v1_catalog_catalogs__catalog_name__packages__package_name__get", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } }, { "name": "package_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9.\\-_]{3,128}", "title": "Package Name", "name": "package_name", "example": "curl" } } ], "responses": { "200": { "description": "The list of packages", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserPackage" } } } }, "404": { "description": "The catalog or package could not be found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/catalogs/{catalog_name}/packages/{package_name}/publish/info": { "post": { "tags": [ "catalogs" ], "summary": "Request access and info to publish a package", "description": "Request access and informatin to publish a package to this catalog.\nPath Parameters:\n- **catalog_name**: The name of the catalog\n- **package_name**: The name of the package\nBody Content:\n- **PublishInfoRequest**: The information needed to publish to the catalog\nReturns:\n- **PublishRequestResponse**", "operationId": "publish_request_api_v1_catalog_catalogs__catalog_name__packages__package_name__publish_info_post", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } }, { "name": "package_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9.\\-_]{3,128}", "title": "Package Name", "name": "package_name", "example": "curl" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishInfoRequest" } } } }, "responses": { "200": { "description": "The requested information to publish the package", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishInfoResponseCatalog" } } } }, "400": { "description": "The build cannot be published as requested", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "The catalog or package could not be found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/catalogs/{catalog_name}/packages/{package_name}/builds": { "post": { "tags": [ "catalogs" ], "summary": "Submit a build of a particular package", "description": "Create or update a build of a package\n\nPath Parameters:\n- **catalog_name**: The name of the catalog\n- **package_name**: The name of the package\nBody Content:\n- **PackageBuild**: The build info to submit\n\nReturns:\n- **PackageBuildResponse**", "operationId": "create_package_build_api_v1_catalog_catalogs__catalog_name__packages__package_name__builds_post", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } }, { "name": "package_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9.\\-_]{3,128}", "title": "Package Name", "name": "package_name", "example": "curl" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageBuildWithNarInfo" } } } }, "responses": { "201": { "description": "The build was submitted successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageBuildResponse" } } } }, "200": { "description": "The build already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageBuildResponse" } } } }, "400": { "description": "The build cannot be published as requested", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "The catalog or package could not be found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "put": { "tags": [ "catalogs" ], "summary": "Update a build of a particular package", "description": "Create or update a build of a package\n\nPath Parameters:\n- **catalog_name**: The name of the catalog\n- **package_name**: The name of the package\nBody Content:\n- **PackageBuild**: The build info to submit\n\nReturns:\n- **PackageBuildResponse**", "operationId": "create_package_build_api_v1_catalog_catalogs__catalog_name__packages__package_name__builds_put", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } }, { "name": "package_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9.\\-_]{3,128}", "title": "Package Name", "name": "package_name", "example": "curl" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageBuildWithNarInfo" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageBuildResponse" } } } }, "200": { "description": "The build already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageBuildResponse" } } } }, "400": { "description": "The build cannot be published as requested", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "The catalog or package could not be found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "get": { "tags": [ "catalogs" ], "summary": "Get a list of builds for a given package", "description": "Get the list of builds for a given package\n\nPath Parameters:\n- **catalog_name**: The name of the catalog\n- **package_name**: The name of the package\n\nReturns:\n- **PackageBuildList**", "operationId": "get_package_builds_api_v1_catalog_catalogs__catalog_name__packages__package_name__builds_get", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } }, { "name": "package_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9.\\-_]{3,128}", "title": "Package Name", "name": "package_name", "example": "curl" } } ], "responses": { "200": { "description": "The list of builds", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageBuildList" } } } }, "404": { "description": "The catalog or package could not be found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/catalogs/{catalog_name}/sharing": { "get": { "tags": [ "catalogs" ], "summary": "Get usernames that have read access to a catalog", "description": "Get the list of usernames with read access to a catalog\n\nPath Parameters:\n- **catalog_name**: The name of the catalog\n\nReturns:\n- **CatalogShareInfo**: The users with read access to the catalog", "operationId": "get_catalog_sharing_api_v1_catalog_catalogs__catalog_name__sharing_get", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } } ], "responses": { "200": { "description": "The list of usernames with read access", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CatalogShareInfo" } } } }, "404": { "description": "The catalog with the given name was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The catalog name is invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/catalogs/{catalog_name}/sharing/add-read-users": { "post": { "tags": [ "catalogs" ], "summary": "Add usernames to the read access list for a catalog", "description": "Add usernames to the read access list for a catalog\n\nPath Parameters:\n- **catalog_name**: The name of the catalog\n\nBody Content:\n- **CatalogShareInfo**: The users to add to the read access list\n\nReturns:\n- **CatalogShareInfo**: The users with read access to the catalog", "operationId": "add_catalog_sharing_api_v1_catalog_catalogs__catalog_name__sharing_add_read_users_post", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CatalogShareInfo" } } } }, "responses": { "200": { "description": "The list of usernames with read access", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CatalogShareInfo" } } } }, "404": { "description": "The catalog with the given name was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The catalog name is invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/catalogs/{catalog_name}/sharing/remove-read-users": { "post": { "tags": [ "catalogs" ], "summary": "Remove usernames from the read access list for a catalog", "description": "Remove usernames from the read access list for a catalog\n\nPath Parameters:\n- **catalog_name**: The name of the catalog\n\nBody Content:\n- **CatalogShareInfo**: The users to remove from the read access list\n\nReturns:\n- **CatalogShareInfo**: The users with read access to the catalog", "operationId": "remove_catalog_sharing_api_v1_catalog_catalogs__catalog_name__sharing_remove_read_users_post", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CatalogShareInfo" } } } }, "responses": { "200": { "description": "The list of usernames with read access", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CatalogShareInfo" } } } }, "404": { "description": "The catalog with the given name was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The catalog name is invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/catalogs/{catalog_name}/store/config": { "get": { "tags": [ "catalogs" ], "summary": "Get store config", "description": "Get store configuration", "operationId": "get_catalog_store_config_api_v1_catalog_catalogs__catalog_name__store_config_get", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } } ], "responses": { "200": { "description": "The store configuration was found and returned", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CatalogStoreConfig" } } } }, "404": { "description": "The catalog with the given name was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The catalog name is invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "put": { "tags": [ "catalogs" ], "summary": "Set store config", "description": "Update store configuration", "operationId": "set_catalog_store_config_api_v1_catalog_catalogs__catalog_name__store_config_put", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "catalog_name", "in": "path", "required": true, "schema": { "type": "string", "pattern": "[a-zA-Z0-9\\-_]{3,64}", "title": "Catalog Name", "name": "catalog_name", "example": "mycatalog" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CatalogStoreConfig" } } } }, "responses": { "200": { "description": "The store configuration was updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CatalogStoreConfig" } } } }, "404": { "description": "The catalog with the given name was not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "422": { "description": "The catalog name is invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/info/pkg-paths": { "get": { "tags": [ "info" ], "summary": "List of valid pkg paths", "description": "Get the list of valid pkg paths for base catalog packages.", "operationId": "getPkgPaths_api_v1_catalog_info_pkg_paths_get", "parameters": [ { "name": "page", "in": "query", "required": false, "schema": { "title": "Page", "nullable": true, "type": "integer" } }, { "name": "pageSize", "in": "query", "required": false, "schema": { "title": "Pagesize", "nullable": true, "type": "integer" } } ], "responses": { "200": { "description": "A list of valid pkg paths", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PkgPathsResult" } } } }, "422": { "description": "The request could not be processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/info/base-catalog": { "get": { "tags": [ "info" ], "summary": "Get base catalog information", "operationId": "getBaseCatalog_api_v1_catalog_info_base_catalog_get", "responses": { "200": { "description": "The properties of the base catalog, its scraped pages and available stabilities", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BaseCatalogInfo" } } } }, "422": { "description": "The request could not be processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/info/published-catalogs": { "get": { "tags": [ "info" ], "summary": "Get Published Catalogs", "operationId": "get_published_catalogs_api_v1_catalog_info_published_catalogs_get", "responses": { "200": { "description": "Get statistics about published catalogs", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublishedCatalogInfo" } } } }, "422": { "description": "The request could not be processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ] } }, "/api/v1/catalog/info/nar/{nar_file}": { "get": { "tags": [ "info" ], "summary": "Get related information for a NAR file", "description": "Get the attr_path for a package based on its NAR file name.", "operationId": "nar_file_lookup_api_v1_catalog_info_nar__nar_file__get", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "nar_file", "in": "path", "required": true, "schema": { "type": "string", "title": "Nar File" } } ], "responses": { "200": { "description": "Information about the derivation(s) related to the NAR file", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageDerivation-Output" } } } }, "422": { "description": "The request could not be processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/info/dependencies/{storepath}/raw": { "get": { "tags": [ "info" ], "summary": "Get a raw dependency report for a storepath (excluding /nix/store/ prefix)", "description": "Get the attr_path for a package based on its NAR file name.", "operationId": "raw_dependency_report_api_v1_catalog_info_dependencies__storepath__raw_get", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "storepath", "in": "path", "required": true, "schema": { "type": "string", "title": "Storepath" } } ], "responses": { "200": { "description": "A raw dependency report for the given storepath", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RawDependencyReport" } } } }, "422": { "description": "The request could not be processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/info/dependencies/{storepath}/spdx": { "get": { "tags": [ "info" ], "summary": "Get a SPDX report for a storepath (excluding /nix/store/ prefix)", "operationId": "spdx_report_api_v1_catalog_info_dependencies__storepath__spdx_get", "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ], "parameters": [ { "name": "storepath", "in": "path", "required": true, "schema": { "type": "string", "title": "Storepath" } } ], "responses": { "200": { "description": "A SPDX report for the given storepath", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true, "title": "Response 200 Spdx Report Api V1 Catalog Info Dependencies Storepath Spdx Get" } } } }, "422": { "description": "The request could not be processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/api/v1/catalog/store": { "post": { "tags": [ "store" ], "summary": "Get store info for a list of derivations", "description": "Get store info for a list of derivations\n\nBody Parameters:\n- **StoreInfoRequest**: A list of derivation paths\n\nReturns:\n- **StoreInfoResponse**: a map of derivation path to a list of store info objects", "operationId": "get_store_info_api_v1_catalog_store_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreInfoRequest" } } }, "required": true }, "responses": { "200": { "description": "The list of store info", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreInfoResponse" } } } }, "422": { "description": "The request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ] } }, "/api/v1/catalog/store/status": { "post": { "tags": [ "store" ], "summary": "Get status for a list of storepaths", "description": "Get status for a list of storepaths\nBody Parameters:\n- **StoreInfoRequest**: A list of derivation paths\nReturns:\n- **StoreInfoResponse**: a map of derivation path to a list of store info objects", "operationId": "get_storepath_status_api_v1_catalog_store_status_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StoreInfoRequest" } } }, "required": true }, "responses": { "200": { "description": "The list of storepath statuses", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StorepathStatusResponse" } } } }, "422": { "description": "The request parameters are invalid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, "security": [ { "HTTPBearer": [] }, { "HTTPBasic": [] } ] } }, "/metrics/": { "get": { "summary": "Handle Metrics", "operationId": "handle_metrics_metrics__get", "responses": { "200": { "description": "Service Status", "content": { "application/json": { "schema": { "type": "string", "title": "Response 200 Handle Metrics Metrics Get" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "components": { "schemas": { "BaseCatalogInfo": { "properties": { "base_url": { "type": "string", "title": "Base Url" }, "scraped_pages": { "items": { "$ref": "#/components/schemas/PageInfo" }, "type": "array", "title": "Scraped Pages" }, "stabilities": { "items": { "$ref": "#/components/schemas/StabilityInfo" }, "type": "array", "title": "Stabilities" } }, "type": "object", "required": [ "base_url", "scraped_pages", "stabilities" ], "title": "BaseCatalogInfo" }, "CatalogPage": { "properties": { "page": { "type": "integer", "title": "Page" }, "url": { "type": "string", "title": "Url" }, "packages": { "title": "Packages", "nullable": true, "items": { "$ref": "#/components/schemas/ResolvedPackageDescriptor" }, "type": "array" }, "messages": { "items": { "$ref": "#/components/schemas/ResolutionMessageGeneral" }, "type": "array", "title": "Messages" }, "complete": { "type": "boolean", "title": "Complete" } }, "type": "object", "required": [ "page", "url", "messages", "complete" ], "title": "CatalogPage", "example": { "attr_path": "foo.bar.curl", "description": "A very nice Item", "license": "foo", "locked_url": "git:git?rev=xyz", "name": "curl", "outputs": "{}", "outputs_to_install": "{}", "pkg_path": "foo.bar.curl", "pname": "curl", "rev": "xyz", "rev_count": 4, "rev_date": 0, "stabilities": [ "stable", "unstable" ], "system": "x86_64-linux", "version": "1.0" } }, "CatalogShareInfo": { "properties": { "allow_read_users": { "title": "Allow Read Users", "default": [], "nullable": true, "items": { "type": "string" }, "type": "array" } }, "type": "object", "title": "CatalogShareInfo" }, "CatalogStatus": { "properties": { "systems": { "items": { "type": "string" }, "type": "array", "title": "Systems" }, "pages_ct": { "type": "integer", "title": "Pages Ct" }, "latest_rev": { "type": "string", "format": "date-time", "title": "Latest Rev" }, "latest_scrape": { "title": "Latest Scrape", "nullable": true, "type": "string", "format": "date-time" }, "attribute_path_ct": { "type": "integer", "title": "Attribute Path Ct" }, "search_index_ct": { "type": "integer", "title": "Search Index Ct" }, "derivations_ct": { "type": "integer", "title": "Derivations Ct" }, "storepaths_ct": { "title": "Storepaths Ct", "nullable": true, "type": "integer" }, "narinfos_ct": { "title": "Narinfos Ct", "nullable": true, "type": "integer" }, "schema_version": { "type": "string", "title": "Schema Version" }, "tags": { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "type": "object", "title": "Tags" } }, "type": "object", "required": [ "systems", "pages_ct", "latest_rev", "attribute_path_ct", "search_index_ct", "derivations_ct", "schema_version", "tags" ], "title": "CatalogStatus" }, "CatalogStoreConfig": { "oneOf": [ { "$ref": "#/components/schemas/CatalogStoreConfigNull" }, { "$ref": "#/components/schemas/CatalogStoreConfigMetaOnly" }, { "$ref": "#/components/schemas/CatalogStoreConfigNixCopy" }, { "$ref": "#/components/schemas/CatalogStoreConfigPublisher" } ], "title": "CatalogStoreConfig", "discriminator": { "propertyName": "store_type", "mapping": { "meta-only": "#/components/schemas/CatalogStoreConfigMetaOnly", "nix-copy": "#/components/schemas/CatalogStoreConfigNixCopy", "null": "#/components/schemas/CatalogStoreConfigNull", "publisher": "#/components/schemas/CatalogStoreConfigPublisher" } } }, "CatalogStoreConfigMetaOnly": { "properties": { "store_type": { "type": "string", "const": "meta-only", "title": "Store Type", "default": "meta-only" } }, "type": "object", "title": "CatalogStoreConfigMetaOnly" }, "CatalogStoreConfigNixCopy": { "properties": { "store_type": { "type": "string", "const": "nix-copy", "title": "Store Type", "default": "nix-copy" }, "ingress_uri": { "type": "string", "title": "Ingress Uri" }, "egress_uri": { "type": "string", "title": "Egress Uri" } }, "type": "object", "required": [ "ingress_uri", "egress_uri" ], "title": "CatalogStoreConfigNixCopy" }, "CatalogStoreConfigNull": { "properties": { "store_type": { "type": "string", "const": "null", "title": "Store Type", "default": "null" } }, "type": "object", "title": "CatalogStoreConfigNull" }, "CatalogStoreConfigPublisher": { "properties": { "store_type": { "type": "string", "const": "publisher", "title": "Store Type", "default": "publisher" }, "publisher_url": { "title": "Publisher Url", "deprecated": true, "nullable": true, "type": "string" } }, "type": "object", "title": "CatalogStoreConfigPublisher" }, "ErrorResponse": { "properties": { "detail": { "type": "string", "title": "Detail" } }, "type": "object", "required": [ "detail" ], "title": "ErrorResponse" }, "HealthCheck": { "properties": { "check_parameters": { "$ref": "#/components/schemas/params", "default": { "show_term": "hello", "search_term": "in Go", "search_system": "x86_64-linux", "resolve_package": "cowsay", "resolve_systems": [ "x86_64-linux" ] } }, "search_ok": { "type": "boolean", "title": "Search Ok" }, "search_elapsed_ms": { "type": "integer", "title": "Search Elapsed Ms" }, "resolve_ok": { "type": "boolean", "title": "Resolve Ok" }, "resolve_elapsed_ms": { "type": "integer", "title": "Resolve Elapsed Ms" }, "show_ok": { "type": "boolean", "title": "Show Ok" }, "show_elapsed_ms": { "type": "integer", "title": "Show Elapsed Ms" } }, "type": "object", "required": [ "search_ok", "search_elapsed_ms", "resolve_ok", "resolve_elapsed_ms", "show_ok", "show_elapsed_ms" ], "title": "HealthCheck" }, "MessageLevel": { "type": "string", "enum": [ "trace", "info", "warning", "error" ], "title": "MessageLevel" }, "MessageType": { "type": "string", "enum": [ "general", "resolution_logic", "attr_path_not_found", "constraints_too_tight", "attr_path_not_found.not_in_catalog", "attr_path_not_found.systems_not_on_same_page", "attr_path_not_found.not_found_for_all_systems", "missing_builds", "unacceptable_licenses", "change_in_version_format" ], "title": "MessageType" }, "NarFileLookup": { "properties": { "storepath": { "type": "string", "title": "Storepath" }, "derivations": { "items": { "$ref": "#/components/schemas/PackageDerivation-Output" }, "type": "array", "title": "Derivations" } }, "type": "object", "required": [ "storepath", "derivations" ], "title": "NarFileLookup" }, "NarInfo": { "properties": { "ca": { "title": "Ca", "nullable": true, "type": "string" }, "deriver": { "title": "Deriver", "nullable": true, "type": "string" }, "downloadHash": { "title": "Downloadhash", "nullable": true, "type": "string" }, "downloadSize": { "title": "Downloadsize", "nullable": true, "type": "integer" }, "narHash": { "title": "Narhash", "nullable": true, "type": "string" }, "narSize": { "title": "Narsize", "nullable": true, "type": "integer" }, "references": { "title": "References", "nullable": true, "items": { "type": "string" }, "type": "array" }, "registrationTime": { "title": "Registrationtime", "nullable": true, "type": "integer" }, "signatures": { "title": "Signatures", "nullable": true, "items": { "type": "string" }, "type": "array" }, "url": { "title": "Url", "nullable": true, "type": "string" }, "ultimate": { "title": "Ultimate", "nullable": true, "type": "boolean" }, "compression": { "title": "Compression", "nullable": true, "type": "string" }, "path": { "title": "Path", "nullable": true, "type": "string" }, "closureDownloadSize": { "title": "Closuredownloadsize", "nullable": true, "type": "integer" }, "closureSize": { "title": "Closuresize", "nullable": true, "type": "integer" }, "compresssize": { "title": "Compresssize", "deprecated": true, "nullable": true, "type": "string" } }, "type": "object", "title": "NarInfo" }, "NarInfos": { "additionalProperties": { "nullable": true, "$ref": "#/components/schemas/NarInfo" }, "type": "object", "title": "NarInfos" }, "PackageBuild": { "properties": { "url": { "type": "string", "title": "Url" }, "rev": { "type": "string", "title": "Rev" }, "rev_count": { "type": "integer", "title": "Rev Count" }, "rev_date": { "type": "string", "format": "date-time", "title": "Rev Date" }, "locked_base_catalog_url": { "title": "Locked Base Catalog Url", "nullable": true, "type": "string" }, "derivation": { "$ref": "#/components/schemas/PackageDerivation-Output" }, "cache_uri": { "title": "Cache Uri", "nullable": true, "type": "string" } }, "type": "object", "required": [ "url", "rev", "rev_count", "rev_date", "derivation" ], "title": "PackageBuild", "example": { "derivation": { "description": "A very nice derivation", "drv_path": "foo.bar.curl", "license": "GnuFoo", "name": "mydrv", "outputs": { "bin": "/nix/store/foo", "man": "/nix/store/bar" }, "outputs_to_install": [ "bin", "man" ], "pname": "mydrv", "system": "x86_64-linux", "version": "1.0" }, "locked_base_catalog_url": "https://github.com/flox/nixpkgs?rev=99dc8785f6a0adac95f5e2ab05cc2e1bf666d172", "rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172", "rev_count": 12345, "rev_date": "2021-09-01T00:00:00Z", "url": "https://github.com/org/example" } }, "PackageBuildList": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PackageBuild" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "PackageBuildList" }, "PackageBuildResponse": { "properties": {}, "type": "object", "title": "PackageBuildResponse" }, "PackageBuildWithNarInfo": { "properties": { "url": { "type": "string", "title": "Url" }, "rev": { "type": "string", "title": "Rev" }, "rev_count": { "type": "integer", "title": "Rev Count" }, "rev_date": { "type": "string", "format": "date-time", "title": "Rev Date" }, "locked_base_catalog_url": { "title": "Locked Base Catalog Url", "nullable": true, "type": "string" }, "derivation": { "$ref": "#/components/schemas/PackageDerivation-Input" }, "cache_uri": { "title": "Cache Uri", "nullable": true, "type": "string" }, "narinfos": { "nullable": true, "$ref": "#/components/schemas/NarInfos" }, "narinfos_source_url": { "title": "Narinfos Source Url", "nullable": true, "type": "string" }, "narinfos_source_version": { "title": "Narinfos Source Version", "nullable": true, "type": "integer" } }, "type": "object", "required": [ "url", "rev", "rev_count", "rev_date", "derivation" ], "title": "PackageBuildWithNarInfo", "example": { "derivation": { "description": "A very nice derivation", "drv_path": "foo.bar.curl", "license": "GnuFoo", "name": "mydrv", "outputs": { "bin": "/nix/store/foo", "man": "/nix/store/bar" }, "outputs_to_install": [ "bin", "man" ], "pname": "mydrv", "system": "x86_64-linux", "version": "1.0" }, "locked_base_catalog_url": "https://github.com/flox/nixpkgs?rev=99dc8785f6a0adac95f5e2ab05cc2e1bf666d172", "rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172", "rev_count": 12345, "rev_date": "2021-09-01T00:00:00Z", "url": "https://github.com/org/example" } }, "PackageDerivation-Input": { "properties": { "drv_path": { "type": "string", "title": "Drv Path" }, "system": { "$ref": "#/components/schemas/PackageSystem" }, "name": { "type": "string", "title": "Name" }, "outputs": { "$ref": "#/components/schemas/PackageOutputs" }, "outputs_to_install": { "title": "Outputs To Install", "nullable": true, "items": { "type": "string" }, "type": "array" }, "description": { "title": "Description", "nullable": true, "type": "string" }, "pname": { "title": "Pname", "nullable": true, "type": "string" }, "version": { "title": "Version", "nullable": true, "type": "string" }, "license": { "title": "License", "nullable": true, "type": "string" }, "broken": { "title": "Broken", "nullable": true, "type": "boolean" }, "unfree": { "title": "Unfree", "nullable": true, "type": "boolean" } }, "type": "object", "required": [ "drv_path", "system", "name", "outputs" ], "title": "PackageDerivation", "example": { "description": "A very nice derivation", "drv_path": "foo.bar.curl", "license": "GnuFoo", "name": "mydrv", "outputs": { "bin": "/nix/store/foo", "man": "/nix/store/bar" }, "outputs_to_install": [ "bin", "man" ], "pname": "mydrv", "system": "x86_64-linux", "version": "1.0" } }, "PackageDerivation-Output": { "properties": { "drv_path": { "type": "string", "title": "Drv Path" }, "system": { "$ref": "#/components/schemas/PackageSystem" }, "name": { "type": "string", "title": "Name" }, "outputs": { "$ref": "#/components/schemas/PackageOutputs" }, "outputs_to_install": { "title": "Outputs To Install", "nullable": true, "items": { "type": "string" }, "type": "array" }, "description": { "title": "Description", "nullable": true, "type": "string" }, "pname": { "title": "Pname", "nullable": true, "type": "string" }, "version": { "title": "Version", "nullable": true, "type": "string" }, "license": { "title": "License", "nullable": true, "type": "string" }, "broken": { "title": "Broken", "nullable": true, "type": "boolean" }, "unfree": { "title": "Unfree", "nullable": true, "type": "boolean" } }, "type": "object", "required": [ "drv_path", "system", "name", "outputs" ], "title": "PackageDerivation", "example": { "description": "A very nice derivation", "drv_path": "foo.bar.curl", "license": "GnuFoo", "name": "mydrv", "outputs": { "bin": "/nix/store/foo", "man": "/nix/store/bar" }, "outputs_to_install": [ "bin", "man" ], "pname": "mydrv", "system": "x86_64-linux", "version": "1.0" } }, "PackageDescriptor": { "properties": { "install_id": { "type": "string", "title": "Install Id" }, "attr_path": { "type": "string", "title": "Attr Path" }, "systems": { "items": { "$ref": "#/components/schemas/PackageSystem" }, "type": "array", "title": "Systems" }, "version": { "title": "Version", "nullable": true, "type": "string" }, "allow_pre_releases": { "title": "Allow Pre Releases", "default": false, "nullable": true, "type": "boolean" }, "allow_unfree": { "title": "Allow Unfree", "default": true, "nullable": true, "type": "boolean" }, "allow_broken": { "title": "Allow Broken", "default": false, "nullable": true, "type": "boolean" }, "allow_insecure": { "title": "Allow Insecure", "default": false, "nullable": true, "type": "boolean" }, "allowed_licenses": { "title": "Allowed Licenses", "nullable": true, "items": { "type": "string" }, "type": "array" }, "allow_missing_builds": { "title": "Allow Missing Builds", "nullable": true, "type": "boolean" }, "derivation": { "title": "Derivation", "nullable": true, "type": "string" } }, "type": "object", "required": [ "install_id", "attr_path", "systems" ], "title": "PackageDescriptor", "example": { "attr_path": "curl", "install_id": "curl", "systems": [ "x86_64-linux" ] } }, "PackageGroup": { "properties": { "name": { "type": "string", "title": "Name" }, "stability": { "title": "Stability", "nullable": true, "type": "string" }, "descriptors": { "items": { "$ref": "#/components/schemas/PackageDescriptor" }, "type": "array", "title": "Descriptors" } }, "type": "object", "required": [ "name", "descriptors" ], "title": "PackageGroup", "example": { "descriptors": [ { "attr_path": "curl", "install_id": "curl", "systems": [ "x86_64-linux" ] }, { "attr_path": "slack", "install_id": "slack", "systems": [ "x86_64-linux" ] }, { "attr_path": "xorg.xeyes", "install_id": "xeyes", "systems": [ "x86_64-linux" ] } ], "name": "test" } }, "PackageGroups": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PackageGroup" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "PackageGroups", "example": { "items": [ { "descriptors": [ { "attr_path": "curl", "install_id": "curl", "systems": [ "x86_64-linux" ] }, { "attr_path": "slack", "install_id": "slack", "systems": [ "x86_64-linux" ] }, { "attr_path": "xorg.xeyes", "install_id": "xeyes", "systems": [ "x86_64-linux" ] } ], "name": "test" } ] } }, "PackageInfoSearch": { "properties": { "attr_path": { "type": "string", "title": "Attr Path" }, "catalog": { "title": "Catalog", "nullable": true, "type": "string" }, "pkg_path": { "type": "string", "title": "Pkg Path" }, "name": { "type": "string", "title": "Name" }, "pname": { "type": "string", "title": "Pname" }, "version": { "title": "Version", "description": "While version should always be present, (and is required in the PackageResolutionInfo model), there are cases where it has been historically optional and thus is carried forward here. Published derivations have an Optional version and this same model is used for both published derivations and base catalog derivations. For this reason we cannot make it required here until/if we unify those models and ensure every derivation does in fact have a version.", "nullable": true, "type": "string" }, "description": { "title": "Description", "nullable": true, "type": "string" }, "stabilities": { "items": { "type": "string" }, "type": "array", "title": "Stabilities" }, "system": { "$ref": "#/components/schemas/PackageSystem" } }, "type": "object", "required": [ "attr_path", "catalog", "pkg_path", "name", "pname", "version", "description", "stabilities", "system" ], "title": "PackageInfoSearch", "example": { "attr_path": "foo.bar.curl", "catalog": "nixpkgs", "description": "A very nice Item", "name": "curl", "pkg_path": "foo.bar.curl", "pname": "curl", "stabilities": [ "stable", "unstable" ], "system": "x86_64-linux", "version": "1.0" } }, "PackageOutput": { "properties": { "name": { "type": "string", "title": "Name" }, "store_path": { "type": "string", "title": "Store Path" } }, "type": "object", "required": [ "name", "store_path" ], "title": "PackageOutput" }, "PackageOutputs": { "items": { "$ref": "#/components/schemas/PackageOutput" }, "type": "array", "title": "PackageOutputs" }, "PackageResolutionInfo": { "properties": { "catalog": { "title": "Catalog", "nullable": true, "type": "string" }, "attr_path": { "type": "string", "title": "Attr Path" }, "pkg_path": { "type": "string", "title": "Pkg Path" }, "derivation": { "type": "string", "title": "Derivation" }, "name": { "type": "string", "title": "Name" }, "pname": { "type": "string", "title": "Pname" }, "version": { "type": "string", "title": "Version" }, "system": { "$ref": "#/components/schemas/PackageSystem" }, "outputs": { "$ref": "#/components/schemas/PackageOutputs" }, "outputs_to_install": { "title": "Outputs To Install", "nullable": true, "items": { "type": "string" }, "type": "array" }, "description": { "title": "Description", "nullable": true, "type": "string" }, "license": { "title": "License", "nullable": true, "type": "string" }, "locked_url": { "type": "string", "title": "Locked Url" }, "rev": { "type": "string", "title": "Rev" }, "rev_count": { "type": "integer", "title": "Rev Count" }, "rev_date": { "type": "string", "format": "date-time", "title": "Rev Date" }, "broken": { "title": "Broken", "nullable": true, "type": "boolean" }, "insecure": { "title": "Insecure", "nullable": true, "type": "boolean" }, "unfree": { "title": "Unfree", "nullable": true, "type": "boolean" }, "missing_builds": { "title": "Missing Builds", "nullable": true, "type": "boolean" }, "stabilities": { "title": "Stabilities", "nullable": true, "items": { "type": "string" }, "type": "array" }, "scrape_date": { "title": "Scrape Date", "nullable": true, "type": "string", "format": "date-time" }, "cache_uri": { "title": "Cache Uri", "nullable": true, "type": "string" } }, "type": "object", "required": [ "attr_path", "pkg_path", "derivation", "name", "pname", "version", "system", "outputs", "outputs_to_install", "description", "license", "locked_url", "rev", "rev_count", "rev_date", "broken", "insecure", "unfree", "missing_builds", "stabilities", "scrape_date" ], "title": "PackageResolutionInfo" }, "PackageSearchResult": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PackageInfoSearch" }, "type": "array", "title": "Items" }, "total_count": { "type": "integer", "title": "Total Count" } }, "type": "object", "required": [ "items", "total_count" ], "title": "PackageSearchResult", "example": [ { "attr_path": "foo.bar.curl", "catalog": "nixpkgs", "description": "A very nice Item", "name": "curl", "pkg_path": "foo.bar.curl", "pname": "curl", "stabilities": [ "stable", "unstable" ], "system": "x86_64-linux", "version": "1.0" } ] }, "PackageSystem": { "type": "string", "enum": [ "aarch64-darwin", "aarch64-linux", "x86_64-darwin", "x86_64-linux", "invalid" ], "title": "PackageSystem" }, "PackagesResult": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PackageResolutionInfo" }, "type": "array", "title": "Items" }, "total_count": { "type": "integer", "title": "Total Count" } }, "type": "object", "required": [ "items", "total_count" ], "title": "PackagesResult" }, "PageInfo": { "properties": { "rev": { "type": "string", "title": "Rev" }, "rev_count": { "type": "integer", "title": "Rev Count" }, "stability_tags": { "items": { "type": "string" }, "type": "array", "title": "Stability Tags" } }, "type": "object", "required": [ "rev", "rev_count", "stability_tags" ], "title": "PageInfo" }, "PkgPathsResult": { "properties": { "items": { "items": { "type": "string" }, "type": "array", "title": "Items" }, "total_count": { "type": "integer", "title": "Total Count" } }, "type": "object", "required": [ "items", "total_count" ], "title": "PkgPathsResult" }, "PublishInfoRequest": { "properties": {}, "type": "object", "title": "PublishInfoRequest" }, "PublishInfoResponseCatalog": { "properties": { "ingress_uri": { "title": "Ingress Uri", "nullable": true, "type": "string" }, "ingress_auth": { "title": "Ingress Auth", "nullable": true, "additionalProperties": true, "type": "object" }, "catalog_store_config": { "$ref": "#/components/schemas/CatalogStoreConfig" } }, "type": "object", "required": [ "catalog_store_config" ], "title": "PublishInfoResponseCatalog" }, "PublishedCatalog": { "properties": { "name": { "type": "string", "title": "Name" }, "store_type": { "type": "string", "title": "Store Type" }, "created": { "type": "string", "format": "date-time", "title": "Created" }, "package_ct": { "type": "integer", "title": "Package Ct" }, "package_builds_ct": { "type": "integer", "title": "Package Builds Ct" }, "per_package_builds_ct": { "items": { "type": "integer" }, "type": "array", "title": "Per Package Builds Ct" } }, "type": "object", "required": [ "name", "store_type", "created", "package_ct", "package_builds_ct", "per_package_builds_ct" ], "title": "PublishedCatalog" }, "PublishedCatalogInfo": { "properties": { "catalogs": { "items": { "$ref": "#/components/schemas/PublishedCatalog" }, "type": "array", "title": "Catalogs" } }, "type": "object", "required": [ "catalogs" ], "title": "PublishedCatalogInfo" }, "RawDependencyReport": { "properties": { "storepath": { "type": "string", "title": "Storepath" }, "dependencies": { "additionalProperties": { "nullable": true, "items": { "type": "string" }, "type": "array" }, "type": "object", "title": "Dependencies" } }, "type": "object", "required": [ "storepath", "dependencies" ], "title": "RawDependencyReport" }, "ResolutionMessageGeneral": { "properties": { "level": { "$ref": "#/components/schemas/MessageLevel" }, "type": { "$ref": "#/components/schemas/MessageType" }, "message": { "type": "string", "title": "Message" }, "context": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Context" } }, "type": "object", "required": [ "level", "type", "message", "context" ], "title": "ResolutionMessageGeneral" }, "ResolvedPackageDescriptor": { "properties": { "catalog": { "title": "Catalog", "nullable": true, "type": "string" }, "attr_path": { "type": "string", "title": "Attr Path" }, "pkg_path": { "type": "string", "title": "Pkg Path" }, "derivation": { "type": "string", "title": "Derivation" }, "name": { "type": "string", "title": "Name" }, "pname": { "type": "string", "title": "Pname" }, "version": { "type": "string", "title": "Version" }, "system": { "$ref": "#/components/schemas/PackageSystem" }, "outputs": { "$ref": "#/components/schemas/PackageOutputs" }, "outputs_to_install": { "title": "Outputs To Install", "nullable": true, "items": { "type": "string" }, "type": "array" }, "description": { "title": "Description", "nullable": true, "type": "string" }, "license": { "title": "License", "nullable": true, "type": "string" }, "locked_url": { "type": "string", "title": "Locked Url" }, "rev": { "type": "string", "title": "Rev" }, "rev_count": { "type": "integer", "title": "Rev Count" }, "rev_date": { "type": "string", "format": "date-time", "title": "Rev Date" }, "broken": { "title": "Broken", "nullable": true, "type": "boolean" }, "insecure": { "title": "Insecure", "nullable": true, "type": "boolean" }, "unfree": { "title": "Unfree", "nullable": true, "type": "boolean" }, "missing_builds": { "title": "Missing Builds", "nullable": true, "type": "boolean" }, "stabilities": { "title": "Stabilities", "nullable": true, "items": { "type": "string" }, "type": "array" }, "scrape_date": { "title": "Scrape Date", "nullable": true, "type": "string", "format": "date-time" }, "cache_uri": { "title": "Cache Uri", "nullable": true, "type": "string" }, "install_id": { "type": "string", "title": "Install Id" } }, "type": "object", "required": [ "attr_path", "pkg_path", "derivation", "name", "pname", "version", "system", "outputs", "outputs_to_install", "description", "license", "locked_url", "rev", "rev_count", "rev_date", "broken", "insecure", "unfree", "missing_builds", "stabilities", "scrape_date", "install_id" ], "title": "ResolvedPackageDescriptor" }, "ResolvedPackageGroup": { "properties": { "name": { "type": "string", "title": "Name" }, "page": { "nullable": true, "$ref": "#/components/schemas/CatalogPage" }, "candidate_pages": { "title": "Candidate Pages", "nullable": true, "items": { "$ref": "#/components/schemas/CatalogPage" }, "type": "array" }, "messages": { "items": { "$ref": "#/components/schemas/ResolutionMessageGeneral" }, "type": "array", "title": "Messages" } }, "type": "object", "required": [ "name", "messages" ], "title": "ResolvedPackageGroup", "example": { "attr_path": "foo.bar.curl", "description": "A very nice Item", "license": "foo", "locked_url": "git:git?rev=xyz", "name": "curl", "outputs": "{}", "outputs_to_install": "{}", "pkg_path": "foo.bar.curl", "pname": "curl", "rev": "xyz", "rev_count": 4, "rev_date": 0, "stabilities": [ "stable", "unstable" ], "system": "x86_64-linux", "version": "1.0" } }, "ResolvedPackageGroups": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ResolvedPackageGroup" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "ResolvedPackageGroups" }, "ServiceStatus": { "properties": { "service_version": { "type": "string", "title": "Service Version" }, "start_tm": { "type": "string", "format": "date-time", "title": "Start Tm" }, "uptime_seconds": { "type": "number", "title": "Uptime Seconds", "readOnly": true }, "uptime_pretty": { "type": "string", "title": "Uptime Pretty", "readOnly": true } }, "type": "object", "required": [ "service_version", "start_tm", "uptime_seconds", "uptime_pretty" ], "title": "ServiceStatus" }, "StabilityInfo": { "properties": { "name": { "type": "string", "title": "Name" }, "ref": { "type": "string", "title": "Ref" } }, "type": "object", "required": [ "name", "ref" ], "title": "StabilityInfo" }, "StoreInfo": { "properties": { "url": { "title": "Url", "nullable": true, "type": "string" }, "auth": { "title": "Auth", "nullable": true, "additionalProperties": true, "type": "object" }, "catalog": { "title": "Catalog", "nullable": true, "type": "string" }, "package": { "title": "Package", "nullable": true, "type": "string" }, "public_keys": { "title": "Public Keys", "nullable": true, "items": { "type": "string" }, "type": "array" } }, "type": "object", "title": "StoreInfo" }, "StoreInfoRequest": { "properties": { "outpaths": { "items": { "type": "string" }, "type": "array", "title": "Outpaths" } }, "type": "object", "required": [ "outpaths" ], "title": "StoreInfoRequest" }, "StoreInfoResponse": { "properties": { "items": { "additionalProperties": { "items": { "$ref": "#/components/schemas/StoreInfo" }, "type": "array" }, "type": "object", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "StoreInfoResponse" }, "StorepathStatus": { "properties": { "catalog": { "type": "string", "title": "Catalog" }, "package": { "type": "string", "title": "Package" }, "narinfo_known": { "type": "boolean", "title": "Narinfo Known" } }, "type": "object", "required": [ "catalog", "package", "narinfo_known" ], "title": "StorepathStatus" }, "StorepathStatusResponse": { "properties": { "items": { "additionalProperties": { "items": { "$ref": "#/components/schemas/StorepathStatus" }, "type": "array" }, "type": "object", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "StorepathStatusResponse" }, "UserCatalog": { "properties": { "id": { "type": "integer", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "owner_handle": { "title": "Owner Handle", "nullable": true, "type": "string" } }, "type": "object", "required": [ "id", "name", "created_at" ], "title": "UserCatalog" }, "UserPackage": { "properties": { "catalog": { "type": "string", "title": "Catalog" }, "name": { "type": "string", "title": "Name" }, "original_url": { "title": "Original Url", "deprecated": true, "nullable": true, "type": "string" } }, "type": "object", "required": [ "catalog", "name" ], "title": "UserPackage" }, "UserPackageCreate": { "properties": { "original_url": { "title": "Original Url", "deprecated": true, "nullable": true, "type": "string" } }, "type": "object", "title": "UserPackageCreate" }, "UserPackageList": { "properties": { "items": { "items": { "$ref": "#/components/schemas/UserPackage" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "UserPackageList" }, "params": { "properties": { "show_term": { "type": "string", "title": "Show Term", "default": "hello" }, "search_term": { "type": "string", "title": "Search Term", "default": "in Go" }, "search_system": { "$ref": "#/components/schemas/PackageSystem", "default": "x86_64-linux" }, "resolve_package": { "type": "string", "title": "Resolve Package", "default": "cowsay" }, "resolve_systems": { "items": { "$ref": "#/components/schemas/PackageSystem" }, "type": "array", "title": "Resolve Systems", "default": [ "x86_64-linux" ] } }, "type": "object", "title": "params" } }, "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" }, "HTTPBasic": { "type": "http", "scheme": "basic" } } } }