BokaMera.API.Host

<back to all web services

ResyncAllBookingsToCodelock

The following routes are available for this service:
POST/codelock/resyncAdd settings for code lock of the company of the currently logged in user.
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports ServiceStack.IO
Imports ServiceStack.Web

Namespace Global

    Namespace BokaMera.API.ServiceModel.Dtos

        Public Partial Class ResyncAllBookingsToCodelock
            Implements ICompany
            Public Overridable Property CompanyId As Nullable(Of Guid)
            Public Overridable Property Secret As String
        End Class
    End Namespace

    Namespace ServiceStack

        <Flags>
        Public Enum CacheControl
            None = 0
            Public = 1
            Private = 2
            MustRevalidate = 4
            NoCache = 8
            NoStore = 16
            NoTransform = 32
            ProxyRevalidate = 64
        End Enum

        Public Partial Class HttpResult
            Public Sub New()
                Headers = New Dictionary(Of String, String)
                Cookies = New List(Of Cookie)
            End Sub

            Public Overridable Property ResponseText As String
            Public Overridable Property ResponseStream As Stream
            Public Overridable Property FileInfo As FileInfo
            Public Overridable Property VirtualFile As IVirtualFile
            Public Overridable Property ContentType As String
            Public Overridable Property Headers As Dictionary(Of String, String)
            Public Overridable Property Cookies As List(Of Cookie)
            Public Overridable Property ETag As String
            Public Overridable Property Age As Nullable(Of TimeSpan)
            Public Overridable Property MaxAge As Nullable(Of TimeSpan)
            Public Overridable Property Expires As Nullable(Of Date)
            Public Overridable Property LastModified As Nullable(Of Date)
            Public Overridable Property CacheControl As CacheControl
            Public Overridable Property ResultScope As Func(Of IDisposable)
            Public Overridable Property AllowsPartialResponse As Boolean
            Public Overridable Property Options As IDictionary(Of String, String)
            Public Overridable Property Status As Integer
            Public Overridable Property StatusCode As HttpStatusCode
            Public Overridable Property StatusDescription As String
            Public Overridable Property Response As Object
            Public Overridable Property ResponseFilter As IContentTypeWriter
            Public Overridable Property RequestContext As IRequest
            Public Overridable Property View As String
            Public Overridable Property Template As String
            Public Overridable Property PaddingLength As Integer
            Public Overridable Property IsPartialRequest As Boolean
        End Class

        <Flags>
        Public Enum RequestAttributes
            None = 0
            Localhost = 1
            LocalSubnet = 2
            External = 4
            Secure = 8
            InSecure = 16
            AnySecurityMode = 24
            HttpHead = 32
            HttpGet = 64
            HttpPost = 128
            HttpPut = 256
            HttpDelete = 512
            HttpPatch = 1024
            HttpOptions = 2048
            HttpOther = 4096
            AnyHttpMethod = 8160
            OneWay = 8192
            Reply = 16384
            AnyCallStyle = 24576
            Soap11 = 32768
            Soap12 = 65536
            Xml = 131072
            Json = 262144
            Jsv = 524288
            ProtoBuf = 1048576
            Csv = 2097152
            Html = 4194304
            Jsonl = 8388608
            MsgPack = 16777216
            FormatOther = 33554432
            AnyFormat = 67076096
            Http = 67108864
            MessageQueue = 134217728
            Tcp = 268435456
            Grpc = 536870912
            EndpointOther = 1073741824
            AnyEndpoint = 2080374784
            InProcess = -2147483648
            InternalNetworkAccess = -2147483645
            AnyNetworkAccessType = -2147483641
            Any = -1
        End Enum
    End Namespace

    Namespace ServiceStack.IO

        Public Interface IVirtualDirectory
        End Interface

        Public Interface IVirtualFile
            Property VirtualPathProvider As IVirtualPathProvider
            Property Extension As String
            Property Length As Long
        End Interface

        Public Interface IVirtualPathProvider
            Property RootDirectory As IVirtualDirectory
            Property VirtualPathSeparator As String
            Property RealPathSeparator As String
        End Interface
    End Namespace

    Namespace ServiceStack.Web

        Public Interface IContentTypeWriter
        End Interface

        Public Interface IHttpFile
            Property Name As String
            Property FileName As String
            Property ContentLength As Long
            Property ContentType As String
            Property InputStream As Stream
        End Interface

        Public Interface IRequest
            Property OriginalRequest As Object
            Property Response As IResponse
            Property OperationName As String
            Property Verb As String
            Property RequestAttributes As RequestAttributes
            Property RequestPreferences As IRequestPreferences
            Property Dto As Object
            Property ContentType As String
            Property IsLocal As Boolean
            Property UserAgent As String
            Property Cookies As IDictionary(Of String, Cookie)
            Property ResponseContentType As String
            Property HasExplicitResponseContentType As Boolean
            Property Items As Dictionary(Of String, Object)
            Property Headers As NameValueCollection
            Property QueryString As NameValueCollection
            Property FormData As NameValueCollection
            Property UseBufferedStream As Boolean
            Property RawUrl As String
            Property AbsoluteUri As String
            Property UserHostAddress As String
            Property RemoteIp As String
            Property Authorization As String
            Property IsSecureConnection As Boolean
            Property AcceptTypes As String()
            Property PathInfo As String
            Property OriginalPathInfo As String
            Property InputStream As Stream
            Property ContentLength As Long
            Property Files As IHttpFile()
            Property UrlReferrer As Uri
        End Interface

        Public Interface IRequestPreferences
            Property AcceptsBrotli As Boolean
            Property AcceptsDeflate As Boolean
            Property AcceptsGzip As Boolean
        End Interface

        Public Interface IResponse
            Property OriginalResponse As Object
            Property Request As IRequest
            Property StatusCode As Integer
            Property StatusDescription As String
            Property ContentType As String
            Property OutputStream As Stream
            Property Dto As Object
            Property UseBufferedStream As Boolean
            Property IsClosed As Boolean
            Property KeepAlive As Boolean
            Property HasStarted As Boolean
            Property Items As Dictionary(Of String, Object)
        End Interface
    End Namespace
End Namespace

VB.NET ResyncAllBookingsToCodelock DTOs

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

HTTP + CSV

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

POST /codelock/resync HTTP/1.1 
Host: api.bokamera.se 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"CompanyId":"00000000-0000-0000-0000-000000000000","Secret":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{}