Skip to content

Commit

Permalink
review of docs:
Browse files Browse the repository at this point in the history
* re-generated ditto-api-2.yml file
* fixed typo "/devps" to "/devops"
* applied some formatting

Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch.io>
  • Loading branch information
thjaeckle authored and Stanchev Aleksandar committed Sep 21, 2022
1 parent 65bbd11 commit 1becafb
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 14 deletions.
6 changes: 6 additions & 0 deletions documentation/src/main/resources/openapi/ditto-api-2.yml
Expand Up @@ -6572,6 +6572,8 @@ paths:
The ID of the connection will be **generated** by the backend. Any `ID` specified in the request body is therefore
prohibited.
Supported connection types are `amqp-091`, `amqp-10`, `mqtt`, `mqtt-5`, `kafka` and `http-push`.
security:
- DevOpsBasic: []
tags:
- Connections
parameters:
Expand Down Expand Up @@ -6708,6 +6710,8 @@ paths:
put:
summary: Update a specific Connection registered
description: Update the connection identified by the `connectionId` path parameter.
security:
- DevOpsBasic: []
tags:
- Connections
parameters:
Expand Down Expand Up @@ -6782,6 +6786,8 @@ paths:
delete:
summary: Delete a specific Connection
description: Delete the connection identified by the `connectionId` path parameter.
security:
- DevOpsBasic: []
tags:
- Connections
parameters:
Expand Down
Expand Up @@ -29,7 +29,8 @@ The following commands are available in order to manage connections:

### Create connection

Create a new connection by sending an HTTP `POST` request:
Create a new connection by sending an HTTP `POST` request:

`POST /api/2/connections`

```json
Expand All @@ -49,14 +50,16 @@ For protocol specific examples, consult the [AMQP-0.9.1 binding](connectivity-pr
[MQTT-3.1.1 binding](connectivity-protocol-bindings-mqtt.html) respectively.

Additionally, you can test a connection before creating it:

`POST /api/2/connections&dry-run=true`

Passing the `dry-run` query parameter checks the configuration and establishes a connection to the remote endpoint in order to validate the connection
credentials. The connection is closed afterwards and will not be persisted.

### Modify connection

Modify an existing connection by sending a HTTP `PUT` request to:
Modify an existing connection by sending a HTTP `PUT` request to:

`PUT /api/2/connections/{connectionId}`

```json
Expand All @@ -71,15 +74,17 @@ The connection with the specified ID needs to be created before one can modify i
### Retrieve connection

The only parameter necessary for retrieving a connection is the `connectionId`:

`GET /api/2/connections/{connectionId}`

### Retrieve all connections
Retrieves all created connections:

`GET /api/2/connections`

Additionally, you can get the connections ids only by providing the `ids-only=true` query parameter.

`GET /api/2/connections&ids-only=true`
`GET /api/2/connections?ids-only=true`

### Delete connection

Expand Down Expand Up @@ -133,23 +138,29 @@ The only parameter necessary for sending a command to a connection is the `conne
Supported commands sent as payload `text/plain`:

#### Open connection

When opening a connection a [ConnectionOpenedAnnouncement](protocol-specification-connections-announcement.html) will be published.

```
connectivity.commands:openConnection
connectivity.commands:openConnection
```

#### Close connection

When gracefully closing a connection a [ConnectionClosedAnnouncement](protocol-specification-connections-announcement.html) will be published.

```
connectivity.commands:closeConnection
connectivity.commands:closeConnection
```

#### Reset connection metrics

This command resets the connection metrics - all metrics are set to `0` again. The only parameter necessary for
retrieving the connection metrics is the `connectionId`.
This command resets the connection metrics - all metrics are set to `0` again.

```
connectivity.commands:resetConnectionMetrics
connectivity.commands:resetConnectionMetrics
```

#### Enable connection logs

Enables the connection logging feature of a connection for 24 hours. As soon as connection logging is enabled, you will
Expand All @@ -160,17 +171,21 @@ allow you more insight in what goes well, and more importantly, what goes wrong.
The default duration and the maximum amount of logs stored for one connection can be configured in Ditto's connectivity
service configuration.

{% include note.html content="When creating or opening an connection the logging is enabled per default. This allows
{% include note.html content="When creating or opening a connection the logging is enabled per default. This allows
to log possible errors on connection establishing." %}

```
connectivity.commands:enableConnectionLogs
connectivity.commands:enableConnectionLogs
```

#### Reset connection logs

Clears all currently stored connection logs.

```
connectivity.commands:resetConnectionLogs
connectivity.commands:resetConnectionLogs
```

## Publishing connection logs

In addition to [enable collecting in-memory connection logs](#enable-connection-logs), connection logs may also be
Expand Down
Expand Up @@ -376,9 +376,14 @@ The following DevOps commands are supported:
* Piggyback commands

### DevOps user
Used for authenticating the following endpoints:<br/>
`/devps`<br/>
`/connections`

Used for authenticating the following endpoints:

```
/devops
/api/2/connections
```


{% include note.html content="The default devops credentials are username: `devops`, password: `foobar`. The password can be changed by setting the environment variable `DEVOPS_PASSWORD` in the gateway service." %}

Expand Down

0 comments on commit 1becafb

Please sign in to comment.