Skip to main content

Metrics API

All URIs are relative to http://localhost:1000

MethodHTTP requestDescription
getMetricsFormatsGET /metrics/formats/metrics/formats [GET]
metricsFormatsOrderedGET /metrics/formats/ordered/metrics/formats/ordered [GET]

getMetricsFormats

FormatsMetrics getMetricsFormats()

This is going to get a snapshot of our FormatsMetrics

Example

import * as Pieces from '@pieces.app/pieces-os-client'

const configuration = Pieces.Configuration()
const apiInstance = new Pieces.MetricsApi(configuration)

apiInstance.getMetricsFormats().then((data: FormatsMetrics) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

This endpoint does not need any parameters.

Return type

FormatsMetrics

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-

metricsFormatsOrdered

OrderedMetrics metricsFormatsOrdered()

This will return a list of code formats in desc order from most to least formats uploaded.

Example

import * as Pieces from '@pieces.app/pieces-os-client'

const configuration = Pieces.Configuration()
const apiInstance = new Pieces.MetricsApi(configuration)

apiInstance.metricsFormatsOrdered().then((data: OrderedMetrics) => {
console.log('API called successfully. Returned data: ' + data)
}).catch((error: unknown) => console.error(error))

Parameters

This endpoint does not need any parameters.

Return type

OrderedMetrics

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-