BokaMera.API.Host

<back to all web services

ResourceTypeAvailableResourcesQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read
The following routes are available for this service:
GET/bookings/{Id}/resources/availableFind available resources.
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos

Namespace Global

    Namespace BokaMera.API.ServiceModel.Dtos

        Public Partial Class AvailableResourceResponse
            '''<Summary>
            '''The resource id
            '''</Summary>
            <ApiMember(Description:="The resource id")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The resource name
            '''</Summary>
            <ApiMember(Description:="The resource name")>
            Public Overridable Property Name As String

            '''<Summary>
            '''The resource description
            '''</Summary>
            <ApiMember(Description:="The resource description")>
            Public Overridable Property Description As String

            '''<Summary>
            '''The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue.
            '''</Summary>
            <ApiMember(Description:="The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue.")>
            Public Overridable Property Color As String

            '''<Summary>
            '''The image url of the resource
            '''</Summary>
            <ApiMember(Description:="The image url of the resource")>
            Public Overridable Property ImageUrl As Uri
        End Class

        <ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
        <ApiResponse(Description:="You have too low privilegies to call this service", StatusCode:=403)>
        <ValidateRequest(Validator:="IsAuthenticated")>
        Public Partial Class ResourceTypeAvailableResourcesQuery
            Implements ICompany
            '''<Summary>
            '''Enter the company and id you want to see the information for a resourcetype, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown 
            '''</Summary>
            <ApiMember(Description:="Enter the company and id you want to see the information for a resourcetype, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown ", ParameterType:="query")>
            Public Overridable Property CompanyId As Nullable(Of Guid)

            '''<Summary>
            '''Enter the id for the booking.
            '''</Summary>
            <ApiMember(Description:="Enter the id for the booking.", IsRequired:=true, ParameterType:="path")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''Enter the id for a resourcetype.
            '''</Summary>
            <ApiMember(Description:="Enter the id for a resourcetype.", IsRequired:=true)>
            Public Overridable Property ResourceTypeId As Integer
        End Class

        Public Partial Class ResourceTypeAvailableResourcesQueryResponse
            Public Sub New()
                Resources = New List(Of AvailableResourceResponse)
            End Sub

            '''<Summary>
            '''The resourcetype id
            '''</Summary>
            <ApiMember(Description:="The resourcetype id")>
            Public Overridable Property Id As Integer

            '''<Summary>
            '''The available resources
            '''</Summary>
            <ApiMember(Description:="The available resources")>
            Public Overridable Property Resources As List(Of AvailableResourceResponse)
        End Class
    End Namespace
End Namespace

VB.NET ResourceTypeAvailableResourcesQuery DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /bookings/{Id}/resources/available HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Id":0,"Resources":[{"Id":0,"Name":"String","Description":"String","Color":"String"}]}