{
  "schema_version": 2,
  "id": "operate/rs/references/rest-api",
  "title": "REST API",
  "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/",
  "summary": "Documents the REST API available to Redis Software deployments.",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-01-30T12:29:26-06:00",
  "children": [
    {
      "id": "operate/rs/references/rest-api/quick-start",
      "summary": "Redis Software REST API quick start",
      "title": "Redis Software REST API quick start",
      "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/quick-start/"
    },
    {
      "id": "operate/rs/references/rest-api/encryption",
      "summary": "",
      "title": "Encrypt REST API requests",
      "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/encryption/"
    },
    {
      "id": "operate/rs/references/rest-api/requests",
      "summary": "Documents the requests supported by the Redis Software REST API calls.",
      "title": "Redis Software REST API requests",
      "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/requests/"
    },
    {
      "id": "operate/rs/references/rest-api/objects",
      "summary": "Documents the objects used with Redis Software REST API calls.",
      "title": "Redis Software REST API objects",
      "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/objects/"
    },
    {
      "id": "operate/rs/references/rest-api/permissions",
      "summary": "Documents the permissions used with Redis Software REST API calls.",
      "title": "Permissions",
      "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/permissions/"
    },
    {
      "id": "operate/rs/references/rest-api/api-reference",
      "summary": "",
      "title": "Redis Software API",
      "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/api-reference/"
    }
  ],
  "page_type": "content",
  "content_hash": "d1784a40bde36df041804aa5539b4cc01b1d67356ec540666b423041df959f38",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Redis Software provides a REST API to help you automate common tasks.\n\nHere, you'll find the details of the API and how to use it.  \n\nFor more info, see:\n\n- Supported [request endpoints](https://redis.io/docs/latest/operate/rs/references/rest-api/requests), organized by path\n- Supported [objects](https://redis.io/docs/latest/operate/rs/references/rest-api/objects), both request and response\n- Built-in roles and associated [permissions](https://redis.io/docs/latest/operate/rs/references/rest-api/permissions)\n- [Redis Software REST API quick start](https://redis.io/docs/latest/operate/rs/references/rest-api/quick-start) with examples"
    },
    {
      "id": "authentication",
      "title": "Authentication",
      "role": "security",
      "text": "Authentication to the Redis Software API occurs via [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Provide your username and password as the basic auth credentials.\n\nIf the username and password is incorrect or missing, the request will fail with a [`401 Unauthorized`](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) status code.\n\nExample request using [cURL](https://curl.se/):\n\n[code example]\n\nFor more examples, see the [Redis Software REST API quick start](https://redis.io/docs/latest/operate/rs/references/rest-api/quick-start)."
    },
    {
      "id": "permissions",
      "title": "Permissions",
      "role": "security",
      "text": "By default, the admin user is authorized for access to all endpoints. Use [role-based access controls](https://redis.io/docs/latest/operate/rs/security/access-control) and [role permissions](https://redis.io/docs/latest/operate/rs/references/rest-api/permissions) to manage access.\n\nIf a user attempts to access an endpoint that is not allowed in their role, the request will fail with a [`403 Forbidden`](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) status code. For more details on which user roles can access certain endpoints, see [Permissions](https://redis.io/docs/latest/operate/rs/references/rest-api/permissions)."
    },
    {
      "id": "certificates",
      "title": "Certificates",
      "role": "content",
      "text": "The Redis Software REST API uses [Self-signed certificates](https://redis.io/docs/latest/operate/rs/security/certificates) to ensure the product is secure. When you use the default self-signed certificates, the HTTPS requests will fail with `SSL certificate problem: self signed certificate` unless you turn off SSL certificate verification."
    },
    {
      "id": "ports",
      "title": "Ports",
      "role": "content",
      "text": "All calls must be made over SSL to port 9443. For the API to work, port 9443 must be exposed to incoming traffic or mapped to a different port.\n\nIf you are using a [Redis Software Docker image](https://redis.io/docs/latest/operate/rs/installing-upgrading/quickstarts/docker-quickstart), run the following command to start the Docker image with port 9443 exposed:\n\n[code example]"
    },
    {
      "id": "versions",
      "title": "Versions",
      "role": "compatibility",
      "text": "All API requests are versioned in order to minimize the impact of backwards-incompatible API changes and to coordinate between different versions operating in parallel.\n\nSpecify the version in the request [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier), as shown in the following table:\n\n| Request path | Description |\n|--------------|-------------|\n| POST `/v1/bdbs` | A version 1 request for the `/bdbs` endpoint. |\n| POST `/v2/bdbs` | A version 2 request for the `/bdbs` endpoint. |\n\nWhen an endpoint supports multiple versions, each version is documented on the corresponding endpoint.  For example, the [bdbs request](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs/) page documents POST requests for [version 1](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs/#post-bdbs-v1) and [version 2](https://redis.io/docs/latest/operate/rs/references/rest-api/requests/bdbs/#post-bdbs-v2)."
    },
    {
      "id": "headers",
      "title": "Headers",
      "role": "content",
      "text": ""
    },
    {
      "id": "requests",
      "title": "Requests",
      "role": "content",
      "text": "Redis Software REST API requests support the following HTTP headers:\n\n| Header | Supported/Required Values |\n|--------|---------------------------|\n| Accept | `application/json` |\n| Content-Length | Length (in bytes) of request message |\n| Content-Type | `application/json` (required for PUT or POST requests) |\n\nIf the client specifies an invalid header, the request will fail with a [`400 Bad Request`](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) status code."
    },
    {
      "id": "responses",
      "title": "Responses",
      "role": "returns",
      "text": "Redis Software REST API responses support the following HTTP headers:\n\n| Header | Supported/Required Values |\n|--------|---------------------------|\n| Content-Type | `application/json` |\n| Content-Length | Length (in bytes) of response message |"
    },
    {
      "id": "json-requests-and-responses",
      "title": "JSON requests and responses",
      "role": "content",
      "text": "The Redis Software REST API uses [JavaScript Object Notation (JSON)](http://www.json.org) for requests and responses. See the [RFC 4627 technical specifications](http://www.ietf.org/rfc/rfc4627.txt) for additional information about JSON.\n\nSome responses may have an empty body but indicate the response with standard [HTTP codes](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).\n\nBoth requests and responses may include zero or more objects.\n\nIf the request is for a single entity, the response returns a single JSON object or none. If the request is for a list of entities, the response returns a JSON array with zero or more elements.\n\nIf you omit certain JSON object fields from a request, they may be assigned default values, which often indicate that these fields are not in use."
    },
    {
      "id": "response-types-and-error-codes",
      "title": "Response types and error codes",
      "role": "returns",
      "text": "[HTTP status codes](https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes) indicate the result of an API request. This can be `200 OK` if the server accepted the request, or it can be one of many error codes.\n\nThe most common responses for a Redis Software API request are:\n\n| Response | Condition/Required handling |\n|----------|-----------------------------|\n| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Success |\n| [400 Bad Request](https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request) | The request failed, generally due to a typo or other mistake. |\n| [401 Unauthorized](https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized) | The request failed because the authentication information was missing or incorrect. |\n| [403 Forbidden](https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden) | The user cannot access the specified [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier). |\n| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | The [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) does not exist. |\n| [503 Service Unavailable](https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable) | The node is not responding or is not a member of the cluster. |\n| [505&nbsp;HTTP&nbsp;Version&nbsp;Not&nbsp;Supported](https://www.rfc-editor.org/rfc/rfc9110.html#name-505-http-version-not-suppor) | An unsupported `x-api-version` was used. See [versions](#versions). |\n\nSome endpoints return different response codes. The request references for these endpoints document these special cases."
    }
  ],
  "examples": [
    {
      "id": "authentication-ex0",
      "language": " bash",
      "code": "curl -u \"demo@redislabs.com:password\" \\\n    https://localhost:9443/v1/bdbs",
      "section_id": "authentication"
    },
    {
      "id": "ports-ex0",
      "language": "sh",
      "code": "docker run -p 9443:9443 redislabs/redis",
      "section_id": "ports"
    }
  ]
}
