add exact; add multiple status matching; update deps
This commit is contained in:
@@ -2,110 +2,133 @@ openapi: 3.1.0
|
||||
info:
|
||||
title: ALHP API
|
||||
description: |-
|
||||
ALHP API used to retrieve information about packages and general statistics.
|
||||
The ALHP API allows to retrieve package information and general build statistics.
|
||||
|
||||
Some useful links:
|
||||
- [ALHP Git](https://somegit.dev/ALHP/ALHP.GO)
|
||||
- [ALHP Web Git](https://somegit.dev/ALHP/alhp-web)
|
||||
Useful resources:
|
||||
- [ALHP Git Repository](https://somegit.dev/ALHP/ALHP.GO)
|
||||
- [ALHP Web Frontend Repository](https://somegit.dev/ALHP/alhp-web)
|
||||
|
||||
version: 1.0.2
|
||||
|
||||
version: 1.0.1
|
||||
servers:
|
||||
- url: https://api.alhp.dev
|
||||
|
||||
tags:
|
||||
- name: package
|
||||
description: Everything about packages
|
||||
description: Endpoints related to package data and metadata
|
||||
- name: general
|
||||
description: General information related to overall project status
|
||||
description: Endpoints providing overall project status and statistics
|
||||
|
||||
paths:
|
||||
/packages:
|
||||
get:
|
||||
tags:
|
||||
- package
|
||||
summary: Get information about packages
|
||||
description: Retrieve packages with or without filtering
|
||||
summary: Retrieve package information
|
||||
description: Fetch packages from the ALHP system. You can filter results using query parameters.
|
||||
operationId: getPackages
|
||||
parameters:
|
||||
- name: status
|
||||
in: query
|
||||
description: Status value to filter for
|
||||
description: Filter by package status. Accepts multiple values via repeated parameters.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- latest
|
||||
- failed
|
||||
- built
|
||||
- skipped
|
||||
- delayed
|
||||
- building
|
||||
- signing
|
||||
- unknown
|
||||
- queued
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- latest
|
||||
- failed
|
||||
- built
|
||||
- skipped
|
||||
- delayed
|
||||
- building
|
||||
- signing
|
||||
- unknown
|
||||
- queued
|
||||
example: [ "latest", "failed" ]
|
||||
- name: pkgbase
|
||||
in: query
|
||||
description: Pkgbase value to filter
|
||||
description: Filter by the base package name (`pkgbase`). This is often the main identifier of a package group.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: "linux-zen"
|
||||
- name: exact
|
||||
in: query
|
||||
description: If present, matches the `pkgbase` exactly. If not provided, allows partial matches.
|
||||
required: false
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
example: true
|
||||
- name: repo
|
||||
in: query
|
||||
description: Repo to filter
|
||||
description: Filter by repository name.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: "extra-x86-64-v4"
|
||||
- name: offset
|
||||
in: query
|
||||
description: How many entries to skip
|
||||
description: Number of results to skip (for pagination).
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
example: 0
|
||||
- name: limit
|
||||
in: query
|
||||
description: How many entries to return at max
|
||||
description: Maximum number of results to return.
|
||||
required: true
|
||||
schema:
|
||||
type: number
|
||||
example: 25
|
||||
responses:
|
||||
'200':
|
||||
description: Successful retrieveal
|
||||
description: Package data retrieved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
properties:
|
||||
packages:
|
||||
type: array
|
||||
items:
|
||||
items:
|
||||
$ref: '#/components/schemas/Package'
|
||||
total:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Total number of matching packages
|
||||
example: 1423
|
||||
offset:
|
||||
type: integer
|
||||
format: int64
|
||||
example: 0
|
||||
limit:
|
||||
type: integer
|
||||
format: int64
|
||||
example: 25
|
||||
'404':
|
||||
description: No packages found matching filters
|
||||
description: No packages found matching the specified filters
|
||||
'500':
|
||||
description: Internal error
|
||||
description: Internal server error occurred
|
||||
|
||||
/stats:
|
||||
get:
|
||||
tags:
|
||||
- general
|
||||
summary: Get general package stats
|
||||
summary: Retrieve general build statistics
|
||||
operationId: getStats
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
description: General statistics retrieved successfully
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Stats'
|
||||
'500':
|
||||
description: Internal error
|
||||
|
||||
description: Internal server error occurred
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Package:
|
||||
@@ -113,87 +136,110 @@ components:
|
||||
properties:
|
||||
pkgbase:
|
||||
type: string
|
||||
examples: ["linux-zen"]
|
||||
description: The base name of the package
|
||||
example: "linux-zen"
|
||||
repo:
|
||||
type: string
|
||||
examples: ["extra-x86-64-v4"]
|
||||
description: Repository from which the package originates
|
||||
example: "extra-x86-64-v4"
|
||||
split_packages:
|
||||
type: array
|
||||
description: List of package names split from the base package
|
||||
items:
|
||||
type: string
|
||||
examples:
|
||||
- ["linux-zen", "linux-zen-headers", "linux-zen-docs"]
|
||||
example: [ "linux-zen", "linux-zen-headers", "linux-zen-docs" ]
|
||||
status:
|
||||
type: string
|
||||
examples: [latest]
|
||||
description: Current build or repository status of the package
|
||||
enum:
|
||||
- latest
|
||||
- failed
|
||||
- built
|
||||
- skipped
|
||||
- delayed
|
||||
- building
|
||||
- signing
|
||||
- unknown
|
||||
- queued
|
||||
- latest
|
||||
- failed
|
||||
- built
|
||||
- skipped
|
||||
- delayed
|
||||
- building
|
||||
- signing
|
||||
- unknown
|
||||
- queued
|
||||
example: "latest"
|
||||
skip_reason:
|
||||
type: string
|
||||
examples: ["blacklisted"]
|
||||
description: Reason for skipping the package build (if any)
|
||||
example: "blacklisted"
|
||||
lto:
|
||||
type: string
|
||||
examples: [enabled]
|
||||
description: Link Time Optimization (LTO) status for the package
|
||||
enum:
|
||||
- enabled
|
||||
- unknown
|
||||
- disabled
|
||||
- auto_disabled
|
||||
- enabled
|
||||
- unknown
|
||||
- disabled
|
||||
- auto_disabled
|
||||
example: "enabled"
|
||||
debug_symbols:
|
||||
type: string
|
||||
examples: [available]
|
||||
description: Availability of debug symbols in the package
|
||||
enum:
|
||||
- available
|
||||
- unknown
|
||||
- not_available
|
||||
- available
|
||||
- unknown
|
||||
- not_available
|
||||
example: "available"
|
||||
arch_version:
|
||||
description: Version alhp compares to from official Archlinux repositories.
|
||||
type: string
|
||||
examples: ["1.3.4-2"]
|
||||
description: Version available in the official Arch Linux repositories
|
||||
example: "1.3.4-2"
|
||||
repo_version:
|
||||
description: Version alhp currently offers in its repositories. Can be missing/empty.
|
||||
type: string
|
||||
examples: ["1.3.4-2.1"]
|
||||
description: Version available in ALHP repositories (may be empty if not built)
|
||||
example: "1.3.4-2.1"
|
||||
build_date:
|
||||
description: When the package was build, formatted after RFC1123
|
||||
type: string
|
||||
examples: ["Fri, 15 Dec 2023 03:43:11 UTC"]
|
||||
description: Date and time when the package was built (RFC1123 format)
|
||||
example: "Fri, 15 Dec 2023 03:43:11 UTC"
|
||||
peak_mem:
|
||||
description: Peak memory the package used while building. Is formatted in a human readable format.
|
||||
examples: ["5 GB"]
|
||||
type: string
|
||||
description: Peak memory usage during the build process (human-readable format)
|
||||
example: "5 GB"
|
||||
|
||||
Stats:
|
||||
type: object
|
||||
description: Aggregated statistics across all packages
|
||||
properties:
|
||||
failed:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Number of packages that failed to build
|
||||
example: 17
|
||||
skipped:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Number of packages that were skipped
|
||||
example: 29
|
||||
latest:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Number of packages that are up-to-date
|
||||
example: 743
|
||||
queued:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Number of packages currently in the build queue
|
||||
example: 5
|
||||
lto:
|
||||
type: object
|
||||
properties:
|
||||
description: LTO status summary across all packages
|
||||
properties:
|
||||
enabled:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Number of packages with LTO enabled
|
||||
example: 532
|
||||
disabled:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Number of packages with LTO explicitly disabled
|
||||
example: 203
|
||||
unknown:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Number of packages with unknown LTO status
|
||||
example: 11
|
||||
|
Reference in New Issue
Block a user