Skip to content

Commit 2b52752

Browse files
ilia-semenovgitbook-bot
authored andcommitted
GITBOOK-9: API docs refresh – Aug 2023 – 2
1 parent 5274d2e commit 2b52752

12 files changed

Lines changed: 116 additions & 92 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Welcome to Cloudthread Developer API
44

5-
Welcome to Cloudthread Developer API! Here you'll find all the documentation you need to get up and running with the cloud cost management API.
5+
Welcome to Cloudthread **Developer API**! Here you'll find all the documentation you need to get up and running with the cloud cost management API.
66

77
## Want to check it out?
88

SUMMARY.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* [Events Overlay Ingestion](reference/api-reference/events.md)
1010
* [Tag Catalog Fetch](reference/api-reference/tag\_catalog.md)
1111
* [Metric Fetch](reference/api-reference/metrics.md)
12-
* [Teams](reference/api-reference/teams.md)
1312
* [Users](reference/api-reference/users.md)
14-
* [Savings Hub](reference/api-reference/savings-hub.md)
13+
* [Teams](reference/api-reference/teams.md)
14+
* [Savings Hub](reference/api-reference/savings-hub/README.md)
15+
* [Opportunities Explorer](reference/api-reference/savings-hub/opportunities-explorer.md)

reference/api-reference/README.md

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,74 @@
11
# API Reference
22

3-
Cloudthread provides a powerful and flexible REST Developer API to help you get the most out of your data.
3+
Cloudthread provides a powerful and flexible **REST Developer API** to help you get the most out of your data.
44

5-
This page shows how to use the API, and what features are currently available.
5+
These docs show how to use the API, and what features are currently available.
6+
7+
{% hint style="info" %}
8+
**Good to know:** All the API methods referenced in the docs are synced to a Swagger file URL (**OpenAPI v3**) and are kept up to date **automatically** with changes to the API.
9+
{% endhint %}
610

711
## Basic setup
812

9-
Cloudthread's Developer API lives at
13+
Cloudthread's **Developer API** lives at:
14+
15+
{% embed url="https://api.cloudthread.io" fullWidth="false" %}
1016

11-
`https://api.cloudthread.io`
17+
{% hint style="warning" %}
18+
Cloudthread requires an **API Token** to process incoming developer API requests. 
1219

13-
Cloudthread requires an API Token to process incoming developer API requests. Admin's have the ability to generate API Tokens on the Cloudthread platform within the **Settings** tab.
20+
Admin's have the ability to generate API Tokens on the Cloudthread platform within the [Settings](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/settings "mention") tab.
21+
{% endhint %}
1422

1523
This API Token should be included in the headers for all Developer API requests as follows:
1624

1725
`x-api-key: {API_TOKEN}`
1826

19-
Any request without a valid token will be rejected.
27+
{% hint style="danger" %}
28+
Any request without a valid token will be **rejected**.
29+
{% endhint %}
2030

21-
## Custom Data Ingestion
31+
## Custom Data ingestion
2232

2333
Cloudthread provides the ability to send custom data to our systems that can then be used in your Cost Views and Unit Metrics.
2434

25-
In order to send custom data, you must provision a **Custom Data - Data Stream Token** on the Cloudthread platform within the **Settings** tab.
35+
In order to send custom data, you must provision a **Custom Data - Data Stream Token** on the Cloudthread platform within the [Settings](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/settings "mention") tab.
2636

2737
{% content-ref url="custom_data.md" %}
2838
[custom\_data.md](custom\_data.md)
2939
{% endcontent-ref %}
3040

31-
Data sent via this API will appear in **Costs Overview** and **Unit Metrics Lab** on Cloudthread's platform.
41+
Data sent via this API will appear in [Costs Overview](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-transparency/costs-overview "mention") and [Unit Metrics Lab](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/unit-metrics/unit-metrics-lab "mention") on Cloudthread's platform.
3242

33-
## Event Overlay Ingestion
43+
## Event Overlay ingestion
3444

35-
Cloudthread provides the ability to send webhook Events that can be overlayed on top of your Cost Views and Unit Metrics.
45+
Cloudthread provides the ability to send **webhook** **events** that can be overlayed on top of your [Cost Views](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-transparency/key-concepts/cost-view "mention") and [Unit Metrics](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/unit-metrics/key-concepts/unit-metric "mention"). See [Events Overlay](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-transparency/key-concepts/events-overlay "mention") for more details.
3646

3747
{% content-ref url="events.md" %}
3848
[events.md](events.md)
3949
{% endcontent-ref %}
4050

41-
Data sent via this API will appear in **Costs Overview** and **Unit Metrics Lab** on Cloudthread's platform.
51+
Data sent via this API will appear in [Costs Overview](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-transparency/costs-overview "mention") and [Unit Metrics Lab](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/unit-metrics/unit-metrics-lab "mention") on Cloudthread's platform.
4252

43-
## Tag Catalog Fetch
53+
## Tag Catalog fetch
4454

45-
Cloudthread provides the ability to fetch a Tag Catalog entry via catalog key.
55+
Cloudthread provides the ability to fetch a [Tags Catalog](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/tag-assistant/tag-catalogs "mention") entry via catalog key.
4656

4757
{% content-ref url="tag_catalog.md" %}
4858
[tag\_catalog.md](tag\_catalog.md)
4959
{% endcontent-ref %}
5060

51-
## Cost View and Unit Metric Data Fetch
61+
## Cost View and Unit Metric Data fetch
5262

53-
Cloudthread provides the ability to fetch a Cost View and Unit Metric data.
63+
Cloudthread provides the ability to fetch [Cost Views](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-transparency/key-concepts/cost-view "mention") and [Unit Metrics](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/unit-metrics/key-concepts/unit-metric "mention") data.
5464

5565
{% content-ref url="metrics.md" %}
5666
[metrics.md](metrics.md)
5767
{% endcontent-ref %}
5868

5969
## Users and Teams setup
6070

61-
API can be used to set up Users and Teams.
71+
API can be used to set up and change **Users** (see [User Management](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/settings/account-and-team-management "mention")) and [Teams](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/settings/teams "mention").
6272

6373
{% content-ref url="users.md" %}
6474
[users.md](users.md)
@@ -67,3 +77,11 @@ API can be used to set up Users and Teams.
6777
{% content-ref url="teams.md" %}
6878
[teams.md](teams.md)
6979
{% endcontent-ref %}
80+
81+
## Savings Hub manipulation
82+
83+
API to retrive and setup [Savings Opportunities](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-savings/key-concepts/optimization-opportunities "mention") and [Savings Threads](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-savings/key-concepts/savings-threads "mention").
84+
85+
{% content-ref url="savings-hub/" %}
86+
[savings-hub](savings-hub/)
87+
{% endcontent-ref %}

reference/api-reference/custom_data.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
# Data Ingestion
22

3-
Cloudthread can process custom data for generating Cost Views and Unit Metrics.
3+
Cloudthread can process custom data for generating [Cost Views](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-transparency/key-concepts/cost-view "mention") and [Unit Metrics](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/unit-metrics/key-concepts/unit-metric "mention").
44

5-
In order to send custom data, you must provision a **Custom Data - Data Stream Token** on the Cloudthread platform within the **Settings** tab.
5+
In order to send custom data, you must provision a **Custom Data - Data Stream Token** on the Cloudthread platform within the [Settings](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/settings "mention") tab.
6+
7+
{% hint style="info" %}
8+
See more in [Ingesting Custom Data](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/guides/monitoring-cloud-costs/ingesting-custom-data "mention") guide.
9+
{% endhint %}
610

711
{% swagger src="https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml" path="/streams/ingest" method="post" %}
812
[https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml](https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml)
913
{% endswagger %}
1014

11-
To send custom data to Cloudthread, use the endpoint above with the provisioned Data Stream Token and the following payload
15+
To send custom data to Cloudthread, use the endpoint above with the provisioned **Data Stream Token** and the following payload:
1216

1317
```json
1418
{
@@ -35,10 +39,10 @@ To send custom data to Cloudthread, use the endpoint above with the provisioned
3539
* `mertic_value`: float convertiable value of the metric.
3640
* `custom_dimensions`: map of **up to 10** key value pairs that you will be able to segment the data by on the Cloudthread platform.
3741

38-
If the data pass validation and successfully save you'll receive a `201` status code.
39-
40-
Cloudthread creates a record ID for each data point by hashing the metric name, metric aggreation function, and the custom dimensions into a single key. To update a data point that's already been sent, the incoming data point must match along these fields -- otherwise a new data point will be generated. You can then update a given timestamp and metric value pair by sending in the matching timestamp with a new metric value.
41-
42-
{% hint style="info" %}
43-
**Good to know:** All the methods shown below are synced to an example Swagger file URL and are kept up to date automatically with changes to the API.
42+
{% hint style="success" %}
43+
If the data pass **validation** and successfully save you'll receive a `201` status code.
4444
{% endhint %}
45+
46+
* Cloudthread creates a record ID for each data point by hashing the metric name, metric aggregation function, and the custom dimensions into a single key.
47+
* To update a data point that's already been sent, the incoming data point must match along these fields -- otherwise a new data point will be generated.
48+
* You can then update a given timestamp and metric value pair by sending in the matching timestamp with a new metric value.

reference/api-reference/events.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Event Overlay Ingestion
44

5-
Cloudthread can process webhook events that can be overlayed on top of your Cost Views and Unit Metrics.
5+
Cloudthread can process **webhook events** that can be overlayed on top of your [Cost Views](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-transparency/key-concepts/cost-view "mention") and [Unit Metrics](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/unit-metrics/key-concepts/unit-metric "mention").
66

77
{% swagger src="https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml" path="/events" method="post" %}
88
[https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml](https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml)
99
{% endswagger %}
1010

11-
To send events data to Cloudthread, use the endpoint above and the following payload
11+
To send events data to Cloudthread, use the endpoint above and the following payload:
1212

1313
```json
1414
{
@@ -28,15 +28,13 @@ To send events data to Cloudthread, use the endpoint above and the following pay
2828
```
2929

3030
* `timestamp`: datetime with **hourly** granularity. Any timestamp with minutes, seconds, etc. will be rejected. E.g. `'2022-10-01 00:00:00'`. To send daily data, send data with the timepart = `00:00:00`.
31-
* `team_id`: OPITIONAL - integer ID of the team for which the event is tied. If this value is set, only users on this team (and admins) will be able to see this event on the platform. Invalid team IDs will be rejected.
31+
* `team_id`: OPITIONAL integer ID of the team for which the event is tied. If this value is set, only users on this team (and admins) will be able to see this event on the platform. Invalid team IDs will be rejected.
3232
* `decscription`: text describing event.
33-
* `type`: event type to help organize and filter events on the platform - please ensure types are consistent across events to create easy filtering.
34-
* `event_url`: OPTIONAL - link to get more information about the sent event.
33+
* `type`: event type to help organize and filter events on the platform please ensure types are consistent across events to create easy filtering.
34+
* `event_url`: OPTIONAL link to get more information about the sent event.
3535

36-
If the data pass validation and successfully save you'll receive a `201` status code.
37-
38-
Data sent via this API will appear in **Costs Overview** and **Unit Metrics Lab** on Cloudthread's platform.
39-
40-
{% hint style="info" %}
41-
**Good to know:** All the methods shown below are synced to an example Swagger file URL and are kept up to date automatically with changes to the API.
36+
{% hint style="success" %}
37+
If the data pass **validation** and successfully save you'll receive a `201` status code.
4238
{% endhint %}
39+
40+
Data sent via this API will appear in [Costs Overview](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-transparency/costs-overview "mention") and [Unit Metrics Lab](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/unit-metrics/unit-metrics-lab "mention") on Cloudthread's platform.

reference/api-reference/metrics.md

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,52 @@
22

33
## Cost View Fetch
44

5-
Cloudthread provides the ability to query your [Cost Views](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-transparency/key-concepts/cost-view).
5+
Cloudthread provides the ability to query your [Cost Views](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-transparency/key-concepts/cost-view "mention").
66

77
{% swagger src="https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml" path="/cost/metric/{metric_id}" method="get" %}
88
[https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml](https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml)
99
{% endswagger %}
1010

11-
* `metric_id`: the ID of the Cost View you wish to query.
11+
To query [Cost Views](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-transparency/key-concepts/cost-view "mention"), use the endpoint above and the following query parameters:
1212

13-
To query Cost Views, use the endpoint above and the following query parameters
13+
* Path (go after `/` in the URL)
14+
* `metric_id`: the ID of the Cost View you wish to query
15+
* Query (go after `?` in the URL)
16+
* `start_date`: start date of the timeframe you wish to query – formatted as YYYY-MM-DD, required
17+
* `end_date`: inclusive end date of the timeframe you wish to query – formatted as YYYY-MM-DD
18+
* `cost_type`: OPTIONAL – specifies the cost type (Unblended, Public, etc.)
19+
* `amortization`: OPTIONAL – specifies if to include amortization
20+
* `exclude`: OPTIONAL – specifies if to exclude taxes, refunds, etc.
21+
* `granularity`: OPTIONAL – specifies the data granularity (hour, day, week, quarter, year)
1422

15-
* `start_date`: start date of the timeframe you wish to query - formatted as YYYY-MM-DD
16-
* `end_date`: inclusive end date of the timeframe you wish to query - formatted as YYYY-MM-DD
17-
18-
If the data pass validation a `200` status code.
23+
{% hint style="info" %}
24+
If the data pass **validation** a `200` status code.
25+
{% endhint %}
1926

2027
## Unit Metric Fetch
2128

22-
Cloudthread provides the ability to query your [Unit Metrics](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/unit-metrics/key-concepts/unit-metric).
29+
Cloudthread provides the ability to query your [Unit Metrics](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/unit-metrics/key-concepts/unit-metric "mention").
2330

2431
{% swagger src="https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml" path="/unit/metric/{metric_id}" method="get" %}
2532
[https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml](https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml)
2633
{% endswagger %}
2734

28-
* `metric_id`: the ID of the Unit Metric you wish to query.
29-
30-
To query Unit Metrics, use the endpoint above and the following query parameters
35+
To query [Unit Metrics](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/unit-metrics/key-concepts/unit-metric "mention") use the endpoint above and the following query parameters:
3136

32-
* `start_date`: start date of the timeframe you wish to query - formatted as YYYY-MM-DD
33-
* `end_date`: inclusive end date of the timeframe you wish to query - formatted as YYYY-MM-DD
34-
35-
If the data pass validation a `200` status code.
37+
* Path (go after `/` in the URL)
38+
* `metric_id`: the ID of the Unit Metric you wish to query.
39+
* Query (go after `?` in the URL)
40+
* `start_date`: start date of the timeframe you wish to query - formatted as YYYY-MM-DD
41+
* `end_date`: inclusive end date of the timeframe you wish to query - formatted as YYYY-MM-DD
42+
* `cost_type`: OPTIONAL – specifies the cost type (Unblended, Public, etc.)
43+
* `amortization`: OPTIONAL – specifies if to include amortization
44+
* `exclude`: OPTIONAL – specifies if to exclude taxes, refunds, etc.
45+
* `granularity`: OPTIONAL – specifies the data granularity (hour, day, week, quarter, year)
3646

3747
{% hint style="info" %}
38-
**Good to know:** All the methods shown below are synced to an example Swagger file URL and are kept up to date automatically with changes to the API.
48+
If the data pass **validation** a `200` status code.
49+
{% endhint %}
50+
51+
{% hint style="success" %}
52+
See the response data **schema** at the method description above.
3953
{% endhint %}

reference/api-reference/savings-hub.md

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Savings Hub
2+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Opportunities Explorer
2+
3+
This API allows to work with [Savings Opportunities](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/cost-savings/key-concepts/optimization-opportunities "mention").
4+
5+
{% swagger src="https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml" path="/cost-optimization/opportunities/list" method="post" %}
6+
[https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml](https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml)
7+
{% endswagger %}

reference/api-reference/tag_catalog.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
## Tag Catalog Fetch
44

5-
Cloudthread provides the ability to fetch a Tag Catalog entry via catalog key.
5+
Cloudthread provides the ability to fetch a [Tags Catalog](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/tag-assistant/tag-catalogs "mention") entry via catalog key.
6+
7+
{% hint style="info" %}
8+
See [Setting up Tag Catalog](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/guides/tagging-cloud-resources/setting-up-tag-catalog "mention") guide for more details.
9+
{% endhint %}
610

711
{% swagger src="https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml" path="/tag-catalog" method="get" %}
812
[https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml](https://raw.githubusercontent.com/cloudthread/docs-api/main/cldthrd_api.yaml)
913
{% endswagger %}
1014

11-
To query Tag Catalog, use the endpoint above and the following query parameters
15+
To query [Tags Catalog](http://127.0.0.1:5000/s/XCkDKj2xeiQhlyRGF6Wr/fundamentals/tag-assistant/tag-catalogs "mention"), use the endpoint above and the following query parameters
1216

1317
* `catalog_key`: the ID of the Catalog entry you wish to query
14-
15-
{% hint style="info" %}
16-
**Good to know:** All the methods shown below are synced to an example Swagger file URL and are kept up to date automatically with changes to the API.
17-
{% endhint %}

0 commit comments

Comments
 (0)