Cumulocity Retention Rules API

The Retention Rules API from Cumulocity — 2 operation(s) for retention rules.

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /retention/retentions List data retention rules · List Retention Rules #
Ask an LLM
“What data retention rules are set on my tenant?”
“How long is each type of data kept before it's deleted?”
Tell an agent
List all retention rules.
Show how long each data type is retained.
POST /retention/retentions Add a data retention rule · Create a Retention Rule #
Ask an LLM
“How do I make old measurements expire after a number of days?”
“Can I set a retention rule just for one device or fragment?”
Tell an agent
Create a retention rule keeping {dataType} data for {maximumAge} days.
Keep {dataType} data from source {source} for only {maximumAge} days.
GET /retention/retentions/{id} Look up one retention rule · Retrieve a Retention Rule #
Ask an LLM
“How do I see the details of one retention rule?”
“What maximum age does a specific retention rule apply?”
Tell an agent
Show me retention rule {id}.
Get the data type and maximum age of retention rule {id}.
PUT /retention/retentions/{id} Change a data retention rule · Update a Retention Rule #
Ask an LLM
“Can I change how many days an existing retention rule keeps data?”
“How do I edit the data type covered by a retention rule?”
Tell an agent
Change retention rule {id} to keep {dataType} data for {maximumAge} days.
Extend retention rule {id} for {dataType} to a maximum age of {maximumAge} days.
DELETE /retention/retentions/{id} Delete a data retention rule · Delete a Retention Rule #
Ask an LLM
“How do I remove a retention rule so data is no longer auto-deleted by it?”
“Can I delete a retention rule I set up earlier?”
Tell an agent destructive · confirm first
Delete retention rule {id}.
Remove the retention rule with ID {id}.

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/cumulocity:cumulocity-retention-rules-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

cumulocity-retention-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cumulocity Retention Rules API
  version: 10.20.0
  description: 'Define retention rules that automatically delete measurements, events, alarms, audit records, and

    operations older than a configured age. Rules can be scoped by data type, source, and fragment.

    Default policies apply per-plan; Enterprise tenants can override.'
servers:
- url: https://{tenant}.cumulocity.com
  variables:
    tenant:
      default: example
security:
- basicAuth: []
- bearerAuth: []
tags:
- name: Retention Rules
paths:
  /retention/retentions:
    get:
      tags:
      - Retention Rules
      summary: List Retention Rules
      operationId: listRetentionRules
      responses:
        '200':
          description: A collection of retention rules.
    post:
      tags:
      - Retention Rules
      summary: Create a Retention Rule
      operationId: createRetentionRule
      requestBody:
        required: true
        content:
          application/vnd.com.nsn.cumulocity.retentionRule+json:
            schema:
              $ref: '#/components/schemas/RetentionRule'
      responses:
        '201':
          description: Retention rule created.
  /retention/retentions/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      tags:
      - Retention Rules
      summary: Retrieve a Retention Rule
      operationId: getRetentionRule
      responses:
        '200':
          description: A single retention rule.
    put:
      tags:
      - Retention Rules
      summary: Update a Retention Rule
      operationId: updateRetentionRule
      requestBody:
        required: true
        content:
          application/vnd.com.nsn.cumulocity.retentionRule+json:
            schema:
              $ref: '#/components/schemas/RetentionRule'
      responses:
        '200':
          description: Retention rule updated.
    delete:
      tags:
      - Retention Rules
      summary: Delete a Retention Rule
      operationId: deleteRetentionRule
      responses:
        '204':
          description: Retention rule deleted.
components:
  schemas:
    RetentionRule:
      type: object
      required:
      - dataType
      - maximumAge
      properties:
        id:
          type: string
        self:
          type: string
          format: uri
        dataType:
          type: string
          enum:
          - ALARM
          - AUDIT
          - EVENT
          - MEASUREMENT
          - OPERATION
          - BULK_OPERATION
          - '*'
        fragmentType:
          type: string
        type:
          type: string
        source:
          type: string
        maximumAge:
          type: integer
          description: Age in days after which records are deleted.
        editable:
          type: boolean
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT