api-docs v5.116.0

API Docs

Table of contents


Counter

Counter - Delete

Back to top

Delete a specific counter

DELETE /counters/:id

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Examples

Example usage:

curl "https://yourdomain.com/counters/<counter-id>" \
  -X DELETE \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
id string
createdAt number

timestamp

Default value: currentTime
createdBy string

account uid

organization string
type string
name string
resetInterval number/string Allowed values: daily,weekly,monthly,yearly
valueStart number
valueStep number
value number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "id-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid"
}

Counter - Find

Back to top

Get list of counters

GET /counters

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Examples

Example usage:

curl "https://yourdomain.com/counters" \
  -X GET \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
counters[] object[]

array of counter

counters.id string
counters.createdAt number

timestamp

Default value: currentTime
counters.createdBy string

account uid

counters.organization string
counters.type string
counters.name string
counters.resetInterval number/string Allowed values: daily,weekly,monthly,yearly
counters.valueStart number
counters.valueStep number
counters.value number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
[
  {
    "id": "id-1",
    "createdAt": 1564661697125,
    "createdBy": "some-uid"
  },
  {
    "id": "id-2",
    "createdAt": 1564661697125,
    "createdBy": "some-uid"
  }
]

Counter - Get

Back to top

Get a specific counter

GET /counters/:id

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Examples

Example usage:

curl "https://yourdomain.com/counters/<counter-id>" \
  -X GET \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
id string
createdAt number

timestamp

Default value: currentTime
createdBy string

account uid

organization string
type string
name string
resetInterval number/string Allowed values: daily,weekly,monthly,yearly
valueStart number
valueStep number
value number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "id-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid"
}

Counter - Patch

Back to top

Update counter

PATCH /counters/:id

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
createdAt number optional

timestamp

Default value: currentTime
name string
resetInterval number/string optional Allowed values: daily,weekly,monthly,yearly
valueStart number optional
valueStep number optional
value number optional
nextValue boolean optional

$nextValue directive

Examples

Example usage:

curl "https://yourdomain.com/counters/<counter-id>" \
  -X PATCH \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-api-token>" \
  -d '{
    "$nextValue": true
  }'

Parameters examples

json - Request-Example

{
  "$nextValue": true
}

Success response

Success response - Success 200

Name Type Description
id string
createdAt number

timestamp

Default value: currentTime
createdBy string

account uid

organization string
type string
name string
resetInterval number/string Allowed values: daily,weekly,monthly,yearly
valueStart number
valueStep number
value number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "id-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid"
}

Counter - Post

Back to top

Create counter

POST /counters

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
createdAt number optional

timestamp

Default value: currentTime
organization string
type string
name string
resetInterval number/string optional Allowed values: daily,weekly,monthly,yearly
valueStart number optional
valueStep number optional
value number optional

Examples

Example usage:

curl "https://yourdomain.com/counters" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-api-token>" \
  -d '{
    "organization": "org-id",
    "type": "some-type",
    "name": "some-name"
  }'

Parameters examples

json - Request-Example

{
  "organization": "org-id",
  "type": "some-type",
  "name": "some-name"
}

Success response

Success response - Success 200

Name Type Description
id string
createdAt number

timestamp

Default value: currentTime
createdBy string

account uid

organization string
type string
name string
resetInterval number/string Allowed values: daily,weekly,monthly,yearly
valueStart number
valueStep number
value number

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "id": "id-1",
  "createdAt": 1564661697125,
  "createdBy": "some-uid"
}

results matching ""

    No results matching ""