Home
Cumulocity
Cumulocity API Rules
Cumulocity API Rules
Spectral linting rules defining API design standards and conventions for Cumulocity.
12 Rules
error 4
warn 4
info 4
Authorship not recorded
No authorship marker is recorded for this file. It is not presented as the provider's; it was most likely written by an API Evangelist pass before outputs were stamped.
Rule Categories
cumulocity
Rules
warn
cumulocity-operation-summary-title-case
Every operation summary should use Title Case.
$.paths[*][get,post,put,delete,patch]
warn
cumulocity-operation-id-camel-case
operationId should be lowerCamelCase.
$.paths[*][get,post,put,delete,patch]
warn
cumulocity-tag-singular-noun
Tags should be human-readable, Title Case nouns describing a resource collection.
$.tags[*]
info
cumulocity-collection-paths-end-with-resource
Collection paths should reference the resource collection in plural form (managedObjects, measurements, events, alarms, operations, externalIds, users, groups, applications, options).
$.paths
info
cumulocity-content-type-vendor-json
Resource responses should use the application/vnd.com.nsn.cumulocity.* content type.
$.paths[*][get,post,put].responses[200,201].content
info
cumulocity-pagination-parameters
List operations should accept pageSize, currentPage, and withTotalPages query parameters.
$.paths[*].get.parameters
info
cumulocity-resource-self-link
Resource schemas should expose a `self` URI for HATEOAS navigation.
$.components.schemas[*].properties
warn
cumulocity-time-fields-iso8601
Time fields (time, creationTime, lastUpdated, firstOccurrenceTime, dateFrom, dateTo) should be RFC 3339 date-time strings.
$.components.schemas[*].properties[time,creationTime,lastUpdated,firstOccurrenceTime,dateFrom,dateTo]
error
cumulocity-alarm-severity-enum
Alarm severity must use the four canonical values.
$.components.schemas.Alarm.properties.severity
error
cumulocity-alarm-status-enum
Alarm status must use the three canonical values.
$.components.schemas.Alarm.properties.status
error
cumulocity-operation-status-enum
Operation status must use the four canonical values.
$.components.schemas.Operation.properties.status
error
cumulocity-security-defined
Every operation must declare security (basicAuth or bearerAuth).
$.paths[*][get,post,put,delete,patch]
Spectral Ruleset
extends:
- spectral:oas
rules:
cumulocity-operation-summary-title-case:
description: Every operation summary should use Title Case.
severity: warn
given: $.paths[*][get,post,put,delete,patch]
then:
field: summary
function: pattern
functionOptions:
match: '^[A-Z][A-Za-z0-9]*(\s[A-Z][A-Za-z0-9]*)*$'
cumulocity-operation-id-camel-case:
description: operationId should be lowerCamelCase.
severity: warn
given: $.paths[*][get,post,put,delete,patch]
then:
field: operationId
function: pattern
functionOptions:
match: '^[a-z][a-zA-Z0-9]*$'
cumulocity-tag-singular-noun:
description: Tags should be human-readable, Title Case nouns describing a resource collection.
severity: warn
given: $.tags[*]
then:
field: name
function: pattern
functionOptions:
match: '^[A-Z][A-Za-z0-9 .]+$'
cumulocity-collection-paths-end-with-resource:
description: Collection paths should reference the resource collection in plural form (managedObjects, measurements, events, alarms, operations, externalIds, users, groups, applications, options).
severity: info
given: $.paths
then:
function: truthy
cumulocity-content-type-vendor-json:
description: Resource responses should use the application/vnd.com.nsn.cumulocity.* content type.
severity: info
given: $.paths[*][get,post,put].responses[200,201].content
then:
function: truthy
cumulocity-pagination-parameters:
description: List operations should accept pageSize, currentPage, and withTotalPages query parameters.
severity: info
given: $.paths[*].get.parameters
then:
function: truthy
cumulocity-resource-self-link:
description: Resource schemas should expose a `self` URI for HATEOAS navigation.
severity: info
given: $.components.schemas[*].properties
then:
field: self
function: truthy
cumulocity-time-fields-iso8601:
description: Time fields (time, creationTime, lastUpdated, firstOccurrenceTime, dateFrom, dateTo) should be RFC 3339 date-time strings.
severity: warn
given: $.components.schemas[*].properties[time,creationTime,lastUpdated,firstOccurrenceTime,dateFrom,dateTo]
then:
field: format
function: pattern
functionOptions:
match: '^date-time$|^date$'
cumulocity-alarm-severity-enum:
description: Alarm severity must use the four canonical values.
severity: error
given: $.components.schemas.Alarm.properties.severity
then:
field: enum
function: schema
functionOptions:
schema:
type: array
items:
type: string
enum: [CRITICAL, MAJOR, MINOR, WARNING]
cumulocity-alarm-status-enum:
description: Alarm status must use the three canonical values.
severity: error
given: $.components.schemas.Alarm.properties.status
then:
field: enum
function: schema
functionOptions:
schema:
type: array
items:
type: string
enum: [ACTIVE, ACKNOWLEDGED, CLEARED]
cumulocity-operation-status-enum:
description: Operation status must use the four canonical values.
severity: error
given: $.components.schemas.Operation.properties.status
then:
field: enum
function: schema
functionOptions:
schema:
type: array
items:
type: string
enum: [PENDING, EXECUTING, SUCCESSFUL, FAILED]
cumulocity-security-defined:
description: Every operation must declare security (basicAuth or bearerAuth).
severity: error
given: $.paths[*][get,post,put,delete,patch]
then:
field: security
function: defined
Every ruleset 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 spectral rules
4 MCP tools reach this
find_rulesBrowse and filter every ruleset in the catalog.
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 ruleset
curl "https://apis.io/api/v1/rules/cumulocity-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?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.