Overview
Resource Templates are used to represent the base for a Resource. A Resource Template will be used to generate multiple unique instances of Resources.
List
Get /v1/b2b/resourcetemplates
Input:
resourceCategory: (Required) the category of resource templates you want to list, one of Personnel, Facilities, Equipment or Other
Response:
The list of Resource Template Objects corresponding to the specified category.
Get
Get /v1/b2b/resourcetemplates/{id}
Input:
id: The id of the resource template you are looking for.
Response:
the corresponding Resource Template Object.
Create
Post /v1/b2b/resourcetemplates
Body:
A Resource Template Object
Response:
The id of the newly created resource template.
Update
Put /v1/b2b/resourcetemplates/{id}
Input:
id: The id of the resource template you are updating.
Body:
A Resource Template Object
Response:
None
Delete
Delete /v1/b2b/resourcetemplates/{id}
input:
id: The id of the Resource Template you want to delete.
response:
None
Summary
Get /v1/b2b/resourcetemplates/summary
input:
resourceCategory: (Optional) the category of resource templates you are looking for.
searchContent: (Optional) the start of the name of resource templates you are looking for.
response:
A list of Resource Template Summary objects corresponding to the input parameters.
Field Definitions
Resource Template Object
Field | Description | Notes |
---|---|---|
id | Unique ID of this resource template. | |
name | Name of the resource template. | |
description | Description of the resource template. | |
createdOn | Time the resource template was created. | |
createdBy | ID of the user who created the resource template. | |
updatedOn | Time the resource template was last updated. | |
updatedBy | ID of the user who updated the resource template. | |
fields | List of fields for this resource template | |
fields[x].name | The name of the field, like 'Language'. | |
fields[x].type | The type of field one of (StringType, StringArrayType, NumberType or NumberArrayType) | |
fields[x].stringValue | if the type is StringType, then this will hold the value. | |
fields[x].stringArrayValue | A list of strings, if the type if StringArrayType then this is the value of this field. | |
fields[x].numberValue | If the type is NumberType then this is the value. | |
fields[x].numberArrayValue | List of numbers, if the type is NumberArrayType then this is the value. | |
fields[x].minValue | Minimum value if the type is NumberType. | |
fields[x].maxValue | Maximum valid value if the type is NumberType. | |
fields[x].hidden | Boolean, true if you want the field hidden otherwise false. Default is false. | |
fields[x].fieldOrder | Order you want the fields displayed in. | |
resourceCategory | The category of resource template. One of Personnel, Facilities, Equipment or Other | |
resourceUser | The user that's associated with this resource template. | |
resourceUser.userFirstName | Default first name for resources created with this template. | |
resourceUser.userLastName | Default last name for resources created with this template. | |
resourceCapacity | The category of resource template. One of Personnel, Facilities, Equipment or Other. | |
resourceCapacity.defaultCapacity | Default capacity for resource created by this template. | |
resourceCapacity.minimumCapacity | Default minimum capacity for resources created by this template. | |
resourceCapacity.maximumCapacity | Default maximum capacity for resources created by this template. |
Resource Template Summary Object
Field | Description | Notes |
---|---|---|
id | The unique id for the specified resource template. | |
name | The name of the resource template. | |
description | The description of the resource template. |
{ "name" : "typeName" , "description" : "typeDescription" , "createdOn" : "Thu Jun 05 18:14:26 PDT 2014" , "createdBy" : "1" , "updatedOn" : "Thu Jun 05 18:14:26 PDT 2014" , "updatedBy" : "1" , "fields" : [ { "name" : "FirstName" , "type" : "StringType" , "stringValue" : "" , "stringArrayValue" : null , "numberValue" : null , "numberArrayValue" : null , "minValue" : 10, "maxValue" : 100, "hidden" : false , "fieldOrder" : 3 }, { "name" : "LastName" , "type" : "StringType" , "stringValue" : "" , "stringArrayValue" : null , "numberValue" : null , "numberArrayValue" : null , "minValue" : 10, "maxValue" : 100, "hidden" : false , "fieldOrder" : 2 }, { "name" : "Language" , "type" : "StringArrayType" , "stringValue" : "" , "stringArrayValue" : [ "English" , "French" ], "numberValue" : null , "numberArrayValue" : null , "minValue" : 10, "maxValue" : 100, "hidden" : false , "fieldOrder" : 0 } ], "resourceCategory" : "Staff" , "resourceUser" : { "userId" : "" , "userFirstName" : "" , "userLastName" : "" } } |