hlrs
Creates, updates, deletes, gets or lists a hlrs resource.
Overview​
| Name | hlrs |
| Type | Resource |
| Id | ovh.sms.hlrs |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | HLR id |
datetime | string (date-time) | HLR creation datetime |
msisdn | string | MSISDN |
operator_code | string | The {Mobile Country Code, Mobile Network Code} unique identifier (wire: operatorCode) |
ported | boolean | Has the MSISDN been ported from its original network |
reachable | boolean | Is the MSISDN currently reachable |
roaming | boolean | Is the MSISDN currently roaming outside its natinal network |
status | string | Status of the HLR request (doing, done, error, todo) |
valid | boolean | Is the MSISDN valid |
Home Location Register informations. Give informations about a given cellular phone.
| Name | Datatype | Description |
|---|---|---|
id | integer | HLR id |
datetime | string (date-time) | HLR creation datetime |
msisdn | string | MSISDN |
operator_code | string | The {Mobile Country Code, Mobile Network Code} unique identifier (wire: operatorCode) |
ported | boolean | Has the MSISDN been ported from its original network |
reachable | boolean | Is the MSISDN currently reachable |
roaming | boolean | Is the MSISDN currently roaming outside its natinal network |
status | string | Status of the HLR request (doing, done, error, todo) |
valid | boolean | Is the MSISDN valid |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, service_name | Get an HLR lookup. Returns the result of the HLR lookup: validity, reachability, portability and roaming of the number. | |
list | select | service_name | x_pagination_mode | List HLR lookups. Returns the identifiers of the HLR lookups. An HLR lookup checks whether a mobile number is valid, reachable, ported or roaming. |
create | insert | service_name | Request HLR lookups. Requests an HLR lookup for one or several mobile numbers, given as a list or a CSV document URL. Returns the lookup identifiers and the credits used. |
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"}}) |
id | integer | HLR id |
service_name | string | The internal name of your SMS offer (wire: serviceName) |
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 an HLR lookup. Returns the result of the HLR lookup: validity, reachability, portability and roaming of the number.
SELECT
id,
datetime,
msisdn,
operator_code,
ported,
reachable,
roaming,
status,
valid
FROM ovh.sms.hlrs
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List HLR lookups. Returns the identifiers of the HLR lookups. An HLR lookup checks whether a mobile number is valid, reachable, ported or roaming.
SELECT
id,
datetime,
msisdn,
operator_code,
ported,
reachable,
roaming,
status,
valid
FROM ovh.sms.hlrs
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Request HLR lookups. Requests an HLR lookup for one or several mobile numbers, given as a list or a CSV document URL. Returns the lookup identifiers and the credits used.
INSERT INTO ovh.sms.hlrs (
receivers,
receivers_document_url,
service_name
)
SELECT
'{{ receivers }}',
'{{ receivers_document_url }}',
'{{ service_name }}'
RETURNING
ids,
invalid_receivers,
tag,
total_credits_removed,
valid_receivers
;
# Description fields are for documentation purposes
- name: hlrs
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the hlrs resource.
- name: receivers
value:
- "{{ receivers }}"
description: |
The receivers
- name: receivers_document_url
value: "{{ receivers_document_url }}"
description: |
The receivers document url link in csv format