| POST,OPTIONS | /v1/dispatch/heartbeat |
|---|
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
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DispatchHeartbeatTenantResult:
tenant_id: Optional[str] = None
tickets: int = 0
releases: int = 0
pings_cascaded: int = 0
offers_expired: int = 0
error: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DispatchHeartbeatResponse:
tenants: int = 0
tickets: int = 0
releases: int = 0
pings_cascaded: int = 0
offers_expired: int = 0
results: List[DispatchHeartbeatTenantResult] = field(default_factory=list)
response_status: Optional[ResponseStatus] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DispatchHeartbeatRequest:
tenant_id: Optional[str] = None
Python DispatchHeartbeatRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dispatch/heartbeat HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
TenantId: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Tenants: 0,
Tickets: 0,
Releases: 0,
PingsCascaded: 0,
OffersExpired: 0,
Results:
[
{
TenantId: 00000000000000000000000000000000,
Tickets: 0,
Releases: 0,
PingsCascaded: 0,
OffersExpired: 0,
Error: String
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}