Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions modules/ROOT/pages/_partials/include-permissions-osv2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,5 @@
|View all clients of a cloud store.
|This permission doesn't apply to Object Store v2.

|Store Metrics Viewer
|Retrieve Object Store v2 metrics using the Object Store v2 Stats API.
|
|===
// end::osv2PermissionsTable[]
6 changes: 1 addition & 5 deletions modules/ROOT/pages/_partials/osv2-on-hyperforce.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// tag::osv2SupportOnHyperforce[]
You can't access or configure some Object Store v2 features, such as the Object Store v2 Stats API.
You can't access or configure some Object Store v2 features.
For information, see xref:object-store::index.adoc#osv2-on-hyperforce[Object Store v2 on Hyperforce].
// end::osv2SupportOnHyperforce[]

Expand All @@ -9,10 +9,6 @@ For information, see xref:object-store::index.adoc#osv2-on-hyperforce[Object Sto
// end::osv2FeaturesNoHF[]


// tag::apiStatsAPInotHF[]
Only the US Cloud and EU Cloud instances of Anypoint Platform support these REST APIs.
// end::apiStatsAPInotHF[]

// Note for features unsupported on HF
// tag::osv2FeaturesNoHFnote[]
Only the US Cloud and EU Cloud instances of Anypoint Platform support this feature.
Expand Down
10 changes: 0 additions & 10 deletions modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ To avoid these issues, use a distributed key-value store as a lock to synchroniz

|{empty}

* xref:osv2-usage.adoc#access-usage-charts[Usage Charts] (Access Management)
* xref:cloudhub::deploying-to-cloudhub.adoc[CloudHub 1.0 Deployments]
* xref:osv2-apis.adoc#osv2-stats-api[Object Store v2 Stats API]


| Yes
| No
Expand Down Expand Up @@ -183,12 +180,6 @@ All Object Store v2 features are supported on https://ca1.platform.mulesoft.com[
| *xref:cloudhub::deploying-to-cloudhub.adoc[CloudHub 1.0 Deployments]*
| Not supported. Deploy apps to xref:cloudhub-2::ch2-shared-space-about.adoc[CloudHub 2.0 shared spaces] or xref:runtime-fabric::index.adoc[Anypoint Runtime Fabric].

| *xref:osv2-usage.adoc#access-usage-charts[Usage Charts] (Access Management)*
| Not available. Use xref:osv2-usage.adoc#access-os-usage-reports[Usage Reports] instead.

| *xref:osv2-apis.adoc#osv2-stats-api[Object Store v2 Stats API]*
| Not supported.

|===

For information about the regions where Object Store v2 is available, see xref:osv2-faq.adoc#osv2-regions[Object Store v2 Regions].
Expand All @@ -201,5 +192,4 @@ For information about Anypoint Platform on other control planes, see xref:hyperf
* xref:access-management::permissions-by-product.adoc[]
* xref:release-notes::object-store/anypoint-osv2-release-notes.adoc[Object Store v2 Release Notes]
* xref:connectors::object-store/object-store-connector.adoc[Object Store Connector for Mule 4]
* https://dev-portal.mulesoft.com/apis/object-store-v2-stats.html[Object Store V2 Stats API]
* https://blogs.mulesoft.com/dev-guides/how-to-tutorials/data-synchronizing-made-easy-with-mule-watermarks/[Object Store Watermarks]
275 changes: 2 additions & 273 deletions modules/ROOT/pages/osv2-apis.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ The Object Store v2 APIs enable you to use REST to:
* Retrieve a list of object stores and keys associated with an application.
* Store and retrieve key-value pairs in an object store.
* Delete key-value pairs from an object store.
* Retrieve Object Store usage statistics for your organization.

Object Store provides these APIs:

* <<osv2-api,Object Store v2 API>>
* <<osv2-stats-api,Object Store v2 Stats API>>


[[before-you-begin]]
Expand All @@ -28,10 +26,10 @@ You need the bearer token to access all Object Store v2 APIs.
You need the organization ID and environment ID for operations with all Object Store v2 APIs.
* <<get-region-id,Get the REGION_ID>>.
+
You need the region ID for operations with the Object Store v2 Stats API.
You need the region ID for operations with the Object Store v2 API.
* <<get-store-id,Get the STORE_ID>>.
+
You need the store ID for operations with the Object Store v2 Stats API.
You need the store ID for operations with the Object Store v2 API.


[[get-bearer-token]]
Expand Down Expand Up @@ -547,274 +545,6 @@ This command returns output similar to:
----


[[osv2-stats-api]]
== Object Store v2 Stats API

[NOTE]
// Not on HF
include::partial$osv2-on-hyperforce.adoc[tag=apiStatsAPInotHF]

The Object Store v2 Stats API enables you to retrieve statistics on your Object Store usage.

The usage statistics aren't real-time and might include latency.

Use the Stats API to view your entire organization's usage of Object Store for billing purposes:

* Usage per root organization and all sub-organizations
* Usage per organization
* Usage per environment
* Usage per region
* Usage per store


[[osv2-usage-limits]]
=== Usage Metrics Limits

[%header,cols="10,15,15a"]
|===
| Parameter | Description | Values
| Time series (`period`) | Interval that the query records |

* `1hour`
* `1day`
* `1month`

|Data retention | Length of time that Object Store retains the data, based on `period`|

* `period=1hour`: 3 months
* `period=1day`: 12 months
* `period=1month`: 24 months

| Query timeframe | Maximum interval between `startDate` and `endDate` in the query, based on `period` |

* `period=1hour`: 1 day
* `period=1day`: 1 month
* `period=1month`: 2 months

NOTE: If the interval between `startDate` and `endDate` exceeds the limits, the API returns an HTTP 400 error.
|===


[[access-osv2-stats-api]]
=== Access the Object Store v2 Stats API

. <<get-bearer-token>>.
. Set up an application, such as Postman, to access the object store.
. Configure the access URL, replacing ORG_ID with your organization ID and
ENV_ID with your environment ID:
+
[source,bash,linenums]
----
https://object-store-stats.anypoint.mulesoft.com/api/v1/organizations/<ORG_ID>/environments/ENV_ID?startDate=...&endDate=...&period=...
----
+
[IMPORTANT]
include::partial$osv2-faq.adoc[tag=urlEncoded]
. Configure the application with HTTP headers and body for values to store to or read from
the object store.
. Send the operation to the Object Store v2 Stats API.

See also https://help.salesforce.com/s/articleView?id=002778591&type=1[How to use Object Store v2 Stats API].


[[example-osv2-stats-api]]
=== Examples: Object Store v2 Stats API

* <<usage-by-org>>
* <<usage-by-env>>
* <<usage-by-region>>
* <<usage-by-store>>


[[usage-by-org]]
==== Example: Get Usage Metrics by Organization

By default, the Object Store v2 Stats API endpoint retrieves statistics only for the specified ORG_ID.
To get the usage data for the root organization and all sub-organizations, set `isMaster` to `true` when ORG_ID is the root organization.
If you use `isMaster=true` to query a sub-organization, the endpoint returns no results.

To view Object Store usage statistics for the root organization and all sub-organizations,
between August 11, 2024 and September 11, 2024,
submit a `curl` command,
replacing
ORG_ID with the organization ID for your root organization and
BEARER_TOKEN with your bearer token:


[source,bash,linenums]
----
curl -X GET \
'https://object-store-stats.anypoint.mulesoft.com/api/v1/organizations/<ORG_ID>?startDate=2024-08-11T17%3A51%3A54.000Z&endDate=2024-09-11T17%3A51%3A54.000Z&period=1month&isMaster=true' \
-H 'authorization: Bearer <BEARER_TOKEN>'
----

This request returns a response similar to:

[source,json,linenums]
----
[
{"timeStamp":"2024-08-01T00:00:00Z","objectStoreRequestCount":38},
{"timeStamp":"2024-09-01T00:00:00Z","objectStoreRequestCount":28}
]
----

To view Object Store usage statistics for the root organization and all sub-organizations for one day, submit a `curl` command,
replacing
ORG_ID with the organization ID for your root organization and
BEARER_TOKEN with your bearer token:

[source,bash,linenums]
----
curl -X GET \
'https://object-store-stats.anypoint.mulesoft.com/api/v1/organizations/<ORG_ID>?startDate=2024-11-11T17%3A51%3A54.000Z&endDate=2024-11-131T17%3A51%3A54.000Z&period=1day&isMaster=true' \
-H 'authorization: Bearer <BEARER_TOKEN>'
----

This request returns a response similar to:

[source,json,linenums]
----
[
{"timeStamp":"2024-11-11T00:00:00Z","objectStoreRequestCount":36}
{"timeStamp":"2024-11-12T00:00:00Z","objectStoreRequestCount":22}
{"timeStamp":"2024-11-13T00:00:00Z","objectStoreRequestCount":43}
]
----

To view Object Store usage statistics for a sub-organization,
between February 10, 2024 and March 10, 2024,
submit a `curl` command,
replacing
ORG_ID with the organization ID for the sub-organization and
BEARER_TOKEN with your bearer token:


[source,bash,linenums]
----
curl -X GET \
'https://object-store-stats.anypoint.mulesoft.com/api/v1/organizations/<ORG_ID>?startDate=2024-02-10T17%3A51%3A54.000Z&endDate=2024-03-10T17%3A51%3A54.000Z&period=1month' \
-H 'authorization: Bearer <BEARER_TOKEN>'
----

This request returns a response similar to:

[source,json,linenums]
----
[
{"timeStamp":"2024-02-10T00:00:00Z","objectStoreRequestCount":1},
{"timeStamp":"2024-03-10T00:00:00Z","objectStoreRequestCount":15},
]
----

To view Object Store usage statistics for one day for a sub-organization,
submit a `curl` command, replacing
ORG_ID with the organization ID for the sub-organization and
BEARER_TOKEN with your bearer token:

[source,bash,linenums]
----
curl -X GET \
'https://object-store-stats.anypoint.mulesoft.com/api/v1/organizations/<ORG_ID>?startDate=2024-12-01T17%3A51%3A54.000Z&endDate=2024-12-03T17%3A51%3A54.000Z&period=1day' \
-H 'authorization: Bearer <BEARER_TOKEN>'
----

This request returns a response similar to:

[source,json,linenums]
----
[
{"timeStamp":"2024-12-01T00:00:00Z","objectStoreRequestCount":4}
{"timeStamp":"2024-12-02T00:00:00Z","objectStoreRequestCount":2}
{"timeStamp":"2024-12-03T00:00:00Z","objectStoreRequestCount":8}

]
----

[[usage-by-env]]
==== Example: Get Usage Metrics by Environment

To view Object Store usage statistics for an environment between August 13, 2024 and September 13, 2024,
submit a `curl` command, replacing
ORG_ID with your organization ID,
ENV_ID with your environment ID,
and BEARER_TOKEN with your bearer token:


[source,bash,linenums]
----
curl -X GET \
'https://object-store-stats.anypoint.mulesoft.com/api/v1/organizations/<ORG_ID>/environments/<ENV_ID>?startDate=2024-08-13T17%3A51%3A54.000Z&endDate=2024-09-13T17%3A51%3A54.000Z&period=1month' \
-H 'authorization: Bearer <BEARER_TOKEN>'
----

This request returns a response similar to:

[source,json,linenums]
----
[
{"timeStamp":"2024-08-01T00:00:00Z","objectStoreRequestCount":1},
{"timeStamp":"2024-09-01T00:00:00Z","objectStoreRequestCount":25}
]
----

[[usage-by-region]]
==== Example: Get Usage Metrics by Region

To view Object Store usage statistics for a region,
submit a `curl` command, replacing
ORG_ID with your organization ID,
ENV_ID with your environment ID,
REGION_ID with the region from which to retrieve metrics, and
BEARER_TOKEN with your bearer token:

[source,bash,linenums]
----
curl -X GET \
'https://object-store-stats.anypoint.mulesoft.com/api/v1/organizations/<ORG_ID>/environments/<ENV_ID>/regions/<REGION_ID>?startDate=2024-08-13T17%3A51%3A54.000Z&endDate=2024-09-13T17%3A51%3A54.000Z&period=1month' \
-H 'authorization: Bearer <BEARER_TOKEN>'
----

To retrieve the REGION_ID, see <<example-retrieve-region>>.

This request returns a response similar to:

[source,json,linenums]
----
[
{"timeStamp":"2024-08-01T00:00:00Z","objectStoreRequestCount":1},
{"timeStamp":"2024-09-01T00:00:00Z","objectStoreRequestCount":25}
]
----

[[usage-by-store]]
==== Example: Get Usage Metrics by Store

To view Object Store usage statistics for a store,
submit a `curl` command, replacing
ORG_ID with your organization ID,
ENV_ID with your environment ID,
REGION_ID with the region to retrieve metrics from,
STORE_ID with the store ID to retrieve metrics for,
and BEARER_TOKEN with your bearer token:

[source,bash,linenums]
----
curl -X GET \
'https://object-store-stats.anypoint.mulesoft.com/api/v1/organizations/<ORG_ID>/environments/<ENV_ID>/regions/<REGION_ID>/stores/<STORE_ID>?startDate=2024-08-13T17%3A51%3A54.000Z&endDate=2024-09-13T17%3A51%3A54.000Z&period=1month' \
-H 'authorization: Bearer <BEARER_TOKEN>'
----

To retrieve the STORE_ID, see <<example-retrieve-list>>.

This request returns a response similar to:

[source,json,linenums]
----
[
{"timeStamp":"2024-08-01T00:00:00Z","objectStoreRequestCount":1},
{"timeStamp":"2024-09-01T00:00:00Z","objectStoreRequestCount":25}
]
----
[[download-osv2-apis]]
== Download Object Store APIs from Exchange

Expand All @@ -834,6 +564,5 @@ image::os-exchange-download.png["Download button for the Object Store v2 API in

* xref:index.adoc#rolling-ttl[Rolling TTL]
* https://dev-portal.mulesoft.com/apis/object-store-v2.html[Object Store v2 API]
* https://dev-portal.mulesoft.com/apis/object-store-v2-stats.html[Object Store v2 Stats API]
* https://dev-portal.mulesoft.com/apis/access-management.html[Access Management API]
* xref:connectors::object-store/object-store-connector.adoc[Object Store Connector for Mule 4]
3 changes: 0 additions & 3 deletions modules/ROOT/pages/osv2-connected-apps.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,4 @@ This scope doesn't apply to Object Store v2.

This scope doesn't apply to Object Store v2.

|Store Metrics Viewer
|`read:store_metrics`
|Retrieve Object Store v2 metrics using the Object Store v2 Stats API.
|===
Loading