Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document project history endpoint #16003

Merged
merged 1 commit into from Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/api/public/apidocs/OBS-v2.10.50.yaml
Expand Up @@ -317,6 +317,8 @@ paths:
$ref: 'paths/source_project_name_attribute.yaml'
/source/{project_name}/_attribute/{attribute_name}:
$ref: 'paths/source_project_name_attribute_attribute_name.yaml'
/source/{project_name}/_project/_history:
$ref: 'paths/source_project_name_project_history.yaml'
/source/{project_name}/_project/{file_name}:
$ref: 'paths/source_project_name_project_file.yaml'
/source/{project_name}?cmd=addchannels:
Expand Down
@@ -0,0 +1,87 @@
get:
summary: Get project commit history.
description: Get project commit history.
security:
- basic_authentication: []
parameters:
- $ref: '../components/parameters/project_name.yaml'
- in: query
name: deleted
schema:
type: string
description: Set to `1` to allow to retrieve the revision history of a deleted project.
example: 1
- in: query
name: limit
schema:
type: integer
description: Limit the number of retrieved revision history elements to the specified number.
example: 20
- in: query
name: meta
schema:
type: string
description: Set to `1` to retrieve the revision history of the meta file (`_meta`) of the project.
example: 1
- in: query
name: startbefore
schema:
type: integer
description: Start the list of revision history elements before the given revision number.
example: 124
- in: query
name: rev
schema:
type: string
description: Return the revision entry for a specific revision number.
responses:
'200':
description: |
OK. The request has succeeded.

XML Schema used for body validation: [revisionlist.rng](../schema/revisionlist.rng)
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/revision_list.yaml'
examples:
Two Revisions:
value:
- rev: 1
vrev: ''
srcmd5: d41d8cd98f00b204e9800998ecf8427e
version: ''
time: 1678364228
user: Admin
comment: project was deleted
- rev: 2
vrev: ''
srcmd5: d41d8cd98f00b204e9800998ecf8427e
version: ''
time: 1678364246
user: Admin
comment: project was undeleted
rev Parameter Specified (rev = 1):
value:
- rev: 1
vrev: ''
srcmd5: d41d8cd98f00b204e9800998ecf8427e
version: ''
time: 1678364228
user: Admin
comment: project was deleted
'401':
$ref: '../components/responses/unauthorized.yaml'
'404':
description: Not Found.
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/api_response.yaml'
examples:
Unknown Project:
value:
code: unknown_project
summary: "Project not found: home:some_project"
tags:
- Sources - Projects