Cdrs API

Update an CDR

PATCH /api/rest/admin/cdr/cdrs/:id

Parameters

Name Description
data[type] Resource type (cdrs)
data[id] CDR ID
data[attributes] list of fields/values to update
data[attributes][metadata] Metadata

Request

Headers

Version: HTTP/1.0
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzE1Nzg3NTEsInN1YiI6NTl9.qDyPzK7moocXLvQkYyeelIAEKmg5V-Oi0oCQbqKeeYw
Host: example.org
Cookie: 

Route

PATCH /api/rest/admin/cdr/cdrs/5

Body

{"data":{"type":"cdrs","id":5,"attributes":{"metadata":{"some_json":"some value"}}}}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: application/vnd.api+json
Vary: Accept
ETag: W/"b499919f86e4642d315c0d0c279969e4"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 3fe10cb3-3d22-493a-9d35-9c2590c5a03f
X-Runtime: 0.020601
Content-Length: 6229

Status

200 OK

Body

{
  "data": {
    "id": "5",
    "type": "cdrs",
    "links": {
      "self": "http://example.org/api/rest/admin/cdr/cdrs/5"
    },
    "attributes": {
      "time-start": "2024-11-14T09:54:51.134Z",
      "destination-next-rate": "8.2",
      "destination-fee": "3.15",
      "dialpeer-next-rate": null,
      "dialpeer-fee": null,
      "internal-disconnect-code": null,
      "internal-disconnect-reason": null,
      "disconnect-initiator-id": null,
      "customer-price": "2.0",
      "vendor-price": null,
      "duration": 30,
      "success": true,
      "profit": null,
      "dst-prefix-in": "456",
      "dst-prefix-out": null,
      "src-prefix-in": "123",
      "src-prefix-out": null,
      "time-connect": "2024-11-14T09:54:51.134Z",
      "time-end": "2024-11-14T09:55:21.134Z",
      "sign-orig-ip": null,
      "sign-orig-port": null,
      "sign-orig-local-ip": null,
      "sign-orig-local-port": null,
      "sign-term-ip": null,
      "sign-term-port": null,
      "sign-term-local-ip": null,
      "sign-term-local-port": null,
      "orig-call-id": null,
      "term-call-id": null,
      "vendor-invoice-id": null,
      "customer-invoice-id": null,
      "local-tag": "EU",
      "destination-initial-rate": "10.5",
      "dialpeer-initial-rate": null,
      "destination-initial-interval": 30,
      "destination-next-interval": 60,
      "dialpeer-initial-interval": null,
      "dialpeer-next-interval": null,
      "routing-attempt": null,
      "is-last-cdr": true,
      "lega-disconnect-code": 200,
      "lega-disconnect-reason": "201",
      "src-name-in": "Src name In",
      "src-name-out": null,
      "diversion-in": "Deversion In",
      "diversion-out": null,
      "legb-disconnect-code": null,
      "legb-disconnect-reason": null,
      "dump-level-id": null,
      "auth-orig-ip": "127.0.0.1",
      "auth-orig-port": 8080,
      "global-tag": null,
      "src-prefix-routing": "SRC Prefix Routing",
      "dst-prefix-routing": "DST Prefix Routing",
      "routing-delay": null,
      "pdd": null,
      "rtt": null,
      "early-media-present": null,
      "lnp-database-id": null,
      "lrn": null,
      "destination-prefix": "Destination Prefix",
      "dialpeer-prefix": null,
      "audio-recorded": null,
      "ruri-domain": "rURI Domain",
      "to-domain": "To Domain",
      "from-domain": "From Domain",
      "src-area-id": null,
      "dst-area-id": null,
      "auth-orig-transport-protocol-id": 1,
      "sign-orig-transport-protocol-id": null,
      "sign-term-transport-protocol-id": null,
      "core-version": null,
      "yeti-version": null,
      "lega-user-agent": null,
      "legb-user-agent": null,
      "uuid": "2e208196-7965-43f7-840f-803e1c6872e8",
      "pai-in": null,
      "ppi-in": null,
      "privacy-in": null,
      "rpid-in": null,
      "rpid-privacy-in": null,
      "pai-out": null,
      "ppi-out": null,
      "privacy-out": null,
      "rpid-out": null,
      "rpid-privacy-out": null,
      "destination-reverse-billing": null,
      "dialpeer-reverse-billing": null,
      "is-redirected": null,
      "customer-account-check-balance": null,
      "customer-external-id": null,
      "customer-auth-external-id": null,
      "customer-acc-vat": null,
      "customer-acc-external-id": null,
      "routing-tag-ids": null,
      "vendor-external-id": null,
      "vendor-acc-external-id": null,
      "orig-gw-external-id": null,
      "term-gw-external-id": null,
      "failed-resource-type-id": null,
      "failed-resource-id": null,
      "customer-price-no-vat": null,
      "customer-duration": null,
      "vendor-duration": null,
      "destination-rate-policy-id": null,
      "metadata": {
        "some_json": "some value"
      }
    },
    "relationships": {
      "rateplan": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/rateplan",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/rateplan"
        },
        "data": null
      },
      "dialpeer": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/dialpeer",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/dialpeer"
        },
        "data": null
      },
      "pop": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/pop",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/pop"
        },
        "data": null
      },
      "node": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/node",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/node"
        },
        "data": null
      },
      "routing-group": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/routing-group",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/routing-group"
        },
        "data": null
      },
      "routing-plan": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/routing-plan",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/routing-plan"
        },
        "data": null
      },
      "destination": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/destination",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/destination"
        },
        "data": null
      },
      "customer-auth": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/customer-auth",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/customer-auth"
        },
        "data": null
      },
      "vendor": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/vendor",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/vendor"
        },
        "data": {
          "type": "contractors",
          "id": "47"
        }
      },
      "customer": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/customer",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/customer"
        },
        "data": {
          "type": "contractors",
          "id": "46"
        }
      },
      "customer-acc": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/customer-acc",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/customer-acc"
        },
        "data": {
          "type": "accounts",
          "id": "61"
        }
      },
      "vendor-acc": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/vendor-acc",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/vendor-acc"
        },
        "data": {
          "type": "accounts",
          "id": "62"
        }
      },
      "orig-gw": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/orig-gw",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/orig-gw"
        },
        "data": null
      },
      "term-gw": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/term-gw",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/term-gw"
        },
        "data": null
      },
      "dst-country": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/dst-country",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/dst-country"
        },
        "data": null
      },
      "dst-network": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/dst-network",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/dst-network"
        },
        "data": null
      },
      "src-country": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/src-country",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/src-country"
        },
        "data": null
      },
      "src-network": {
        "links": {
          "self": "http://example.org/api/rest/admin/cdr/cdrs/5/relationships/src-network",
          "related": "http://example.org/api/rest/admin/cdr/cdrs/5/src-network"
        },
        "data": null
      }
    }
  }
}