ClubManager.Api

<back to all web services

FindStaff

Requires Authentication
Required role:API
The following routes are available for this service:
All Verbs/api/Query/Staff
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*


@AutoQueryViewer(Description="", IconUrl="octicon:database", Title="Staff")
open class FindStaff : QueryDb<StaffInstance>()
{
}

open class QueryDb<T> : QueryBase()
{
}

@DataContract
open class QueryBase
{
    @DataMember(Order=1)
    var Skip:Int? = null

    @DataMember(Order=2)
    var Take:Int? = null

    @DataMember(Order=3)
    var OrderBy:String? = null

    @DataMember(Order=4)
    var OrderByDesc:String? = null

    @DataMember(Order=5)
    var Include:String? = null

    @DataMember(Order=6)
    var Fields:String? = null

    @DataMember(Order=7)
    var Meta:HashMap<String,String> = HashMap<String,String>()
}

open class StaffInstance
{
    var StaffId:Int? = null
    var Name:String? = null
    var Schedule:ScheduleInstance? = null
    @References(ScheduleInstance.class)
    var ScheduleId:Int? = null

    var Deleted:Boolean? = null
    var Demo:Boolean? = null
    var Group:String? = null
    var Profile:String? = null
    var FirstAidTrained:Boolean? = null
    var DBSCheck:Date? = null
    var InsuranceExpires:Date? = null
}

open class ScheduleInstance
{
    var ScheduleId:Int? = null
    var Name:String? = null
    var Description:String? = null
    var MondayFrom:TimeSpan? = null
    var MondayTo:TimeSpan? = null
    var TuesdayFrom:TimeSpan? = null
    var TuesdayTo:TimeSpan? = null
    var WednesdayFrom:TimeSpan? = null
    var WednesdayTo:TimeSpan? = null
    var ThursdayFrom:TimeSpan? = null
    var ThursdayTo:TimeSpan? = null
    var FridayFrom:TimeSpan? = null
    var FridayTo:TimeSpan? = null
    var SaturdayFrom:TimeSpan? = null
    var SaturdayTo:TimeSpan? = null
    var SundayFrom:TimeSpan? = null
    var SundayTo:TimeSpan? = null
    var ScheduleType:Int? = null
    var Deleted:Boolean? = null
    var Demo:Boolean? = null
}

@DataContract
open class QueryResponse<T>
{
    @DataMember(Order=1)
    var Offset:Int? = null

    @DataMember(Order=2)
    var Total:Int? = null

    @DataMember(Order=3)
    var Results:ArrayList<T> = ArrayList<T>()

    @DataMember(Order=4)
    var Meta:HashMap<String,String> = HashMap<String,String>()

    @DataMember(Order=5)
    var ResponseStatus:ResponseStatus? = null
}

Kotlin FindStaff 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 /api/Query/Staff HTTP/1.1 
Host: api.clubmanagercentral.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Skip: 0,
	Take: 0,
	OrderBy: String,
	OrderByDesc: String,
	Include: String,
	Fields: String,
	Meta: 
	{
		String: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Offset: 0,
	Total: 0,
	Results: 
	[
		{
			StaffId: 0,
			Name: String,
			Schedule: 
			{
				ScheduleId: 0,
				Name: String,
				Description: String,
				MondayFrom: PT0S,
				MondayTo: PT0S,
				TuesdayFrom: PT0S,
				TuesdayTo: PT0S,
				WednesdayFrom: PT0S,
				WednesdayTo: PT0S,
				ThursdayFrom: PT0S,
				ThursdayTo: PT0S,
				FridayFrom: PT0S,
				FridayTo: PT0S,
				SaturdayFrom: PT0S,
				SaturdayTo: PT0S,
				SundayFrom: PT0S,
				SundayTo: PT0S,
				ScheduleType: 0,
				Deleted: False,
				Demo: False
			},
			ScheduleId: 0,
			Deleted: False,
			Demo: False,
			Group: String,
			Profile: String,
			FirstAidTrained: False,
			DBSCheck: 0001-01-01,
			InsuranceExpires: 0001-01-01
		}
	],
	Meta: 
	{
		String: String
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}