Gauge

The gauge resource.

Basehttps://rest.carbon.ms/gauge
GET/gauge

List gauges

Retrieve a paginated list of gauges. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GEThttps://rest.carbon.ms/gauge
curl --request GET \
  --url 'https://rest.carbon.ms/gauge?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "gaugeId": "xyz789",
    "gaugeTypeId": "xyz789",
    "gaugeCalibrationStatus": "string",
    "gaugeStatus": "string",
    "gaugeRole": "string",
    "calibrationIntervalInMonths": 0,
    "customFields": "string"
  }
]
GET/gauge

Retrieve a gauge

Fetch a single gauge by filtering on `id`.

Query parameters

idstring

Match on the gauge's `id`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/gauge
curl --request GET \
  --url 'https://rest.carbon.ms/gauge?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "gaugeId": "xyz789",
  "gaugeTypeId": "xyz789",
  "gaugeCalibrationStatus": "string",
  "gaugeStatus": "string",
  "gaugeRole": "string",
  "calibrationIntervalInMonths": 0,
  "customFields": "string"
}
POST/gauge

Create a gauge

Create a new gauge.

Body parameters

gaugeIdstringrequired
supplierIdstring

References supplier.id

modelNumberstring
serialNumberstring
descriptionstring
dateAcquireddate
gaugeTypeIdstringrequired

References gaugeType.id

gaugeCalibrationStatusgaugeCalibrationStatusrequired
gaugeStatusgaugeStatusrequired
gaugeRolegaugeRolerequired
calibrationIntervalInMonthsnumberrequired
lastCalibrationDatedate
nextCalibrationDatedate
locationIdstring

References location.id

storageUnitIdstring

References storageUnit.id

companyIdstring

References company.id

customFieldsobjectrequired
lastCalibrationStatusgaugeCalibrationStatusrequired
POSThttps://rest.carbon.ms/gauge
curl --request POST \
  --url https://rest.carbon.ms/gauge \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"gaugeId":"xyz789","description":"string","gaugeTypeId":"xyz789","gaugeCalibrationStatus":"string","gaugeStatus":"string","gaugeRole":"string","calibrationIntervalInMonths":0,"customFields":"string","lastCalibrationStatus":"string"}'
Response
{
  "id": "abc123def456",
  "gaugeId": "xyz789",
  "gaugeTypeId": "xyz789",
  "gaugeCalibrationStatus": "string",
  "gaugeStatus": "string",
  "gaugeRole": "string",
  "calibrationIntervalInMonths": 0,
  "customFields": "string"
}
PATCH/gauge

Update a gauge

Update an existing gauge, matched on `id`.

Body parameters

gaugeIdstringrequired
supplierIdstring

References supplier.id

modelNumberstring
serialNumberstring
descriptionstring
dateAcquireddate
gaugeTypeIdstringrequired

References gaugeType.id

gaugeCalibrationStatusgaugeCalibrationStatusrequired
gaugeStatusgaugeStatusrequired
gaugeRolegaugeRolerequired
calibrationIntervalInMonthsnumberrequired
lastCalibrationDatedate
nextCalibrationDatedate
locationIdstring

References location.id

storageUnitIdstring

References storageUnit.id

companyIdstring

References company.id

customFieldsobjectrequired
lastCalibrationStatusgaugeCalibrationStatusrequired
PATCHhttps://rest.carbon.ms/gauge
curl --request PATCH \
  --url 'https://rest.carbon.ms/gauge?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"gaugeId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "gaugeId": "xyz789",
  "gaugeTypeId": "xyz789",
  "gaugeCalibrationStatus": "string",
  "gaugeStatus": "string",
  "gaugeRole": "string",
  "calibrationIntervalInMonths": 0,
  "customFields": "string"
}
DELETE/gauge

Delete a gauge

Delete a gauge, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the gauge to delete, e.g. `eq.{id}`.

DELETEhttps://rest.carbon.ms/gauge
curl --request DELETE \
  --url 'https://rest.carbon.ms/gauge?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content