Billhighway Cloud API

<back to all web services

CacheStatsRq

The following routes are available for this service:
GET/devops/api/caches/{location}/stats
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


# @Flags()
class CacheResult(IntEnum):
    NONE = 0
    MISS = 1
    HIT = 2
    PUT = 4
    DELETED = 8
    CLEARED = 16
    ADDED = 32
    UPDATED = 64
    UNAVAILABLE = 128
    EXPIRED = 256


class CacheLocation(IntEnum):
    NONE = 0
    OUT_OF_PROCESS = 1
    IN_PROCESS = 2
    IN_CONTEXT = 3


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheKey:
    region: Optional[str] = None
    base_key: Optional[str] = None
    key: Optional[str] = None
    expiration_seconds: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheResultBase:
    result: Optional[CacheResult] = None
    location: Optional[CacheLocation] = None
    key: Optional[CacheKey] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheStat:
    name: Optional[str] = None
    value: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheStatResult(CacheResultBase):
    statistics: Optional[List[CacheStat]] = None
    is_hit: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheStatsRs:
    statistics: Optional[CacheStatResult] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CacheStatsRq:
    location: Optional[str] = None

Python CacheStatsRq DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /devops/api/caches/{location}/stats HTTP/1.1 
Host: devapi.billhighway.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Statistics":{"Statistics":[{"Name":"String","Value":"String"}],"IsHit":false,"Result":0,"Location":0}}