ExOvh v0.1.1 ExOvh.Services.V1.Webstorage.Query

Helper functions for building queries directed at the /cdn/webstorage part of the OVH API.

Functions Summary

Function Description OVH API call
get_services/0 Get a list of all webstorage cdn services. GET /v1/​cdn/webstorage
get_service/1 Get the domain, server and storage limits for a specific webstorage cdn service GET /v1/​cdn/webstorage​/{serviceName}
get_service_info/1 Get a administrative details for a specific webstorage cdn service GET /v1/​cdn/webstorage​/{serviceName}/serviceInfos
get_service_stats/2 Get statistics for a specific webstorage cdn service GET /v1/​cdn/webstorage​/{serviceName}/statistics
get_credentials/1 Get credentials for using the swift compliant api GET /v1/​cdn/webstorage​/{serviceName}/statistics

Example

ExOvh.Services.V1.Webstorage.Query.get_services() |> ExOvh.request()

Summary

Functions

Get credentials for using the swift compliant api

Get the domain, server and storage limits for a specific webstorage cdn service

Get a administrative details for a specific webstorage cdn service

Get statistics for a specific webstorage cdn service

​Get a list of all webstorage cdn services available for the client account

Functions

get_credentials(service_name)

Specs

get_credentials(String.t) :: ExOvh.Query.Ovh.t

Get credentials for using the swift compliant api

Api call

GET /v1/​cdn/webstorage​/{serviceName}/credentials

Arguments

  • service_name: Name of the Webstorage CDN service - assigned by OVH.

Example

alias ExOvh.Services.V1.Webstorage.Query
service_name = "cdnwebstorage-????"
query = Query.get_webstorage_credentials(service_name)
{:ok, resp} = ExOvh.Ovh.request(query)
get_service(service_name)

Specs

get_service(String.t) :: ExOvh.Query.t

Get the domain, server and storage limits for a specific webstorage cdn service

Api call

GET /v1/​cdn/webstorage​/{serviceName}

Arguments

  • service_name: Name of the Webstorage CDN service - assigned by OVH.

Example

alias ExOvh.Services.V1.Webstorage.Query
service_name = "cdnwebstorage-????"
query = Query.get_service(service_name)
{:ok, resp} = ExOvh.Ovh.request(query)
%{
  "domain" => domain,
  "storageLimit => storage_limit,
  "server" => server
 } = resp.body
get_service_info(service_name)

Specs

get_service_info(String.t) :: ExOvh.Query.t

Get a administrative details for a specific webstorage cdn service

Api call

GET /v1/​cdn/webstorage​/{serviceName}/serviceInfos

Arguments

  • service_name: Name of the Webstorage CDN service - assigned by OVH.

Example

alias ExOvh.Services.V1.Webstorage.Query
service_name = "cdnwebstorage-????"
Query.get_service_info(service_name)
{:ok, resp} = ExOvh.Ovh.request(query)
get_service_stats(service_name, opts \\ [])

Specs

get_service_stats(String.t, Keyword.t) :: ExOvh.Query.t

Get statistics for a specific webstorage cdn service

Api call

GET /v1/​cdn/webstorage​/{serviceName}/statistics

Arguments

  • service_name: Name of the Webstorage CDN service - assigned by OVH.
  • options:
    • period can be "month", "week" or "day"
    • type can be "backend", "quota" or "cdn"

Example

alias ExOvh.Services.V1.Webstorage.Query
service_name = "cdnwebstorage-????"
query = Query.get_service_stats(service_name, [period: "month", type: "backend"])
{:ok, resp} = ExOvh.Ovh.request(query)
get_services()

Specs

get_services :: ExOvh.Query.t

​Get a list of all webstorage cdn services available for the client account

Api call

GET /v1/​cdn/webstorage

Example

ExOvh.Services.V1.Webstorage.Query.get_services() |> ExOvh.request()