portabilities
Creates, updates, deletes, gets or lists a portabilities resource.
Overview​
| Name | portabilities |
| Type | Resource |
| Id | ovh.telephony.portabilities |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | The ID of the portability |
order_id | integer | The ID of the portability order (wire: orderId) |
billing_account | string | The billing account where the numbers will be inserted (wire: billingAccount) |
creation_date | string (date-time) | The portability's creation date (wire: creationDate) |
customer_infos | object | Customer informations about this portability (wire: customerInfos) |
desired_execution_date | string (date-time) | The date when the portability will be done and when numbers will be ported (wire: desiredExecutionDate) |
error | boolean | Indicates that portability is in error |
error_codes | array | Codes representing the error in current portability (wire: errorCodes) |
line_to_redirect_to | string | Show the redirection that will be configured when the portability will be done (wire: lineToRedirectTo) |
numbers_list | array | The list of numbers that is going to be ported (wire: numbersList) |
operator | string | The operator that currently holds the numbers |
portability_country | string | Country that defines the portability kind (belgium, france, switzerland) (wire: portabilityCountry) |
rio | string | RIO of the portability (France only) |
Portability informations
| Name | Datatype | Description |
|---|---|---|
id | integer | The ID of the portability |
order_id | integer | The ID of the portability order (wire: orderId) |
billing_account | string | The billing account where the numbers will be inserted (wire: billingAccount) |
creation_date | string (date-time) | The portability's creation date (wire: creationDate) |
customer_infos | object | Customer informations about this portability (wire: customerInfos) |
desired_execution_date | string (date-time) | The date when the portability will be done and when numbers will be ported (wire: desiredExecutionDate) |
error | boolean | Indicates that portability is in error |
error_codes | array | Codes representing the error in current portability (wire: errorCodes) |
line_to_redirect_to | string | Show the redirection that will be configured when the portability will be done (wire: lineToRedirectTo) |
numbers_list | array | The list of numbers that is going to be ported (wire: numbersList) |
operator | string | The operator that currently holds the numbers |
portability_country | string | Country that defines the portability kind (belgium, france, switzerland) (wire: portabilityCountry) |
rio | string | RIO of the portability (France only) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account, id | Get a number porting | |
list | select | billing_account | x_pagination_mode | List number portings |
cancel | exec | billingAccount, id | Cancel the porting | |
change_date | exec | billingAccount, id, date | Change the porting date | |
execute | exec | billingAccount, id | Execute the porting |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
billingAccount | string | The name of your billingAccount |
billing_account | string | The name of your billingAccount (wire: billingAccount) |
id | integer | The ID of the portability |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get a number porting
SELECT
id,
order_id,
billing_account,
creation_date,
customer_infos,
desired_execution_date,
error,
error_codes,
line_to_redirect_to,
numbers_list,
operator,
portability_country,
rio
FROM ovh.telephony.portabilities
WHERE billing_account = '{{ billing_account }}' -- required
AND id = '{{ id }}' -- required
;
List number portings
SELECT
id,
order_id,
billing_account,
creation_date,
customer_infos,
desired_execution_date,
error,
error_codes,
line_to_redirect_to,
numbers_list,
operator,
portability_country,
rio
FROM ovh.telephony.portabilities
WHERE billing_account = '{{ billing_account }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- cancel
- change_date
- execute
Cancel the porting
EXEC ovh.telephony.portabilities.cancel
@billingAccount='{{ billingAccount }}' --required,
@id='{{ id }}' --required
@@json=
'{
"reason": "{{ reason }}"
}'
;
Change the porting date
EXEC ovh.telephony.portabilities.change_date
@billingAccount='{{ billingAccount }}' --required,
@id='{{ id }}' --required
@@json=
'{
"date": "{{ date }}"
}'
;
Execute the porting
EXEC ovh.telephony.portabilities.execute
@billingAccount='{{ billingAccount }}' --required,
@id='{{ id }}' --required
;