From 9727b8620302276ed9f65b8d24c12273371bb99e Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Tue, 14 Jun 2022 22:41:28 +0200 Subject: [PATCH] docs(api): updated to new "targets" naming --- docs/api/source/includes/_logs.md | 10 ++-- .../source/includes/{_git.md => _targets.md} | 51 +++++++++---------- docs/api/source/index.html.md | 2 +- 3 files changed, 31 insertions(+), 32 deletions(-) rename docs/api/source/includes/{_git.md => _targets.md} (71%) diff --git a/docs/api/source/includes/_logs.md b/docs/api/source/includes/_logs.md index d4f7632..a38bf48 100644 --- a/docs/api/source/includes/_logs.md +++ b/docs/api/source/includes/_logs.md @@ -24,7 +24,7 @@ curl \ "data": [ { "id": 1, - "repo_id": 3, + "target_id": 3, "start_time": 1652008554, "end_time": 1652008559, "arch": "x86_64", @@ -46,7 +46,7 @@ Parameter | Description --------- | ----------- limit | Maximum amount of results to return. offset | Offset of results. -repo | Only return builds published to this repository. +target | Only return builds for this target id. before | Only return logs started before this time (UTC epoch) after | Only return logs started after this time (UTC epoch) arch | Only return logs built on this architecture @@ -58,7 +58,7 @@ exit_codes | Comma-separated list of exit codes to limit result to; using `!` as ```shell curl \ -H 'X-Api-Key: secret' \ - https://example.com/api/logs/15 + https://example.com/api/logs/1 ``` > JSON output format @@ -68,7 +68,7 @@ curl \ "message": "", "data": { "id": 1, - "repo_id": 3, + "target_id": 3, "start_time": 1652008554, "end_time": 1652008559, "arch": "x86_64", @@ -129,11 +129,11 @@ Publish a new build log to the server. Parameter | Description --------- | ----------- -id | ID of requested log startTime | Start time of the build (UTC epoch) endTime | End time of the build (UTC epoch) arch | Architecture on which the build was done exitCode | Exit code of the build container +target | id of target this build is for ### Request body diff --git a/docs/api/source/includes/_git.md b/docs/api/source/includes/_targets.md similarity index 71% rename from docs/api/source/includes/_git.md rename to docs/api/source/includes/_targets.md index 8458834..05cf001 100644 --- a/docs/api/source/includes/_git.md +++ b/docs/api/source/includes/_targets.md @@ -1,4 +1,4 @@ -# Git Repositories +# Targets -Endpoints for interacting with the list of Git repositories stored on the -server. +Endpoints for interacting with the list of targets stored on the server. -## List repos +## List targets ```shell curl \ -H 'X-Api-Key: secret' \ - https://example.com/api/repos?offset=10&limit=20 + https://example.com/api/targets?offset=10&limit=20 ``` > JSON output format @@ -32,7 +31,7 @@ curl \ "arch": [ { "id": 1, - "repo_id": 1, + "target_id": 1, "value": "x86_64" } ] @@ -41,11 +40,11 @@ curl \ } ``` -Retrieve a list of Git repositories. +Retrieve a list of targets. ### HTTP Request -`GET /api/repos` +`GET /api/targets` ### Query Parameters @@ -53,14 +52,14 @@ Parameter | Description --------- | ----------- limit | Maximum amount of results to return. offset | Offset of results. -repo | Limit results to repositories that publish to the given repo. +repo | Limit results to targets that publish to the given repo. -## Get a repo +## Get specific target ```shell curl \ -H 'X-Api-Key: secret' \ - https://example.com/api/repos/15 + https://example.com/api/targets/1 ``` > JSON output format @@ -77,7 +76,7 @@ curl \ "arch": [ { "id": 1, - "repo_id": 1, + "target_id": 1, "value": "x86_64" } ] @@ -85,25 +84,25 @@ curl \ } ``` -Get info about a specific Git repository. +Get info about a specific target. ### HTTP Request -`GET /api/repos/:id` +`GET /api/targets/:id` ### URL Parameters Parameter | Description --------- | ----------- -id | ID of requested repo +id | id of requested target -## Create a new repo +## Create a new target -Create a new Git repository with the given data. +Create a new target with the given data. ### HTTP Request -`POST /api/repos` +`POST /api/targets` ### Query Parameters @@ -115,19 +114,19 @@ repo | Vieter repository to publish built packages to. schedule | Cron build schedule (syntax explained [here](https://rustybever.be/docs/vieter/usage/builds/schedule/)) arch | Comma-separated list of architectures to build package on. -## Modify a repo +## Modify a target -Modify the data of an existing Git repository. +Modify the data of an existing target. ### HTTP Request -`PATCH /api/repos/:id` +`PATCH /api/targets/:id` ### URL Parameters Parameter | Description --------- | ----------- -id | ID of requested repo +id | id of target to modify ### Query Parameters @@ -139,16 +138,16 @@ repo | Vieter repository to publish built packages to. schedule | Cron build schedule arch | Comma-separated list of architectures to build package on. -## Remove a repo +## Remove a target -Remove a Git repository from the server. +Remove a target from the server. ### HTTP Request -`DELETE /api/repos/:id` +`DELETE /api/targets/:id` ### URL Parameters Parameter | Description --------- | ----------- -id | ID of repo to remove +id | id of target to remove diff --git a/docs/api/source/index.html.md b/docs/api/source/index.html.md index 7477498..4bfddb8 100644 --- a/docs/api/source/index.html.md +++ b/docs/api/source/index.html.md @@ -9,7 +9,7 @@ toc_footers: includes: - repository - - git + - targets - logs search: true