Rowlogy
Rowlogy
Content Operations

Increment Value

Increment a numerical value at a specified path

This endpoint allows you to increment a numerical value at a specified path within a project's content. If the value is not provided, it defaults to 1.

Endpoint

POST https://rowlogy.com/api/:username/:projectSlug/content/increment

Path Parameters

ParameterTypeDescription
usernamestringThe username of the project owner. Must start with "@".
projectSlugstringThe project ID of the project.

Request Body

The request body should be a JSON object with the following properties:

ParameterTypeDescription
pathstringThe dot-separated path to the numerical value to increment (e.g., data.item.count).
valuenumber(Optional) The amount to increment the value by. Defaults to 1.
{
    "path": "data.item.count",
    "value": 5
}

Authentication

You can authenticate your requests using one of the following methods:

Session Token

Include your session token in the Authorization header:

Authorization: Bearer <YOUR_SESSION_TOKEN>

API Key Authentication

Alternatively, you can authenticate using an API key. Include your API key in the Authorization header:

Authorization: Bearer <YOUR_API_KEY>

For more details on generating and managing API keys, see the Using API Keys guide.

Response

Success (200 OK)

{
    "message": "Value incremented successfully"
}

Error Responses

  • 400 Bad Request:
    • If path is missing or not a string.
    • If the target value at path is not a number.
  • 401 Unauthorized:
    • If no authentication (user session or API key) is provided.
    • If the provided API key is invalid or expired.
  • 403 Forbidden:
    • If the authenticated user does not have access to the project.
    • If the API key used does not have the required permissions for this project.
  • 404 Not Found: If the project or user does not exist.
  • 500 Internal Server Error: For any server-side issues.