Update Oracle Metric
Replaces the editable fields of a metric provider; its id and created_at are kept. Send the whole record, as on Create Oracle Metric.
The auth secret is never returned, so a client that round-trips a record has none to send. That is why connection.auth.secret behaves differently from the other fields:
- omitted or
nullkeeps the stored secret; - a string replaces it;
auth.type: "NONE"drops it.
A stored secret is only sent to the origin (scheme, host and port) it was saved for. An update that points connection.url at another origin while keeping the stored secret is refused with 10015 naming connection.auth.secret: send the secret again.
Required permission: oracle:update
Request
PUT /v2/admin/oracle-metrics/{oracle_metric_id}
Parameters
| Name | Type | In | Description |
|---|---|---|---|
oracle_metric_id | string | path | Required. Metric provider id (24-character hex) |
Headers
| Name | Description |
|---|---|
Authorization | Required. Bearer <access_token> |
Content-Type | Required. application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
category_id | string | Yes | Category the provider belongs to (24-character hex id). It is not checked to exist |
type | string | Yes | Source type: TOGG or SHEET |
name | string | Yes | Provider name |
description | string | No | Description. Omitted clears it |
fiat_currency | string | Yes | ISO 4217 code of the currency the source's rental income is in |
codes | array | No | The full list of series; replaces the stored one. Omitted clears it |
codes[].code | string | Yes | Code the source knows the series by |
codes[].name | string | Yes | Display name of the series |
codes[].description | string | No | Description of the series |
connection | object | Yes | Where the provider reads from |
connection.url | string | Yes | Base URL of the source, starting with http:// or https:// |
connection.timeout | integer | No | Request timeout in seconds, 0–300. 0 means the default (30) |
connection.cache_ttl_seconds | integer | No | Source document cache window within one server process, 0–86400. 0 disables it |
connection.auth.type | string | No | NONE, BEARER, API_KEY, BASIC or QUERY_PARAM. Omitted means NONE |
connection.auth.name | string | Conditional | Header or query parameter name. Required for API_KEY and QUERY_PARAM |
connection.auth.username | string | Conditional | Required for BASIC |
connection.auth.secret | string | null | No | Omitted or null keeps the stored secret; a string replaces it |
connection.headers | array | No | Static headers, stored and returned in clear text |
connection.headers[].name | string | Yes | Header name |
connection.headers[].value | string | No | Header value |
Example
curl --request PUT \
--url '{{baseUrl}}/v2/admin/oracle-metrics/6a5d0206379ebd02e53bf1a1' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"category_id": "6a5d0206379ebd02e53bf0df",
"type": "SHEET",
"name": "Togg Şarj İstasyonu Metric Sheet",
"description": "Google Sheets üzerinden yönetilen Togg şarj istasyonu token metrikleri",
"fiat_currency": "TRY",
"codes": [
{ "code": "TOGG1", "name": "Togg Şarj İstasyonu 1" },
{ "code": "TOGG2", "name": "Togg Şarj İstasyonu 2" }
],
"connection": {
"url": "https://docs.google.com/spreadsheets/d/1Q9xWmT4kLp7RzV2sN8bYc3HdF6gJ0aEu5iO/export?format=csv&gid=0",
"timeout": 30,
"cache_ttl_seconds": 60,
"auth": { "type": "NONE" },
"headers": []
}
}'
Response
200 OK with the updated provider, in the shape described on Get Oracle Metric.
{
"id": "6a5d0206379ebd02e53bf1a1",
"category_id": "6a5d0206379ebd02e53bf0df",
"type": "SHEET",
"name": "Togg Şarj İstasyonu Metric Sheet",
"description": "Google Sheets üzerinden yönetilen Togg şarj istasyonu token metrikleri",
"integration": {
"codes": [
{ "code": "TOGG1", "name": "Togg Şarj İstasyonu 1" },
{ "code": "TOGG2", "name": "Togg Şarj İstasyonu 2" }
],
"fiat_currency": "TRY",
"connection": {
"url": "https://docs.google.com/spreadsheets/d/1Q9xWmT4kLp7RzV2sN8bYc3HdF6gJ0aEu5iO/export?format=csv&gid=0",
"timeout": 30,
"cache_ttl_seconds": 60,
"auth": {
"type": "NONE",
"name": "",
"username": "",
"secret_set": false
},
"headers": []
}
},
"created_at": "2026-07-19T16:57:42.876Z",
"updated_at": "2026-11-09T10:44:03.517Z"
}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | 10015 | Validation failed — see details. Also returned, naming connection.auth.secret, when the URL moves to another origin while the stored secret would be kept |
| 400 | 10000 | oracle_metric_id is not a valid 24-character hex id |
| 400 | 10001 | Metric provider not found or deleted (domain 53) |
| 400 | -1 | The connection is incomplete: the URL does not start with http:// or https://, or the auth scheme is missing its name, username or secret |
See Errors for the error format and common codes.