Field Squared API Services

<back to all web services

Availability

Represents a DTO to retrieve the availability of team and users based on a given set of constraints.
The constraints are passed as a set of parameters into the end point.
The parameters are described below and can be combined:
/?task=task id to use when filtering on distance to task, skill tags and task schedule.
/?xws=true (This request should search across workspaces that the request workspace has permission to assign teams/users to.)
/?coname=Used for cross workspaces queries, filter on Company Name.
/?costate=Used for cross workspaces queries, filter on state where Company headquarters are located.
/?codist=Used for cross workspaces queries, filter for Companies with headquarters located < X meters from task location
/?name=Filter on user/team name
/?state=Filter on user/team state
/?homedist=Filter on users/teams with home location < X meters from the task location
/?skills=true (Filter on users/teams that have the required skills to complete task based on skill tags)
/?specificskills=Filter users/teams on a specific set of comma delimited skills
/?usertypes=Filter users/teams on a specific set of comma delimited user types
/?checkschedules=true (Filter on users/teams that are available when the task is scheduled
/?drivetime=Filter on users/teams < X minutes drive time from the task location
/?proposedschedulenum=Propose X schedules based on user/team availability.
Returns a List<AvailabilityItem> which represent the users or teams that are available.

The following routes are available for this service:
GET/{Workspace}/Availability/Teams
GET/{Workspace}/Availability/Users
import 'package:servicestack/servicestack.dart';

/**
* Represents a DTO to retrieve the availability of team and users based on a given set of constraints.The constraints are passed as a set of parameters into the end point. The parameters are described below and can be combined: /?task=task id to use when filtering on distance to task, skill tags and task schedule. /?xws=true (This request should search across workspaces that the request workspace has permission to assign teams/users to.) /?coname=Used for cross workspaces queries, filter on Company Name. /?costate=Used for cross workspaces queries, filter on state where Company headquarters are located. /?codist=Used for cross workspaces queries, filter for Companies with headquarters located < X meters from task location /?name=Filter on user/team name /?state=Filter on user/team state /?homedist=Filter on users/teams with home location < X meters from the task location /?skills=true (Filter on users/teams that have the required skills to complete task based on skill tags)/?specificskills=Filter users/teams on a specific set of comma delimited skills/?usertypes=Filter users/teams on a specific set of comma delimited user types/?checkschedules=true (Filter on users/teams that are available when the task is scheduled /?drivetime=Filter on users/teams < X minutes drive time from the task location /?proposedschedulenum=Propose X schedules based on user/team availability.  Returns a List<AvailabilityItem> which represent the users or teams that are available.
*/
class Availability implements IConvertible
{
    String? Workspace;

    Availability({this.Workspace});
    Availability.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Workspace = json['Workspace'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Workspace': Workspace
    };

    getTypeName() => "Availability";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'dev.fieldsquared.com', types: <String, TypeInfo> {
    'Availability': TypeInfo(TypeOf.Class, create:() => Availability()),
});

Dart Availability 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.

GET /{Workspace}/Availability/Teams HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv