<back to all web services

SettingsRequest

The following routes are available for this service:
All Verbs/RestApi/search/settings
GET/RestApi/search/settings
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 SettingsRequest:
    index_id: Optional[str] = None
    suggestion_fields: Optional[str] = None
    section_name: Optional[str] = None
    text: Optional[str] = None
    take: int = 0
    skip: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SettingsResponse:
    results: Optional[List[SettingDto]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SettingDto:
    title: Optional[str] = None
    section_name: Optional[str] = None
    full_setting_name: Optional[str] = None
    path: Optional[List[str]] = None
    visible_path: Optional[str] = None
    full_path: Optional[str] = None

Python SettingsRequest 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.

POST /RestApi/search/settings HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	SuggestionFields: String,
	SectionName: String,
	Text: String,
	Take: 0,
	Skip: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Results: 
	[
		{
			Title: String,
			SectionName: String,
			FullSettingName: String,
			VisiblePath: String,
			FullPath: String
		}
	]
}