Skip to main content

portability_documents

Creates, updates, deletes, gets or lists a portability_documents resource.

Overview​

Nameportability_documents
TypeResource
Idovh.telephony.portability_documents

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringName of the document
document_idintegerIdentifier of the document (wire: documentId)
descriptionstringDescription of the document
get_urlstringURL to get document (wire: getUrl)
put_urlstringURL to upload document (wire: putUrl)
sizeintegerDocument size (in bytes)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbilling_account, document_id, idGet a porting document
listselectbilling_account, idx_pagination_modeList porting documents
createinsertbilling_account, id, nameCreate a porting document
updateupdatebilling_account, document_id, idUpdate a porting document
deletedeletebilling_account, document_id, idDelete a porting document

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.

NameDatatypeDescription
api_hoststringThe 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"}})
billing_accountstringThe name of your billingAccount (wire: billingAccount)
document_idintegerIdentifier of the document (wire: documentId)
idintegerThe ID of the portability
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a porting document

SELECT
name,
document_id,
description,
get_url,
put_url,
size
FROM ovh.telephony.portability_documents
WHERE billing_account = '{{ billing_account }}' -- required
AND document_id = '{{ document_id }}' -- required
AND id = '{{ id }}' -- required
;

INSERT examples​

Create a porting document

INSERT INTO ovh.telephony.portability_documents (
description,
name,
billing_account,
id
)
SELECT
'{{ description }}',
'{{ name }}' /* required */,
'{{ billing_account }}',
'{{ id }}'
RETURNING
name,
document_id,
description,
get_url,
put_url,
size
;

UPDATE examples​

Update a porting document

UPDATE ovh.telephony.portability_documents
SET
description = '{{ description }}',
name = '{{ name }}'
WHERE
billing_account = '{{ billing_account }}' --required
AND document_id = '{{ document_id }}' --required
AND id = '{{ id }}' --required;

DELETE examples​

Delete a porting document

DELETE FROM ovh.telephony.portability_documents
WHERE billing_account = '{{ billing_account }}' --required
AND document_id = '{{ document_id }}' --required
AND id = '{{ id }}' --required
;