Skip to main content

envbee API reference (1.0.0)

Download OpenAPI specification:Download

Authentication

We support two types of authentication mechanisms:

API Key and Secret

To authenticate with your application environment, provide its API key and secret as HTTP headers:

  • x-api-key
  • x-api-secret

HMAC (Hash-based Message Authentication Code)

The HMAC signature is 4 parts (1 part optional) joined without a seperator.

Part Required Example Description
Unix Timestamp Yes 1573504737300
Verb Yes POST The verb of the request you are making
Route Yes /api/order The route you are requesting
MD5 JSON Body No 9bb58f26192e4ba00f01e2e7b136bbd8 The MD5 of your JSON.stringify request body

The header format is:

  • Authorization: HMAC <timestamp>:<signature>

<timestamp> is the current Unix timestamp, and <signature> is the HMAC hash of the timestamp, request method, URL path, and payload, signed using your API_SECRET.

More information can be found in: https://www.npmjs.com/package/hmac-auth-express

Example: Python HMAC Authentication

import hashlib
import hmac
import json
import time

api_secret = b"your_api_secret"
hmac_obj = hmac.new(api_secret, digestmod=hashlib.sha256)
current_time = str(int(time.time() * 1000))

hmac_obj.update(current_time.encode("utf-8"))
hmac_obj.update(b"GET")
url_path = "/resource"
hmac_obj.update(url_path.encode("utf-8"))

content = json.dumps({}).encode("utf-8")
content_hash = hashlib.md5(content).hexdigest()
hmac_obj.update(content_hash.encode("utf-8"))

auth_header = f"HMAC {current_time}:{hmac_obj.hexdigest()}"
print("Authorization Header:", auth_header)

Rate Limiting

All requests are subject to rate limiting to ensure fair usage of the API.

  • Limit: 7500 requests per minute per API Key

Response Headers

Header Description Example
RateLimit-Limit Maximum number of requests allowed in the current window 7500
RateLimit-Remaining Number of requests remaining before hitting the limit 7421
RateLimit-Reset Seconds until the rate limit window resets 42
Retry-After Only on 429 - Seconds the client must wait before retrying 42

When the limit is exceeded

The server responds with HTTP 429 Too Many Requests and includes the headers above (with RateLimit-Remaining: 0) and a body like the following:

{
  "message": "Too many requests, try again later"
}

Recommendations for clients

  • Implement exponential backoff (with optional jitter) when receiving a 429 response
  • Monitor the RateLimit-* and Retry-After headers to self-regulate request rates

Variables

Manage application variables.

Get variables

Gets all variables for the calling application environment.

Authorizations:
(ApiKeyAuthApiSecretAuth) HMACAuth
query Parameters
limit
number >= 1
Default: 50

The limit for pagination

offset
number >= 0
Default: 0

The offset for pagination

Responses

Request samples

curl -X GET https://api.envbee.dev/v1/variables \
  -H 'Accept: application/json' \
  -H 'x-api-key: YOUR_ENVBEE_API_KEY' \
  -H 'x-api-secret: YOUR_ENVBEE_API_SECRET'

Response samples

Content type
application/json
{
  • "metadata": {
    },
  • "data": [
    ]
}

Get variable by id

Get complete variable content by its id

Authorizations:
(ApiKeyAuthApiSecretAuth) HMACAuth
path Parameters
id
required
number

The ID of the variable

Responses

Request samples

curl -X GET https://api.envbee.dev/v1/variables/1 \
  -H 'Accept: application/json' \
  -H 'x-api-key: YOUR_ENVBEE_API_KEY' \
  -H 'x-api-secret: YOUR_ENVBEE_API_SECRET'

Response samples

Content type
application/json
{
  • "id": 0,
  • "type": "STRING",
  • "name": "string",
  • "description": "string"
}

Variables values

Retrieve specific values for your variables.

Get variables values

Gets all variables values for the calling application environment.

Authorizations:
(ApiKeyAuthApiSecretAuth) HMACAuth
query Parameters
limit
number >= 1
Default: 50

The limit for pagination

offset
number >= 0
Default: 0

The offset for pagination

Responses

Request samples

curl -X GET https://api.envbee.dev/v1/variables-values \
  -H 'Accept: application/json' \
  -H 'x-api-key: YOUR_ENVBEE_API_KEY' \
  -H 'x-api-secret: YOUR_ENVBEE_API_SECRET'

Response samples

Content type
application/json
{
  • "metadata": {
    },
  • "data": [
    ]
}

Get variable value by id

Get complete variable value content by its id

Authorizations:
(ApiKeyAuthApiSecretAuth) HMACAuth
path Parameters
id
required
number

The ID of the variable value

Responses

Request samples

curl -X GET https://api.envbee.dev/v1/variables-values/1 \
  -H 'Accept: application/json' \
  -H 'x-api-key: YOUR_ENVBEE_API_KEY' \
  -H 'x-api-secret: YOUR_ENVBEE_API_SECRET'

Response samples

Content type
application/json
{
  • "id": 0,
  • "variable_id": 0,
  • "content": {
    }
}

Get variable value by name

Get a variable's value by name

Authorizations:
(ApiKeyAuthApiSecretAuth) HMACAuth
path Parameters
variable_name
required
string

The name of the variable

Responses

Request samples

curl -X GET https://api.envbee.dev/v1/variables-values-by-name/MyVar1 \
  -H 'Accept: application/json' \
  -H 'x-api-key: YOUR_ENVBEE_API_KEY' \
  -H 'x-api-secret: YOUR_ENVBEE_API_SECRET'

Response samples

Content type
application/json
{
  • "id": 0,
  • "variable_id": 0,
  • "content": {
    }
}

Get variable value content by name

Get a variable's value content by name

Authorizations:
(ApiKeyAuthApiSecretAuth) HMACAuth
path Parameters
variable_name
required
string

The name of the variable

Responses

Request samples

curl -X GET https://api.envbee.dev/v1/variables-values-by-name/MyVar1/content \
  -H 'Accept: application/json' \
  -H 'x-api-key: YOUR_ENVBEE_API_KEY' \
  -H 'x-api-secret: YOUR_ENVBEE_API_SECRET'

Response samples

Content type
application/json
{
  • "value": "string"
}

System

Endpoints related to system monitoring and operational status, including health checks and other administrative operations.

Check application health status

Returns the application uptime, a status message, and the current date and time.

Responses

Request samples

curl -X GET https://api.envbee.dev/healthz \
  -H 'Accept: application/json'

Response samples

Content type
application/json
{
  • "uptime": 46270.6011732,
  • "message": "Ok",
  • "date": "2024-12-15T14:50:20.436Z"
}