Skip to main content

local_seo_locations

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

Overview​

Namelocal_seo_locations
TypeResource
Idovh.hosting_web.local_seo_locations

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerLocation id
namestringName of the location
account_idintegerAccount id (wire: accountId)
task_idintegerRunning task associated to the location (wire: taskId)
addressstringAddress of the location
countrystringCountry of the location (FR)
creation_datestring (date-time)Date of the installation of the location (wire: creationDate)
last_updatestring (date-time)Date of the last location's update (wire: lastUpdate)
offerstringLocal SEO offer for this location (normal)
statusstringCurrent status of the location (created, creating, deleting, updating)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, service_nameGet a local SEO location. Returns the name, address, country, offer and status of the location, with its creation and last update dates.
listselectservice_namex_pagination_modeList local SEO locations. Returns the IDs of the local SEO locations of the hosting. Each location is a business listed in online directories.
service_infos_updateexecid, serviceName, renewUpdate location renewal. Updates the renewal settings of the location: automatic renewal, renewal period and deletion at expiration.
terminateexecid, serviceNameTerminate a local SEO location. Requests the termination of the location. A link to confirm it is sent by email to the administrator contact.

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"}})
idintegerLocation id
serviceNamestringThe internal name of your hosting
service_namestringThe internal name of your hosting (wire: serviceName)
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 local SEO location. Returns the name, address, country, offer and status of the location, with its creation and last update dates.

SELECT
id,
name,
account_id,
task_id,
address,
country,
creation_date,
last_update,
offer,
status
FROM ovh.hosting_web.local_seo_locations
WHERE id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Update location renewal. Updates the renewal settings of the location: automatic renewal, renewal period and deletion at expiration.

EXEC ovh.hosting_web.local_seo_locations.service_infos_update
@id='{{ id }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"renew": "{{ renew }}"
}'
;