ExchangeRate
Last updated
Last updated
An ExchangeRate is a resource defining the exchange rate of currencies. This resource can set a custom exchange rate for a specific domain, separately from the exchange rate of the default domain set in config
.
Package : spaceone.api.cost_analysis.v1
ExchangeRate Methods:
Method | Request | Response |
---|---|---|
Overrides a value of a specific ExchangeRate. This method is used to change the ExchangeRate in a specific domain. You can set the currency
and rate
of the resource.
POST /cost-analysis/v1/exchange-rate/set
{{< tabs " set " >}}
{{< tab "Request Example" >}}
currency (string) Required
rate (float) Required
domain_id (string) Required
{{< highlight json >}} { "currency": "KRW", "rate": 1300 } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
currency (string) Required
rate (float) Required
state (State) Required
is_default (bool) Required
domain_id (string) Required
{{< highlight json >}} { "currency": "KRW", "rate": 1300.0, "state": "ENABLED", "is_default": true } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
Resets a value of a specific ExchangeRate and changes the ExchangeRate to the ExchangeRate of the default
domain.
POST /cost-analysis/v1/exchange-rate/reset
{{< tabs " reset " >}}
{{< tab "Request Example" >}}
currency (string) Required
domain_id (string) Required
{{< highlight json >}} { "currency": "KRW" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
currency (string) Required
rate (float) Required
state (State) Required
is_default (bool) Required
domain_id (string) Required
{{< highlight json >}} { "currency": "KRW", "rate": 1300.0, "state": "ENABLED", "is_default": true } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
POST /cost-analysis/v1/exchange-rate/enable
{{< tabs " enable " >}}
{{< tab "Request Example" >}}
currency (string) Required
domain_id (string) Required
{{< highlight json >}} { "currency": "KRW" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
currency (string) Required
rate (float) Required
state (State) Required
is_default (bool) Required
domain_id (string) Required
{{< highlight json >}} { "currency": "KRW", "rate": 1300.0, "state": "ENABLED", "is_default": true } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
POST /cost-analysis/v1/exchange-rate/disable
{{< tabs " disable " >}}
{{< tab "Request Example" >}}
currency (string) Required
domain_id (string) Required
{{< highlight json >}} { "currency": "KRW" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
currency (string) Required
rate (float) Required
state (State) Required
is_default (bool) Required
domain_id (string) Required
{{< highlight json >}} { "currency": "KRW", "rate": 1300.0, "state": "ENABLED", "is_default": true } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
Gets a specific ExchangeRate. Prints detailed information about the ExchangeRate, including currency
and rate
.
POST /cost-analysis/v1/exchange-rate/get
{{< tabs " get " >}}
{{< tab "Request Example" >}}
currency (string) Required
domain_id (string) Required
{{< highlight json >}} { "currency": "KRW" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
currency (string) Required
rate (float) Required
state (State) Required
is_default (bool) Required
domain_id (string) Required
{{< highlight json >}} { "currency": "KRW", "rate": 1300.0, "state": "ENABLED", "is_default": true } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
Gets a list of all ExchangeRates. You can use a query to get a filtered list of ExchangeRates.
POST /cost-analysis/v1/exchange-rate/list
{{< tabs " list " >}}
{{< tab "Request Example" >}}
domain_id (string) Required
{{< highlight json >}} {
} {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
results (ExchangeRateInfo) Repeated
Required
total_count (int32) Required
{{< highlight json >}} { "results": [ { "currency": "JPY", "rate": 129.8, "state": "ENABLED", "is_default": true, "domain_id": "domain-58010aa2e451" }, { "currency": "KRW", "rate": 1242.7, "state": "ENABLED", "is_default": true, "domain_id": "domain-58010aa2e451" } ], "total_count": 2 } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
currency (string) Required
rate (float) Required
state (State) Required
is_default (bool) Required
domain_id (string) Required
domain_id (string) Required
currency (string) Required
domain_id (string) Required
results (ExchangeRateInfo) Repeated
Required
total_count (int32) Required
currency (string) Required
rate (float) Required
domain_id (string) Required