'Applies rewrite rules to a given number according to the given direction. It can for example be used to normalize user input to E164 using callee_in direction, or to denormalize E164 to user output using caller_out.',
return'Applies rewrite rules to a given number according to the given direction. It can for example be used to normalize user input to E164 using callee_in direction, or to denormalize E164 to user output using caller_out.';
'Specifies the fees to be applied for a call if it matches the source or destination number of the call. You can POST fees individually one-by-one using json. To bulk-upload fees, specify the Content-Type as "text/csv" and POST the CSV in the request body to the collection while specifying the the billing profile via URI parameters, like "/api/billingfees/?billing_profile_id=xx&purge_existing=true"'
);
suballowed_methods{
return[qw/GET POST OPTIONS HEAD/];
}
subapi_description{
return'Specifies the fees to be applied for a call if it matches the source or destination number of the call. You can POST fees individually one-by-one using json. To bulk-upload fees, specify the Content-Type as "text/csv" and POST the CSV in the request body to the collection while specifying the the billing profile via URI parameters, like "/api/billingfees/?billing_profile_id=xx&purge_existing=true"';
}
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subquery_params{
return[
{
param=>'billing_profile_id',
description=>'Filter for fees belonging to a specific billing profile',
'Defines a collection of <a href="#billingfees">Billing Fees</a> and <a href="#billingzones">Billing Zones</a> and can be assigned to <a href="#customers">Customers</a> and <a href="#contracts">System Contracts</a>.'
);
suballowed_methods{
return[qw/GET POST OPTIONS HEAD/];
}
subapi_description{
return'Defines a collection of <a href="#billingfees">Billing Fees</a> and <a href="#billingzones">Billing Zones</a> and can be assigned to <a href="#customers">Customers</a> and <a href="#contracts">System Contracts</a>.';
};
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subquery_params{
return[
{
param=>'reseller_id',
description=>'Filter for billing profiles belonging to a specific reseller',
'Defines zones used to group destinations within <a href="#billingprofiles">Billing Profiles</a>. The zones can be used to group customer\'s calls, like calls within his country or any calls to mobile numbers.'
);
suballowed_methods{
return[qw/GET POST OPTIONS HEAD/];
}
subapi_description{
return'Defines zones used to group destinations within <a href="#billingprofiles">Billing Profiles</a>. The zones can be used to group customer\'s calls, like calls within his country or any calls to mobile numbers.';
};
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subquery_params{
return[
{
param=>'billing_profile_id',
description=>'Filter for zones belonging to a specific billing profile',
'Defines call lists in simplified form for showing call histories of subscribers.',
);
suballowed_methods{
return[qw/GET OPTIONS HEAD/];
}
subapi_description{
return'Defines call lists in simplified form for showing call histories of subscribers.';
};
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subquery_params{
return[
{
param=>'subscriber_id',
description=>'Filter for calls for a specific subscriber. Either this or customer_id is mandatory if called by admin, reseller or subscriberadmin to filter list down to a specific subscriber in order to properly determine the direction of calls.',
'Defines a billing container for peerings and resellers. A <a href="#billingprofiles">Billing Profile</a> is assigned to a contract, and it has <a href="#contractbalances">Contract Balances</a> indicating the saldo of the contract for current and past billing intervals.',
);
suballowed_methods{
return[qw/GET POST OPTIONS HEAD/];
}
subapi_description{
return'Defines a billing container for peerings and resellers. A <a href="#billingprofiles">Billing Profile</a> is assigned to a contract, and it has <a href="#contractbalances">Contract Balances</a> indicating the saldo of the contract for current and past billing intervals.';
};
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subquery_params{
return[
{
param=>'contact_id',
description=>'Filter for contracts with a specific contact id',
'Specifies certain properties (preferences) for a <a href="#customers">Customer</a>. The full list of properties can be obtained via <a href="/api/customerpreferencedefs/">CustomerPreferenceDefs</a>.'
);
suballowed_methods{
return[qw/GET OPTIONS HEAD/];
}
with'NGCP::Panel::Role::API::Preferences';
subapi_description{
return'Specifies certain properties (preferences) for a <a href="#customers">Customer</a>. The full list of properties can be obtained via <a href="/api/customerpreferencedefs/">CustomerPreferenceDefs</a>.';
'Defines a billing container for end customers. Customers usually have one or more <a href="#subscribers">Subscribers</a>. A <a href="#billingprofiles">Billing Profile</a> is assigned to a customer, and it has <a href="#contractbalances">Contract Balances</a> indicating the saldo of the customer for current and past billing intervals. Customer can be one of the "sipaccount" or "pbxaccount" type. Type should be specified as "type" parameter.',
);
class_has'documentation_sample'=>(
is=>'ro',
default=>sub{
suballowed_methods{
return[qw/GET POST OPTIONS HEAD/];
}
subapi_description{
return'Defines a billing container for end customers. Customers usually have one or more <a href="#subscribers">Subscribers</a>. A <a href="#billingprofiles">Billing Profile</a> is assigned to a customer, and it has <a href="#contractbalances">Contract Balances</a> indicating the saldo of the customer for current and past billing intervals. Customer can be one of the "sipaccount" or "pbxaccount" type. Type should be specified as "type" parameter.';
};
subdocumentation_sample{
return
{
"billing_profile_id"=>4,
"type"=>"sipaccount",
"contact_id"=>4,
"status"=>"test",
}
},
);
;
}
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subquery_params{
return[
{
param=>'status',
description=>'Filter for customers with a specific status (comma-separated list of statuses to include possible)',
'Specifies certain properties (preferences) for a <a href="#domains">Domain</a>. The full list of properties can be obtained via <a href="/api/domainpreferencedefs/">DomainPreferenceDefs</a>.'
);
suballowed_methods{
return[qw/GET OPTIONS HEAD/];
}
with'NGCP::Panel::Role::API::Preferences';
subapi_description{
return'Specifies certain properties (preferences) for a <a href="#domains">Domain</a>. The full list of properties can be obtained via <a href="/api/domainpreferencedefs/">DomainPreferenceDefs</a>.';
'Specifies a SIP Domain to be used as host part for SIP <a href="#subscribers">Subscribers</a>. You need a domain before you can create a subscriber. Multiple domains can be created. A domain could also be an IPv4 or IPv6 address (whereas the latter needs to be enclosed in square brackets, e.g. [::1]).'
);
suballowed_methods{
return[qw/GET POST OPTIONS HEAD/];
}
subapi_description{
return'Specifies a SIP Domain to be used as host part for SIP <a href="#subscribers">Subscribers</a>. You need a domain before you can create a subscriber. Multiple domains can be created. A domain could also be an IPv4 or IPv6 address (whereas the latter needs to be enclosed in square brackets, e.g. [::1]).';
};
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subquery_params{
return[
{
param=>'reseller_id',
description=>'Filter for domains belonging to a specific reseller',
'Defines the actual recording of fax messages. It is referred to by the <a href="#faxes">Faxes</a> relation. A GET on an item returns the binary blob of the recording with Content-Type "audio/x-wav".',
);
suballowed_methods{
return[qw/OPTIONS/];
}
with'NGCP::Panel::Role::API::FaxRecordings';
subapi_description{
return'Defines the actual recording of fax messages. It is referred to by the <a href="#faxes">Faxes</a> relation. A GET on an item returns the binary blob of the recording with Content-Type "audio/x-wav".';
'Defines the meta information like duration, sender etc for fax recordings. The actual recordings can be fetched via the <a href="#faxrecordings">FaxRecordings</a> relation. NOTE: There is no Location header in the POST method response, as creation is asynchronous.',
);
class_has'properties'=>(
is=>'ro',
isa=>'HashRef',
default=>sub{{
asynchronous=>1,
};},
);
suballowed_methods{
return[qw/GET POST OPTIONS HEAD/];
}
subapi_description{
return'Defines the meta information like duration, sender etc for fax recordings. The actual recordings can be fetched via the <a href="#faxrecordings">FaxRecordings</a> relation. NOTE: There is no Location header in the POST method response, as creation is asynchronous.';
};
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
#sub properties {
# return {
# asynchronous => 1,
# };
#}
subquery_params{
return[
{
param=>'subscriber_id',
description=>'Filter for faxes belonging to a specific subscriber',
'Defines LNP number entries ported to a specific <a href="#lnpcarriers">LNP Carrier</a>. You can POST numbers individually one-by-one using json. To bulk-upload numbers, specify the Content-Type as "text/csv" and POST the CSV in the request body to the collection with an optional parameter "purge_existing=true", like "/api/lnpnumbers/?purge_existing=true"',
);
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subapi_description{
return'Defines LNP number entries ported to a specific <a href="#lnpcarriers">LNP Carrier</a>. You can POST numbers individually one-by-one using json. To bulk-upload numbers, specify the Content-Type as "text/csv" and POST the CSV in the request body to the collection with an optional parameter "purge_existing=true", like "/api/lnpnumbers/?purge_existing=true"';
};
subquery_params{
return[
{
param=>'carrier_id',
description=>'Filter for LNP numbers belonging to a specific LNP carrier',
'Defines configs for a <a href="#pbxdevicemodels">PbxDeviceModel</a>. To create or update a config, do a POST or PUT with the proper Content-Type (e.g. text/xml) and pass the properties via query parameters, e.g. <span>/api/pbxdeviceconfigs/?device_id=1&version=1.0</span>',
);
suballowed_methods{
return[qw/GET POST OPTIONS HEAD/];
}
subapi_description{
return'Defines configs for a <a href="#pbxdevicemodels">PbxDeviceModel</a>. To create or update a config, do a POST or PUT with the proper Content-Type (e.g. text/xml) and pass the properties via query parameters, e.g. <span>/api/pbxdeviceconfigs/?device_id=1&version=1.0</span>';
};
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subquery_params{
return[
{
param=>'device_id',
description=>'Filter for configs of a specific device model',
'Defines firmwares for a <a href="#pbxdevicemodels">PbxDeviceModel</a>. To create or update a firmware, do a POST or PUT with Content-Type application/octet-stream and pass the properties via query parameters, e.g. <span>/api/pbxdevicefirmwares/?device_id=1&filename=test.bin&version=1.0</span>',
);
suballowed_methods{
return[qw/GET POST OPTIONS HEAD/];
}
subapi_description{
return'Defines firmwares for a <a href="#pbxdevicemodels">PbxDeviceModel</a>. To create or update a firmware, do a POST or PUT with Content-Type application/octet-stream and pass the properties via query parameters, e.g. <span>/api/pbxdevicefirmwares/?device_id=1&filename=test.bin&version=1.0</span>';
};
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subquery_params{
return[
{
param=>'device_id',
description=>'Filter for firmwares of a specific device model',
'Used to download the front and mac image of a <a href="#pbxdevicemodels">PbxDeviceModel</a>. Returns a binary attachment with the correct content type (e.g. image/jpeg) of the image.',
);
suballowed_methods{
return[qw/OPTIONS/];
}
subapi_description{
return'Used to download the front and mac image of a <a href="#pbxdevicemodels">PbxDeviceModel</a>. Returns a binary attachment with the correct content type (e.g. image/jpeg) of the image.';
};
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subquery_params{
return[
{
param=>'type',
description=>'Either "front" (default) or "mac" to download one or the other.',
'Specifies a model to be set in <a href="#pbxdeviceconfigs">PbxDeviceConfigs</a>. Use a Content-Type "multipart/form-data", provide front_image and mac_image parts with the actual images, and an additional json part with the properties specified below, e.g.: <code>curl -X POST --user $USER -F front_image=@/path/to/front.png -F mac_image=@/path/to/mac.png -F json=\'{"reseller_id":...}\' https://example.org:1443/api/pbxdevicemodels/</code>',
);
subapi_description{
return'Specifies a model to be set in <a href="#pbxdeviceconfigs">PbxDeviceConfigs</a>. Use a Content-Type "multipart/form-data", provide front_image and mac_image parts with the actual images, and an additional json part with the properties specified below, e.g.: <code>curl -X POST --user $USER -F front_image=@/path/to/front.png -F mac_image=@/path/to/mac.png -F json=\'{"reseller_id":...}\' https://example.org:1443/api/pbxdevicemodels/</code>';
};
class_has'query_params'=>(
is=>'ro',
isa=>'ArrayRef',
default=>sub{[
subquery_params{
return[
{
param=>'reseller_id',
description=>'Filter for models belonging to a certain reseller',
'Specifies certain properties (preferences) for a <a href="#peeringservers">Peering servers</a>. The full list of properties can be obtained via <a href="/api/peeringserverpreferencedefs/">PeeringSserverPreferenceDefs</a>.'
);
suballowed_methods{
return[qw/GET OPTIONS HEAD/];
}
with'NGCP::Panel::Role::API::Preferences';
subapi_description{
return'Specifies certain properties (preferences) for a <a href="#peeringservers">Peering servers</a>. The full list of properties can be obtained via <a href="/api/peeringserverpreferencedefs/">PeeringSserverPreferenceDefs</a>.';