Module ocs_rest_res_usage

This library module implements resource handling functions for a REST server in the ocs application.

Copyright © 2016 - 2026 SigScale Global Inc.

Description

This library module implements resource handling functions for a REST server in the ocs application.

Function Index

content_types_accepted/0Provides list of resource representations accepted.
content_types_provided/0Provides list of resource representations available.
get_usage/3Body producing function for GET /usageManagement/v1/usage/{id} requests.
get_usagespec/1Body producing function for GET /usageManagement/v1/usageSpecification requests.
get_usagespec/2Body producing function for GET /usageManagement/v1/usageSpecification/{id} requests.
get_ipdr/2Body producing function for GET /ocs/v1/log/ipdr/{Type} requests.
spec_voip/0*
spec_voip6/1*
char_attr_context/2*
characteristic/6*Construct a log event filter.
build_var_match/1*
merge/2*Merge a Match with existing Matches.
operator/1*Map query filter operatot to match specification guard function.

Function Details

content_types_accepted/0

content_types_accepted() -> ContentTypes

Provides list of resource representations accepted.

content_types_provided/0

content_types_provided() -> ContentTypes

Provides list of resource representations available.

get_usage/3

get_usage(Id, Query, Headers) -> Result

Body producing function for GET /usageManagement/v1/usage/{id} requests.

get_usagespec/1

get_usagespec(Query) -> Result

Body producing function for GET /usageManagement/v1/usageSpecification requests.

To do

get_usagespec/2

get_usagespec(Id, Query) -> Result

Body producing function for GET /usageManagement/v1/usageSpecification/{id} requests.

To do

get_ipdr/2

get_ipdr(Type, Query) -> Result

Body producing function for GET /ocs/v1/log/ipdr/{Type} requests.

spec_voip/0 *

spec_voip() -> any()

spec_voip6/1 *

spec_voip6(Acc) -> any()

char_attr_context/2 *

char_attr_context(CCR, Acc) -> any()

characteristic/6 *

characteristic(Filters, Protocols, Types, MatchRequest, MatchResponse, VarNum) -> Result

throws {error, 400 | 500}

Construct a log event filter.

Filters is as defined in ocs_rest_query_parser.

VarNum is the next available number for a MatchVariable.

Result is used in ocs_log:acct_query/6.

build_var_match/1 *

build_var_match(N) -> any()

merge/2 *

merge(Match, Matches) -> Matches

throws {error, 400}

Merge a Match with existing Matches.

operator/1 *

operator(Operator) -> GuardFunction

Map query filter operatot to match specification guard function.

An Operator is as defined in ocs_rest_query_parser.

A GuardFunction is a term comparison guard function as defined in match_spec().


Generated by EDoc