Trendsic Platform Service

<back to all web services

IntegrationsActionRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/integrations/{Provider}/{Action}
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 ProviderView:
    key: Optional[str] = None
    name: Optional[str] = None
    category: Optional[str] = None
    blurb: Optional[str] = None
    mono: Optional[str] = None
    auth_mode: Optional[str] = None
    available: bool = False
    status: Optional[str] = None
    health: Optional[str] = None
    status_detail: Optional[str] = None
    account_label: Optional[str] = None
    environment: Optional[str] = None
    last_activity_at: Optional[datetime.datetime] = None
    manage_route: Optional[str] = None
    actions: List[str] = field(default_factory=list)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class IntegrationsActionResponse:
    ok: bool = False
    message: Optional[str] = None
    url: Optional[str] = None
    provider: Optional[ProviderView] = None
    response_status: Optional[ResponseStatus] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class IntegrationsActionRequest:
    provider: Optional[str] = None
    action: Optional[str] = None
    api_key: Optional[str] = None
    from_date: Optional[str] = None
    to_date: Optional[str] = None

Python IntegrationsActionRequest DTOs

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

HTTP + OTHER

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

POST /v1/integrations/{Provider}/{Action} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Provider":"String","Action":"String","ApiKey":"String","FromDate":"String","ToDate":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Ok":false,"Message":"String","Url":"String","Provider":{"Key":"String","Name":"String","Category":"String","Blurb":"String","Mono":"String","AuthMode":"String","Available":false,"Status":"String","Health":"String","StatusDetail":"String","AccountLabel":"String","Environment":"String","LastActivityAt":"0001-01-01T00:00:00.0000000","ManageRoute":"String","Actions":["String"]},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}