Dapr DistributedLock API

Distributed locking operations.

Operations 2

POST /v1.0-alpha1/lock/{storename} Dapr Try Lock #
POST /v1.0-alpha1/unlock/{storename} Dapr Unlock #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dapr-distributedlock-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dapr-distributedlock-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Dapr Actors Distributed Lock API
  description: The Dapr Actors API provides virtual actor capabilities for distributed applications, including actor method invocation, state management, timers, and reminders. Actors provide a single-threaded programming model with guaranteed message ordering.
  version: 1.0.0
  contact:
    name: Dapr
    url: https://dapr.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:3500
  description: Dapr Sidecar
tags:
- name: DistributedLock
  description: Distributed locking operations.
paths:
  /v1.0-alpha1/lock/{storename}:
    post:
      summary: Dapr Try Lock
      description: Attempts to acquire a lock on a resource. The lock is held for the specified expiry period and automatically released if not explicitly unlocked.
      operationId: tryLock
      tags:
      - DistributedLock
      parameters:
      - name: storename
        in: path
        required: true
        description: The name of the lock store component.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - resourceId
              - lockOwner
              - expiryInSeconds
              properties:
                resourceId:
                  type: string
                  description: The ID of the resource to lock.
                lockOwner:
                  type: string
                  description: The owner identifier for the lock.
                expiryInSeconds:
                  type: integer
                  description: The time in seconds before the lock expires.
      responses:
        '200':
          description: Lock attempt completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the lock was successfully acquired.
        '400':
          description: Lock store not found or misconfigured.
        '500':
          description: Failed to acquire lock.
  /v1.0-alpha1/unlock/{storename}:
    post:
      summary: Dapr Unlock
      description: Releases a previously acquired lock on a resource.
      operationId: unlock
      tags:
      - DistributedLock
      parameters:
      - name: storename
        in: path
        required: true
        description: The name of the lock store component.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - resourceId
              - lockOwner
              properties:
                resourceId:
                  type: string
                  description: The ID of the resource to unlock.
                lockOwner:
                  type: string
                  description: The owner identifier for the lock.
      responses:
        '200':
          description: Unlock completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: Unlock status code (0=success, 1=lock does not exist, 2=lock belongs to another owner, 3=internal error).
        '400':
          description: Lock store not found or misconfigured.
        '500':
          description: Failed to unlock.
externalDocs:
  description: Dapr Actors API Reference
  url: https://docs.dapr.io/reference/api/actors_api/