immudb

Release of immugw 1.3.0

immugw 1.3.0 release brings support for latest immudb We have just released a new version of immugw, v1.3.0. This ...


immugw 1.3.0 release brings support for latest immudb

We have just released a new version of immugw, v1.3.0. This release adds support to handle concurrent requests to multiple databases on the immudb server, enabling you to have a single proxy for interacting with immudb.

Before the release, a single immugw instance could only handle concurrent connections to a single database. Users who had their data sharded across multiple databases had to deploy one immugw instance per database to interact with multiple databases concurrently. With v1.3.0, immugw can now be deployed as a single proxy instance to interact with multiple databases on an immudb server.

Note:

This requires a major change in the API endpoints. As this release has a breaking change, users are advised to review the breaking change to determine whether configuration changes are needed when upgrading.

API Documentation

You can find the swagger schema here. If you want to run the Swagger UI, simply run the following Docker command after you cloned this repo:

docker run -it -p 8081:8080 --name swagger-immugw -v ${PWD}/swagger.json:/openapi.json -e SWAGGER_JSON=/openapi.json  swaggerapi/swagger-ui

Example

Following is an example of how you can interact with immugw.

Run immudb

You can find instructions to run immudb here

./immudb

Run immugw

You can find instructions to run immugw here

./immugw
Login
curl --location --request POST '127.0.0.1:3323/login' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "user": "aW1tdWRi",
    "password": "aW1tdWRi"
}' | jq .token
Use Database
  • Use token from the Login step
curl --location --request GET '127.0.0.1:3323/db/use/defaultdb' \
--header 'Content-Type: application/json' \
--header 'Authorization: ' | jq .token
Verified Set
  • Use token from the Use Database step
curl --location --request POST '127.0.0.1:3323/db/defaultdb/verified/set' \
--header 'Content-Type: application/json' \
--header 'Authorization: ' \
--data-raw '{
  "setRequest": {
    "KVs": [
      {
        "key": "a2V5MQ==",
           "value": "dmFsMQ=="
      }
    ]
  }
}'
Verified Get
  • Use token from the Use Database step
curl --location --request POST '127.0.0.1:3323/db/defaultdb/verified/get' \
--header 'Content-Type: application/json' \
--header 'Authorization: ' \
--data-raw '{
  "keyRequest": {
    "key": "a2V5MQ=="
  }
}'

Similar posts