Skip to content
Merged

Draft #148

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/en/blog/releases/cc-backend-v1.3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ description: Bugfix Release
- 4344c26 fix: make foorprint from statsSeries nullsafe

Supports job archive version 1 and database version 6.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/master/ReleaseNotes.md) for further details on breaking changes.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/main/ReleaseNotes.md) for further details on breaking changes.

## Release notes

Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/releases/cc-backend-v1.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This is a minor release of `cc-backend`, the API backend and frontend
implementation of ClusterCockpit.

Supports job archive version 2 and database version 8.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/master/ReleaseNotes.md) for further details on breaking changes.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/main/ReleaseNotes.md) for further details on breaking changes.

## Breaking changes

Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/releases/cc-backend-v1.4.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is a bugfix release of `cc-backend`, the API backend and frontend
implementation of ClusterCockpit.

Supports job archive version 2 and database version 8.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/master/ReleaseNotes.md) for further details on breaking changes.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/main/ReleaseNotes.md) for further details on breaking changes.

## Known issues

Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/releases/cc-backend-v1.4.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This is a bugfix release of `cc-backend`, the API backend and frontend
implementation of ClusterCockpit.

Supports job archive version 2 and database version 8.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/master/ReleaseNotes.md) for further details on breaking changes.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/main/ReleaseNotes.md) for further details on breaking changes.

## Known issues

Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/releases/cc-backend-v1.4.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This is a bugfix release of `cc-backend`, the API backend and frontend
implementation of ClusterCockpit.

Supports job archive version 2 and database version 8.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/master/ReleaseNotes.md) for further details on breaking changes.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/main/ReleaseNotes.md) for further details on breaking changes.

## Known issues

Expand Down
2 changes: 1 addition & 1 deletion content/en/blog/releases/cc-backend-v1.4.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This is a bugfix release of `cc-backend`, the API backend and frontend
implementation of ClusterCockpit.

Supports job archive version 2 and database version 8.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/master/ReleaseNotes.md) for further details on breaking changes.
Please check out the [Release Notes](https://github.com/ClusterCockpit/cc-backend/blob/main/ReleaseNotes.md) for further details on breaking changes.

## Breaking changes

Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/explanation/jwtoken.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ them over to ClusterCockpit via cookies, CC can be configured to accept them:

1. `.env`: CC needs a public ed25519 key to verify foreign JWT signatures.
Public keys in PEM format can be converted with the instructions in
[/tools/convert-pem-pubkey-for-cc](https://github.com/ClusterCockpit/cc-backend/blob/master/tools/convert-pem-pubkey/Readme.md)
[/tools/convert-pem-pubkey-for-cc](https://github.com/ClusterCockpit/cc-backend/blob/main/tools/convert-pem-pubkey/Readme.md)
.

```bash
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/how-to-guides/clusterConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ Here is an example:
```

Since it is tedious to write this by hand, we provide a
[Perl script](https://raw.githubusercontent.com/ClusterCockpit/cc-backend/refs/heads/master/configs/generate-subcluster.pl)
[Perl script](https://raw.githubusercontent.com/ClusterCockpit/cc-backend/refs/heads/main/configs/generate-subcluster.pl)
as part of `cc-backend` that generates a subCluster template. This script only
works if the `LIKWID` tools are installed and in the PATH. You also need the
`LIKWID` library for cc-metric-store. You find instructions on how to install
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/how-to-guides/database-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ database to the latest version:
```

The migration files are embedded in the binary and can also be viewed in the cc
backend [source tree](https://github.com/ClusterCockpit/cc-backend/tree/master/internal/repository/migrations).
backend [source tree](https://github.com/ClusterCockpit/cc-backend/tree/main/internal/repository/migrations).
We use the [migrate library](https://github.com/golang-migrate/migrate).

If something goes wrong, you can check the status and get the current schema
Expand Down
71 changes: 70 additions & 1 deletion content/en/docs/how-to-guides/useRest.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ Endpoints described here should be restricted to administrators only, as they in

| Endpoint | Method | Request Payload(s) | Description |
| ---------------------------------- | ----------- | --------------------- | --------------------------------------------------------------------------------------------------------- |
| `/api/users/` | GET | - | Lists all users |
| `/api/users/` | GET | URL-Query Params | Lists all users (`not-just-user=true` to filter to privileged users only) |
| `/api/users/` | POST | Form Data | Creates a new user |
| `/api/users/` | DELETE | Form Data | Deletes a user |
| `/api/user/{id}` | POST | Form Data | Updates roles and projects for user `{id}` (reactivated in v1.5.4) |
| `/api/clusters/` | GET | - | Lists all clusters |
| `/api/tags/` | DELETE | JSON Payload | Removes array of tags (Type, Name, Scope) from DB. Private tags cannot be removed. |
| `/api/jobs/start_job/` | POST, PUT | JSON Payload | Starts a job |
Expand All @@ -74,6 +77,72 @@ Endpoints described here should be restricted to administrators only, as they in

---

### User Management

**List all users:**

```bash
curl -s "$CC_URL/api/users/?not-just-user=false" \
-H "Authorization: Bearer $TOKEN" \
-H "accept: application/json" | jq .
```

Pass `not-just-user=true` to return only users that have roles beyond the basic
`user` role (e.g. managers, admins, API users).

**Create a new user:**

```bash
curl -s -X POST "$CC_URL/api/users/" \
-H "Authorization: Bearer $TOKEN" \
-F "username=alice" \
-F "password=secret" \
-F "role=user" \
-F "name=Alice Example" \
-F "email=alice@example.com"
```

Available roles: `user`, `manager`, `support`, `admin`, `api`.
For `manager` role, also pass `-F "project=myproject"`.
API users do not require a password.

**Delete a user:**

```bash
curl -s -X DELETE "$CC_URL/api/users/" \
-H "Authorization: Bearer $TOKEN" \
-F "username=alice"
```

**Update a user's roles or projects** (reactivated in v1.5.4):

```bash
# Add a role
curl -s -X POST "$CC_URL/api/user/alice" \
-H "Authorization: Bearer $TOKEN" \
-F "add-role=api"

# Remove a role
curl -s -X POST "$CC_URL/api/user/alice" \
-H "Authorization: Bearer $TOKEN" \
-F "remove-role=api"

# Add a project (for managers)
curl -s -X POST "$CC_URL/api/user/alice" \
-H "Authorization: Bearer $TOKEN" \
-F "add-project=myproject"

# Remove a project
curl -s -X POST "$CC_URL/api/user/alice" \
-H "Authorization: Bearer $TOKEN" \
-F "remove-project=myproject"
```

Multiple fields can be combined in a single request, e.g. to simultaneously add
a role and a project.

---

### Listing and Filtering Jobs

Use `GET /api/jobs/` with URL query parameters to filter the job list.
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/reference/cc-backend/jobarchive/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ weight: 5
The job archive specifies an exchange format for job meta and performance metric
data. It consists of two parts:

- a [Json file format](https://github.com/ClusterCockpit/cc-backend/tree/master/pkg/schema/schemas)
- a [Json file format](https://github.com/ClusterCockpit/cc-backend/tree/main/pkg/schema/schemas)
- a Directory hierarchy / Key specification

By using an open, portable and simple specification based on JSON objects it is
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/reference/cc-backend/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ The REST API is organized into several route groups:
## Swagger API Reference

{{< alert title="Non-Interactive Documentation" >}}
This reference is rendered using the `swaggerui` plugin based on the original definition file found in the ClusterCockpit [repository](https://github.com/ClusterCockpit/cc-backend/blob/master/api/swagger.json "ClusterCockpit GitHub"), _but without a serving backend_.</br></br>
This reference is rendered using the `swaggerui` plugin based on the original definition file found in the ClusterCockpit [repository](https://github.com/ClusterCockpit/cc-backend/blob/main/api/swagger.json "ClusterCockpit GitHub"), _but without a serving backend_.</br></br>
This means that all interactivity ("Try It Out") will not return actual data. However, a `Curl` call and a compiled `Request URL` will still be displayed, if an API endpoint is executed.
{{< /alert >}}

{{< alert title="Administrator API" >}}
Endpoints displayed here correspond to the administrator `/api/` endpoints, but user-accessible `/userapi/` endpoints are functionally identical. See [these lists]({{< ref "userest" >}} "How-To REST API") for information about accessibility.
{{< /alert >}}

{{< swagger-ui "https://raw.githubusercontent.com/ClusterCockpit/cc-backend/refs/heads/master/api/swagger.json" >}}
{{< swagger-ui "https://raw.githubusercontent.com/ClusterCockpit/cc-backend/refs/heads/main/api/swagger.json" >}}
2 changes: 1 addition & 1 deletion content/en/docs/reference/cc-backend/schemas/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ClusterCockpit Schema References for
* Job Archive Job Metadata
* Job Archive Job Metricdata

The schemas in their raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/master/pkg/schema/schemas) repository.
The schemas in their raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/main/pkg/schema/schemas) repository.

{{< alert title="Manual Updates">}}
Changes to the original JSON schemas found in the repository are not automatically rendered in this reference documentation.</br></br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tags: [Backend]
weight: 2
---

The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/master/pkg/schema/schemas) repository.
The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/main/pkg/schema/schemas) repository.

{{< alert title="Manual Updates">}}
Changes to the original JSON schema found in the repository are not automatically rendered in this reference documentation.</br></br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ weight: 1

A detailed description of each of the application configuration options can be found in the [config documentation]({{< ref "ccb-configuration" >}} "CC-Backend Configuration").

The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/master/pkg/schema/schemas) repository.
The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/main/pkg/schema/schemas) repository.

{{< alert title="Manual Updates">}}
Changes to the original JSON schema found in the repository are not automatically rendered in this reference documentation.</br></br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tags: [Backend]
weight: 3
---

The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/master/pkg/schema/schemas) repository.
The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/main/pkg/schema/schemas) repository.

{{< alert title="Manual Updates">}}
Changes to the original JSON schema found in the repository are not automatically rendered in this reference documentation.</br></br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tags: [Backend, Archive]
weight: 6
---

The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/master/pkg/schema/schemas) repository.
The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/main/pkg/schema/schemas) repository.

{{< alert title="Manual Updates">}}
Changes to the original JSON schema found in the repository are not automatically rendered in this reference documentation.</br></br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tags: [Backend, Archive]
weight: 7
---

The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/master/pkg/schema/schemas) repository.
The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/main/pkg/schema/schemas) repository.

{{< alert title="Manual Updates">}}
Changes to the original JSON schema found in the repository are not automatically rendered in this reference documentation.</br></br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tags: [Backend]
weight: 4
---

The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/master/pkg/schema/schemas) repository.
The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/main/pkg/schema/schemas) repository.

{{< alert title="Manual Updates">}}
Changes to the original JSON schema found in the repository are not automatically rendered in this reference documentation.</br></br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tags: [Backend]
weight: 5
---

The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/master/pkg/schema/schemas) repository.
The following schema in its raw form can be found in the [ClusterCockpit GitHub](https://github.com/ClusterCockpit/cc-backend/tree/main/pkg/schema/schemas) repository.

{{< alert title="Manual Updates">}}
Changes to the original JSON schema found in the repository are not automatically rendered in this reference documentation.</br></br>
Expand Down
Loading
Loading