openapi: 3.0.1 info: title: Backendless REST Cache Counters API description: REST API for the Backendless backend-as-a-service platform. Every request is addressed to a specific application using its application id and REST API key, both carried as path segments immediately after the host. Authenticated operations additionally require the user-token returned by the login endpoint, sent in the user-token request header. This specification covers the core documented services - Data, Users, Files, Messaging and Push, Geo, Cache, Atomic Counters, and Cloud Code custom service invocation. termsOfService: https://backendless.com/terms-of-service/ contact: name: Backendless Support url: https://support.backendless.com version: '1.0' servers: - url: https://api.backendless.com/{app-id}/{rest-api-key} description: Backendless application endpoint variables: app-id: default: APP_ID description: The application id assigned to your Backendless app. rest-api-key: default: REST_API_KEY description: The REST API key generated for your Backendless app. security: - userToken: [] tags: - name: Counters description: Thread-safe atomic counters. paths: /counters/{counter-name}/increment/get: put: operationId: incrementAndGet tags: - Counters summary: Increment by 1 and return current description: Atomically increments the counter by one and returns the new value. parameters: - $ref: '#/components/parameters/CounterName' responses: '200': description: The current counter value after incrementing. content: application/json: schema: type: integer format: int64 /counters/{counter-name}/incrementby/get: put: operationId: incrementByAndGet tags: - Counters summary: Increment by N and return current parameters: - $ref: '#/components/parameters/CounterName' - name: value in: query required: true description: Amount to add to the counter. schema: type: integer format: int64 responses: '200': description: The current counter value after incrementing. content: application/json: schema: type: integer format: int64 /counters/{counter-name}/get: get: operationId: getCounter tags: - Counters summary: Get the current counter value parameters: - $ref: '#/components/parameters/CounterName' responses: '200': description: The current counter value. content: application/json: schema: type: integer format: int64 /counters/{counter-name}/reset: put: operationId: resetCounter tags: - Counters summary: Reset a counter to zero parameters: - $ref: '#/components/parameters/CounterName' responses: '200': description: The counter was reset. components: parameters: CounterName: name: counter-name in: path required: true description: Name of the atomic counter. schema: type: string securitySchemes: userToken: type: apiKey in: header name: user-token description: Session token returned by POST /users/login. Required on operations that run in the context of an authenticated user. The application id and REST API key that scope every request are carried in the server URL path rather than as a security scheme.