| GET | /api/v1/users/{CustomerGuid} |
|---|
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 User:
# @ApiMember(IsRequired=true)
user_name: Optional[str] = None
password: Optional[str] = None
is_confirmed: Optional[str] = None
id: Optional[str] = None
role: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetCustomerUsersResponse:
response_status: Optional[ResponseStatus] = None
users: Optional[List[User]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetCustomerUsers(IHasBearerToken):
# @ApiMember(IsRequired=true, ParameterType="query")
bearer_token: Optional[str] = None
# @ApiMember(IsRequired=true, ParameterType="path")
customer_guid: Optional[str] = None
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.
GET /api/v1/users/{CustomerGuid} HTTP/1.1
Host: beson-servdesk.eras-online.de
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
},
users:
[
{
userName: String,
password: String,
isConfirmed: String,
id: String,
role: String
}
]
}