<back to all web services

GetServices

The following routes are available for this service:
GET/RestApi/apiservice/services
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 GetServices:
    types: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ServicesResponse:
    services: Optional[List[ServicesProxy]] = None
    error_message: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PropertiesProxy:
    name: Optional[str] = None
    property_type: Optional[str] = None
    is_persistent: bool = False
    allow_sort: bool = False
    allow_filter: bool = False
    is_key: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ContentsProxy:
    name: Optional[str] = None
    read_only: bool = False
    url_key: Optional[str] = None
    clr_type: Optional[str] = None
    access: Optional[str] = None
    properties: Optional[List[PropertiesProxy]] = None
    children: Optional[List[ContentsProxy]] = None
    autogenerate_properties: bool = False
    parent_id: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ServicesProxy:
    name: Optional[str] = None
    route: Optional[str] = None
    url_name: Optional[str] = None
    enabled: bool = False
    access: Optional[str] = None
    api_key: Optional[str] = None
    access_control_allow_origin: Optional[str] = None
    autogenerate_types: bool = False
    types: Optional[List[ContentsProxy]] = None
    protocol: Optional[str] = None
    error_message: Optional[str] = None

Python GetServices DTOs

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

HTTP + JSV

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

GET /RestApi/apiservice/services HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Services: 
	[
		{
			"Name": "String",
			"Route": "String",
			"UrlName": "String",
			"Enabled": false,
			"Access": "String",
			"ApiKey": "String",
			"AccessControlAllowOrigin": "String",
			"AutogenerateTypes": false,
			"Types": null,
			"Protocol": "String",
			"ErrorMessage": "String"
		}
	],
	ErrorMessage: String
}