Skip to main content
Aria Knowledge Central

get_usage_type_details_m Sample Call and Response

This example shows a client retrieving the full details of one specific usage type, identified by its Aria-assigned usage type number. It is based on the get_usage_type_details_m method as defined in methods_m_r73.yml, Admin Tools API.

This example covers a single usage type in detail, including its supplemental object fields. It does not cover the list of all usage types available to a client; that is the scope of the separate get_usage_types_m method.

Sample call

{
  "rest_call": "get_usage_type_details_m",
  "output_format": "json",
  "client_no": 10023,
  "auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "usage_type_no": 100502,
  "include_translations": "false"
}

The rest_call and output_format fields are not part of the method’s own documented arguments. The REST layer adds them to every call: rest_call names the method being invoked, and output_format requests a JSON response rather than the default WDDX format. Within the method’s own arguments, client_no and auth_key identify and authenticate the client making the call. The method requires either usage_type_no or usage_type_code to identify the usage type being looked up; this example uses usage_type_no, the Aria-assigned numeric identifier, and omits usage_type_code, the client-defined alternative. The optional locale_no and locale_name fields are omitted, and include_translations is set to the string value “false,” the default, so that the response does not include locale-specific translations.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "usage_type_no": 100502,
  "usage_type_name": "Data Transfer",
  "usage_type_desc": "Outbound Data Transfer",
  "usage_type_display_string": "Data Transfer (GB)",
  "usage_unit_type": "gigabytes",
  "usage_type_code": "DATA_XFER_OUT",
  "is_editable": true,
  "supplemental_obj_fields": [
    {
      "field_no": 3010,
      "field_name": "region_code",
      "field_value": "US-EAST"
    },
    {
      "field_no": 3011,
      "field_name": "billing_tier",
      "field_value": "standard"
    }
  ]
}

An error_code of zero, paired with an error_msg of “OK,” indicates that Aria found and returned the usage type successfully. The is_editable field is set to true, meaning this usage type is not a system standard type available to all clients and is not yet associated with a service, the two conditions the method’s documentation identifies as making a usage type non-editable. The supplemental_obj_fields array is repeatable; this example shows two representative entries, but a usage type could carry more or fewer supplemental fields depending on how it is configured. This example leaves out the usage_type_translation_details array, since include_translations is set to false and no locale-specific translations are requested.

TOP
  • Was this article helpful?