-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
flowerinthenight
committed
Mar 21, 2024
1 parent
ca6b615
commit 8a62129
Showing
4 changed files
with
121 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Overview | ||
|
||
| Description | Link | | ||
| ------------ | --------------------------------- | | ||
| API Base URL | `https://wavereport.mobingi.com/` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Pre-request | ||
|
||
open apiを使用するためのtokenを取得する必要があります。 | ||
|
||
**Response Format** | ||
|
||
``` | ||
{ | ||
token_type : string | ||
expires_in : number | ||
access_token : string | ||
} | ||
``` | ||
|
||
| Response value | type | description | | ||
| -------------- | -------- | ----------- | | ||
| `token_type` | _string_ | 認証スキーム | | ||
| `expires_in` | _number_ | 期限 43200秒 | | ||
| `access_token` | _string_ | token値 | | ||
|
||
## Token取得 | ||
|
||
openapiで使用するtokenを取得 | ||
|
||
**Request** | ||
|
||
```http | ||
POST /v1/access_token HTTP1.1 | ||
Content-Type: form-data | ||
{request body} | ||
``` | ||
|
||
`{request body}` の例 | ||
|
||
```ruby | ||
{ | ||
"grant_type":"client_credentials", | ||
"client_id":"test-client-id", | ||
"client_secret":"ABCDEFGHI" | ||
} | ||
``` | ||
|
||
| Body | description | | ||
| --------------- | ----------- | | ||
| `grant_type` | 固定値 | | ||
| `client_id` | 顧客ID | | ||
| `client_secret` | 顧客Secret | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Report | ||
|
||
**基本的なResponse Format** | ||
|
||
```javascript | ||
{ | ||
vendor : [ | ||
{ | ||
id : string | ||
name : string | ||
date : [ | ||
{ | ||
blended_cost : number | ||
date : string | ||
timestamp : number | ||
true_unblended_cost : number | ||
unblended_cost : number | ||
},... | ||
] | ||
},... | ||
] | ||
} | ||
``` | ||
|
||
| Response value | type | description | | ||
| --------------------- | -------- | --------------------------------------------------- | | ||
| `vendor` | _array_ | パラメーターで指定したvendor 例 : `aws` | | ||
| `id` | _string_ | - `service` servicename - `account` account id | | ||
| `name` | _string_ | - `service` servicename - `account` account name | | ||
| `date` | _array_ | 取得したデータ一覧 | | ||
| `date` | _string_ | - `monthly` : `YYYY-MM` - `daily` : `YYYY-MM-DD` | | ||
| `timestamp` | _number_ | `date` のUNIXタイムスタンプ | | ||
| `blended_cost` | _number_ | AWS CURの `lineitem/blendedcost` | | ||
| `unblended_cost` | _number_ | AWS CURの `lineitem/unblendedcost` | | ||
| `true_unblended_cost` | _number_ | mobingiで再計算したunblendedcost | | ||
|
||
## レポートの取得 | ||
|
||
**Request** | ||
|
||
```http | ||
GET /v1/reports/{owner}/{resolution}?from={from}&to={to}&by={by}&vendor={vendor} HTTP1.1 | ||
Content-Type: application/json | ||
``` | ||
|
||
`{Path Variables}` の例 | ||
|
||
| Path | description | | ||
| ------------ | -------------------------------- | | ||
| `owner` | 使用可能な値 - `company` | | ||
| `resolution` | 使用可能な値 - `monthly` - `daily` | | ||
|
||
`Request URL` の例 | ||
|
||
```ruby | ||
GET /v1/reports/company/monthly?from=2019-01-01&to=2019-02-01&by=service&vendor=aws | ||
``` | ||
|
||
| Params | description | | ||
| -------- | ----------------------------------------------------------------------------------------------------------------- | | ||
| `from` | 型 : _string_ フォーマット : _YYYY-MM\_DD_ 説明 : Monthly は自動的に `YYYY-MM`へ変換されます。 Daily は自動的に `YYYY-MM-DD`へ変換されます。 | | ||
| `to` | 型 : _string_ フォーマット : _YYYY-MM\_DD_ 説明 : Monthly は自動的に `YYYY-MM`へ変換されます。 Daily は自動的に `YYYY-MM-DD`へ変換されます。 | | ||
| `by` | **使用可能な値** 型 : _string_ - `service` - `account` | | ||
| `vendor` | **使用可能な値** 型 : _string_ - `aws` | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters