All Verbs | /utilidades/executeDBFunction |
---|
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 GeneralRS:
# @ApiMember(DataType="int", Description="Id del código de respuesta 1: Correcto, -1: Error", IsRequired=true, ParameterType="body")
codigo: int = 0
"""
Id del código de respuesta 1: Correcto, -1: Error
"""
# @ApiMember(DataType="string", Description="Mensaje que se envía al ejecutar el servicio", IsRequired=true, ParameterType="body")
mensaje: Optional[str] = None
"""
Mensaje que se envía al ejecutar el servicio
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ExecuteDBFunctionRS(GeneralRS):
respuesta: Optional[Object] = None
id_ejecucion: Decimal = decimal.Decimal(0)
url_archivo: Optional[str] = None
tipo_respuesta: Optional[str] = None
background: bool = False
tiempo_respuesta_b_d: int = 0
tiempo_respuesta_total: int = 0
# @ApiMember(DataType="int", Description="Id del código de respuesta 1: Correcto, -1: Error", IsRequired=true, ParameterType="body")
codigo: int = 0
"""
Id del código de respuesta 1: Correcto, -1: Error
"""
# @ApiMember(DataType="string", Description="Mensaje que se envía al ejecutar el servicio", IsRequired=true, ParameterType="body")
mensaje: Optional[str] = None
"""
Mensaje que se envía al ejecutar el servicio
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ExecuteDBFunctionRQ:
nombre_servicio: Optional[str] = None
parametros: Optional[Dict[str, Object]] = None
Python ExecuteDBFunctionRQ DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /utilidades/executeDBFunction HTTP/1.1
Host: soluser-recaudo.sgsas.co
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"NombreServicio":"String","Parametros":{"String":{}}}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Respuesta":{},"IDEjecucion":0,"URLArchivo":"String","TipoRespuesta":"String","Background":false,"TiempoRespuestaBD":0,"TiempoRespuestaTotal":0,"Codigo":0,"Mensaje":"String"}