Note, you can also access features available on the analytics dashboard via the API.
MemCachier uses credentials to allow access to the API. After you’ve created a cache, you can find your cache ID and credentials on the Settings page of your analytics dashboard . Only credentials that have the API capability will be allowed to use this API.
MemCachier expects for your credentials to be included in the header of all API requests.
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/<action> \
--user <username>:<password>
Make sure to replace <username>:<password>
and <cache_id>
with your credential username and password, and your cache ID, found on the Settings page of your analytics dashboard.
Returns all information relating to a cache. This includes cache, credential, and cluster related information.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/info
Status | Response |
---|---|
200 | A cache object |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/info \
--user <username>:<password>
{
"id": 4,
"name": "ABCDEF",
"label": "string",
"cache_type": "memcachier",
"plan": 26214400,
"provider": "ec2",
"enabled": true,
"cluster_name": "string",
"servers": [
"string"
],
"credentials": [
{
"id": 0,
"cache_id": 0,
"sasl_username": "string",
"sasl_password": "pa$$word",
"write_capability": true,
"flush_capability": true,
"api_capability": true,
"primary": true
}
],
"can_switch": true,
"can_manage_credentials": true,
"can_update_capabilities": true
}
The endpoint returns a list of all the credentials connected to the cache.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/credentials
Status | Response |
---|---|
200 | A list of credentials |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/credentials \
--user <username>:<password>
[
{
"id": 0,
"cache_id": 0,
"sasl_username": "string",
"sasl_password": "pa$$word",
"write_capability": true,
"flush_capability": true,
"api_capability": true,
"primary": true
},
// ...
]
This endpoint creates a new set of credentials which can be used to connect to the cache.
Note, development caches cannot manage credentials.
POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/credentials
Status | Response |
---|---|
201 | The newly created credential set. |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Not allowed to manage credentials, or Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl -X POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/credentials \
--user <username>:<password>
{
"id": 0,
"cache_id": 0,
"sasl_username": "string",
"sasl_password": "pa$$word",
"write_capability": true,
"flush_capability": true,
"api_capability": true,
"primary": true
}
This endpoint updates the capabilities of a specific set of credentials.
Note, sasl_username
is your credential_username
.
PATCH https://analytics.memcachier.com/api/v2/caches/<cache_id>/credentials/<credential_username>
Note, if you omit a capability from the request body its value will be set to false
.
{
"write_capability": boolean,
"flush_capability": boolean,
"api_capability": boolean
}
Status | Response |
---|---|
200 | Update successful |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Not allowed to manage credentials, or Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl -X PATCH https://analytics.memcachier.com/api/v2/caches/<cache_id>/credentials/<credential_username> \
--user <username>:<password> \
-H 'Content-Type: application/json' \
-d '{"write_capability":true,"flush_capability":false,"api_capability":true}'
{
"flush_capability": false,
"write_capability": false,
"api_capability": true,
}
This endpoint deletes a set of credentials.
DELETE https://analytics.memcachier.com/api/v2/caches/<cache_id>/credentials/<credential_username>
Status | Response |
---|---|
200 | Delete successful |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Not allowed to manage credentials, or Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl -X DELETE https://analytics.memcachier.com/api/v2/caches/<cache_id>/credentials/<credential_username> \
--user <username>:<password>
This endpoint promotes a set of credentials to be your primary credentials.
POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/credentials/primary/<credential_username>
Status | Response |
---|---|
200 | Update successful |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl -X POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/credentials/primary/<credential_username> \
--user <username>:<password>
{
"id": 0,
"cache_id": 0,
"sasl_username": "string",
"sasl_password": "pa$$word",
"write_capability": true,
"flush_capability": true,
"api_capability": true,
"primary": true
}
Rotate SSO secret for analytics dashboard, invalidating dashboard URLs.
POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/rotate_sso
Status | Response |
---|---|
200 | SSO rotation successful |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl -X POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/rotate_sso \
--user <username>:<password>
string
Enable a disabled cache.
POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/enable_cache
Status | Response |
---|---|
200 | Enabled cache successfully |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl -X POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/enable_cache \
--user <username>:<password>
Switch to a different cluster.
POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/switch_cluster
Status | Response |
---|---|
200 | Cluster change successful |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl -X POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/switch_cluster \
--user <username>:<password>
New cluster name.
string
Flush the cache.
POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/flush
Status | Response |
---|---|
204 | Flushed cache successfully |
400 | Failed to flush cache, or The specified cache ID is invalid (not a number). |
404 | Cache not found. |
5XX | Unexpected error. |
curl -X POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/flush \
--user <username>:<password>
Reset stats.
POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/reset_stats
Status | Response |
---|---|
204 | Reset stats successfully |
400 | Failed to reset stats, or The specified cache ID is invalid (not a number). |
404 | Cache not found. |
5XX | Unexpected error. |
curl -X POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/reset_stats \
--user <username>:<password>
Get stats for a cache.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/stats
Status | Response |
---|---|
200 | Stats for this cache |
400 | Failed to get stats, or The specified cache ID is invalid (not a number). |
404 | Cache not found. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/stats \
--user <username>:<password>
{
"auth_cmds": 0,
"auth_errors": 0,
"bytes": 0,
"bytes_read": 0,
"bytes_written": 0,
"cas_badval": 0,
"cas_hits": 0,
"cas_misses": 0,
"cmd_delete": 0,
"cmd_flush": 0,
"cmd_get": 0,
"cmd_set": 0,
"cmd_touch": 0,
"curr_connections": 0,
"curr_items": 0,
"decr_hits": 0,
"decr_misses": 0,
"delete_hits": 0,
"delete_misses": 0,
"evictions": 0,
"expired": 0,
"get_hits": 0,
"get_misses": 0,
"incr_hits": 0,
"incr_misses": 0,
"limit_maxbytes": 0,
"time": 0,
"total_connections": 0,
"total_items": 0,
"touch_hits": 0,
"touch_misses": 0
}
Get processed stats aggregate for all servers.
The granularity of the timeseries depends on the start and end time. Up to 24 hours gets 1 minute granularity, up to 1 week gets 10 minute granularity, up to 3 month gets hour granularity, and above that gets day granularity.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/insight/processed_stats
Parameter | Default | Description |
---|---|---|
names | No default. Required. | The name(s) of the stats. Possible values: auth_cmds_rate, auth_errors_rate, bytes, bytes_read_rate, bytes_write_rate, cas_badval_rate, cas_fraction, cas_hit_rate, cas_rate, connection_rate, connections, decr_fraction, decr_hit_rate,decr_rate, delete_fraction, delete_hit_rate, delete_rate, eviction_rate, flush_fraction, flush_rate, get_expired_rate, get_fraction, get_hit_rate, get_rate, hit_rate, incr_fraction, incr_hit_rate, incr_rate, items,max_bytes, request_rate, set_fraction, set_rate, touch_fraction, touch_hit_rate, touch_rate |
startTime | 24h ago | The start time of the timeseries data. |
endTime | Now | The end time of the timeseries data. |
Status | Response |
---|---|
200 | Processed stats for this cache. |
400 | Failed to query InfluxDB, or InfluxDB query returned error, or query parameter names is required, or the specified cache ID is invalid (not a number). |
404 | Cache not found. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/insight/processed_stats?names=auth_cmds_rate,auth_errors_rate,bytes&startTime=2023-01-08T15:20:00Z&endTime=2023-01-10T15:20:00Z \
--user <username>:<password>
[
{
"name": "processed_stats",
"columns": [
"time",
"auth_cmds_rate",
"auth_errors_rate",
"bytes"
],
"values": [
[
"2023-01-10T15:20:00Z",
0,
0,
0
],
...
]
}
]
Get processed stats per server.
The granularity of the timeseries depends on the start and end time. Up to 24 hours gets 1 minute granularity, up to 1 week gets 10 minute granularity, up to 3 month gets hour granularity, and above that gets day granularity.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/insight/processed_stats/per_server
Parameter | Default | Description |
---|---|---|
names | No default. Required. | The name(s) of the stats. Possible values: auth_cmds_rate, auth_errors_rate, bytes, bytes_read_rate, bytes_write_rate, cas_badval_rate, cas_fraction, cas_hit_rate, cas_rate, connection_rate, connections, decr_fraction, decr_hit_rate,decr_rate, delete_fraction, delete_hit_rate, delete_rate, eviction_rate, flush_fraction, flush_rate, get_expired_rate, get_fraction, get_hit_rate, get_rate, hit_rate, incr_fraction, incr_hit_rate, incr_rate, items,max_bytes, request_rate, set_fraction, set_rate, touch_fraction, touch_hit_rate, touch_rate |
startTime | 24h ago | The start time of the timeseries data. |
endTime | Now | The end time of the timeseries data. |
Status | Response |
---|---|
200 | Processed stats for this cache. |
400 | Failed to query InfluxDB, or InfluxDB query returned error, or query parameter names is required, or the specified cache ID is invalid (not a number). |
404 | Cache not found. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/insight/processed_stats/per_server?names=auth_cmds_rate,auth_errors_rate,bytes&startTime=2023-01-08T15:20:00Z&endTime=2023-01-10T15:20:00Z \
--user <username>:<password>
[
{
"name": "processed_stats",
"tags": {
"server": "your.server.memcachier.com:11211"
},
"columns": [
"time",
"hit_rate",
"bytes",
"max_bytes"
],
"values": [
[
"2023-01-10T15:20:00Z",
0,
0,
0
],
...
]
},
...
]
Get latency for cache in nanoseconds, grouped by server. The granularity of the timeseries depends on the start and end time. Up to 24 hours gets 20s granularity, up to 1 week gets 10 minute granularity, up to 3 month gets hour granularity, and above that gets day granularity.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/insight/latency
Parameter | Default | Description |
---|---|---|
startTime | 24h ago | The start time of the timeseries data. |
endTime | Now | The end time of the timeseries data. |
Status | Response |
---|---|
200 | Latency for this cache in nanoseconds. |
400 | Failed to query InfluxDB, or InfluxDB query returned error, or query parameter names is required, or the specified cache ID is invalid (not a number). |
404 | Cache not found. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/insight/latency?startTime=2023-01-08T15:20:00Z&endTime=2023-01-10T15:20:00Z \
--user <username>:<password>
[
{
"name": "latency",
"tags": {
"server": "your.server.memcachier.com:11211"
},
"columns": [
"time",
"duration"
],
"values": [
[
"2023-01-08T15:20:00Z",
2416805.75
],
...
]
},
...
]
Get all alerts.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts
Status | Response |
---|---|
200 | An array of alert objects. |
400 | Alerts could not be retrieved. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts \
--user <username>:<password>
[
{
"id": 4,
"trigger_type": "string", // "hit_rate" or "memory_usage"
"trigger_threshold": 90, // percentage 0-100
"delivery_config_id": 4,
"description": "string",
"enabled": true
},
...
]
Create a new alert.
POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts
{
"trigger_type": "string", // "hit_rate" or "memory_usage"
"trigger_threshold": 0, // percentage 0-100
"delivery_config_id": 0,
"description": "string",
"enabled": boolean
}
Status | Response |
---|---|
201 | Added alert successfully. |
400 | The alert could not be added. An alert requires a type. |
5XX | Unexpected error. |
curl -X POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts \
--user <username>:<password> \
-H 'Content-Type: application/json' \
-d '{"trigger_type":"hit_rate","trigger_threshold":50,"delivery_config_id":1,"description":"This is a description.","enabled":true}'
{
"id": 4,
"trigger_type": "hit_rate",
"trigger_threshold": 50,
"delivery_config_id": 1,
"description": "This is a description.",
"enabled": true
}
Get an alert by ID.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/<alert_id>
Status | Response |
---|---|
200 | An alert object. |
400 | The specified alert ID is invalid (not a number). |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/<alert_id> \
--user <username>:<password>
{
"id": 4,
"trigger_type": "string", // "hit_rate" or "memory_usage"
"trigger_threshold": 80, // percentage 0-100
"delivery_config_id": 4,
"description": "string",
"enabled": true
}
Updates an alert.
PUT https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/<alert_id>
{
"id": 0,
"trigger_type": "string", // "hit_rate" or "memory_usage"
"trigger_threshold": 0, // percentage 0-100
"delivery_config_id": 0,
"description": "string",
"enabled": boolean
}
Status | Response |
---|---|
201 | Updated alert successfully. |
400 | The specified alert ID is invalid (not a number), or the alert could not be updated. |
5XX | Unexpected error. |
curl -X PUT https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/<alert_id> \
--user <username>:<password> \
-H 'Content-Type: application/json' \
-d '{"id":<alert_id>,"enabled":false}'
{
"id": 4,
"trigger_type": "string", // "hit_rate" or "memory_usage"
"trigger_threshold": 50, // percentage 0-100
"delivery_config_id": 1,
"description": "string",
"enabled": false,
}
Deletes an alert.
DELETE https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/<alert_id>
Status | Response |
---|---|
201 | Deleted alert successfully. |
400 | The specified alert ID is invalid (not a number), or the alert could not be deleted. |
5XX | Unexpected error. |
curl -X DELETE https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/<alert_id> \
--user <username>:<password>
List alert delivery configs.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/configs
Status | Response |
---|---|
200 | An array of alert delivery configs. |
400 | Alert delivery configs could not be retrieved. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/configs \
--user <username>:<password>
[
{
"id": 1,
"delivery_type": "string", // "email" or "slack"
"email": "string",
"slack_url": "string",
"slack_channel": "string"
},
...
]
Create an alert delivery config.
POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/configs
{
"delivery_type": "string", // "email" or "slack"
"email": "string",
"slack_url": "string",
"slack_channel": "string"
}
Status | Response |
---|---|
201 | Added alert delivery config successfully. |
400 | The alert delivery config could not be added. An alert delivery config requires a type. |
5XX | Unexpected error. |
curl -X POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/configs \
--user <username>:<password> \
-H 'Content-Type: application/json' \
-d '{"delivery_type":"slack","slack_url":"https://hooks.slack.com/services/...","slack_channel":"#alerts"}'
{
"id": 1,
"delivery_type": "slack",
"email": "",
"slack_url": "https://hooks.slack.com/services/...",
"slack_channel": "#alerts"
}
Delete an alert delivery config.
DELETE https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/configs/<config_id>
Status | Response |
---|---|
204 | Delete successful. |
400 | The specified alert delivery config ID is invalid (not a number), or the alert delivery config could not be deleted. |
5XX | Unexpected error. |
curl -X DELETE https://analytics.memcachier.com/api/v2/caches/<cache_id>/alerts/configs/<config_id> \
--user <username>:<password>
Get the last 100 log lines for cache.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/recent_logs
Status | Response |
---|---|
200 | Recent logs per server. |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/recent_logs \
--user <username>:<password>
{
"a.b.c.example-server.com:12345": [
{
"timestamp": "2023-01-11T10:10:44Z",
"key": "",
"command": "STATS",
"status": "OK",
"size": 0
},
...
]
}
Get compound stats for cache.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/compound_stats
Parameter | Default | Description |
---|---|---|
startTime | 24h ago | The start time of the timeseries data. |
endTime | Now | The end time of the timeseries data. |
Status | Response |
---|---|
200 | An array of compound stats. |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/compound_stats?startTime=2023-01-08T15:20:00Z&endTime=2023-01-10T15:20:00Z \
--user <username>:<password>
[
{
"name": "compound_stats",
"columns": [
"time",
"num_keys",
"total_size",
"total_hits_rate",
"total_misses_rate",
"total_mutations_rate"
],
"values": [
[
"2023-01-10T15:20:00Z",
0,
0,
0,
0,
0
],
...
]
}
]
Get popular items for cache.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/popular_items
Status | Response |
---|---|
200 | A popular items object |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/popular_items \
--user <username>:<password>
{
"time_slice": 186554450945,
"most_hit_keys": [
{
"name": "string",
"popularity": 0
},
...
],
"most_missed_keys": [
{
"name": "string",
"popularity": 0
},
...
],
"most_mutated_keys": [
{
"name": "string",
"popularity": 0
},
...
],
"popular_prefixes": [
{
"name": "string",
"popularity": 0
},
...
]
}
Get stats for a key by its name.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/key_stats
Parameter | Default | Description |
---|---|---|
key | No default. Required. | The name of the key. |
Status | Response |
---|---|
200 | A popular items object |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/key_stats?key=<key_name> \
--user <username>:<password>
[
{
"timestamp": "2019-08-24T14:15:22Z",
"name": "string",
"size": 0,
"hit_count": 0,
"miss_count": 0,
"mutation_count": 0,
"in_cache": true
}
]
Get all watched prefixes for cache.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/prefixes
Status | Response |
---|---|
200 | An array of prefixes. |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/prefixes \
--user <username>:<password>
[
{
"id": 1,
"name": "string",
},
...
]
Watch a prefix. Start collecting stats for a prefix.
POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/prefixes
Status | Response |
---|---|
200 | Prefix watched. Returns a prefix. |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl -X POST https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/prefixes \
--user <username>:<password> \
-H 'Content-Type: application/json' \
-d '{"name":"my_prefix"}'
{
"id": 1,
"name": "string",
}
Unwatch a prefix. Stop collecting stats for a prefix.
DELETE https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/prefixes/<prefix_id>
Status | Response |
---|---|
204 | Prefix unwatched. |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl -X DELETE https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/prefixes/<prefix_id> \
--user <username>:<password> \
Get stats for a watched prefix.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/prefixes/<prefix_id>/stats
Parameter | Default | Description |
---|---|---|
startTime | 24h ago | The start time of the timeseries data. |
endTime | Now | The end time of the timeseries data. |
Status | Response |
---|---|
200 | An array of prefix stats. |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/prefixes/<prefix_id>/stats?startTime=2023-01-08T15:20:00Z&endTime=2023-01-10T15:20:00Z \
--user <username>:<password>
[
{
"name": "prefix_stats",
"columns": [
"time",
"num_keys",
"total_size",
"total_hits_rate",
"total_misses_rate",
"total_mutations_rate"
],
"values": [
[
"2023-01-16T10:50:00Z",
0,
0,
0,
0,
0
],
...
]
}
]
Get popular items for a watched prefix.
GET https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/prefixes/<prefix_id>/popular_items
Status | Response |
---|---|
200 | An popular items object. |
400 | The specified cache ID is invalid (not a number). |
401 | Unauthorized to access cache with this ID. |
403 | Forbidden to access cache with this ID. |
5XX | Unexpected error. |
curl https://analytics.memcachier.com/api/v2/caches/<cache_id>/introspection/prefixes/<prefix_id>/popular_items \
--user <username>:<password>
{
"time_slice": 186554450945,
"most_hit_keys": [
{
"name": "string",
"popularity": 0
},
...
],
"most_missed_keys": [
{
"name": "string",
"popularity": 0
},
...
],
"most_mutated_keys": [
{
"name": "string",
"popularity": 0
},
...
],
"popular_prefixes": [
{
"name": "string",
"popularity": 0
},
...
]
}