Collection
Collections are the records of arthropod population data through the placement of traps. To learn more view the collection form documentation.
Creating a collection
URL
: /v1/arthropod/collection
Request Type
: POST
Request
Parameters
General
Name | Type | Description |
---|---|---|
agency | number | Internal ID corresponding to the agency that made the collection. |
collection_date | string | Required. Date on which trap was picked up. |
collection_date_date_only | boolean | False indicates that collection date has information beyond date such as time. |
collection_num | number | Agency reference number for collection. Defaults to next sequentially available. |
comments | string | Description of collection event. |
identified_by | string | Name of person that identified arthropods in this collection. |
num_trap | number | Required. The number of unique traps in operation at one site for this collection event. |
site | number | Internal ID corresponding to the site at which the collection took place. |
location | object | Shape object. Drawn from site if omitted. |
surv_year | number | Year in which surveillance occurred. |
trap | number | Required. Internal ID corresponding to the trap type used for the collection. |
trap_nights | number | Required. Number of nights from start to end of collection. |
trap_problem_bit | boolean | True indicates an issue with the collection, such as a mechanical failure. |
user | number | Internal ID corresponding to the user that created the collection. |
lures | array | Array of internal IDs corresponding to lures used with the trap. |
arthropods | array | Array of abundance objects. |
Abundance Object
Name | Type | Description |
---|---|---|
species | number | Required. Internal ID corresponding to species found. |
sex | number | Required. Internal ID corresponding to sex of arthropod found. |
num_count | number | Required. Number of arthropods of the species / sex combination found. |
Shape Object
Name | Type | Description |
---|---|---|
type | string | GIS geometry type. For collections, the correct value is "Point". |
coordinates | array | Geographical coordinates, such that [longitude, latitude]. If the longitude is in the western hemisphere, the value must be prefixed by the minus '-' sign. If the latitude is in the southern hemisphere, the value must be prefixed by the minus '-' sign. Longitude must be between -90 and 90. Latitude must be between -180 and 180. |
Sample Request Body
sample_collection_request.json
{
"collection_date": "2020-01-01",
"collection_num": 123456,
"comments": "This is an example comment",
"identified_by": "Collection Sampler",
"num_trap": 1,
"site": 223344,
"trap": 3,
"trap_nights": 4,
"trap_problem_bit": false,
"lures": [1],
"location": {
"shape": {
"type": "Point",
"coordinates": [-118.39643, 37.358737]
},
"coordinate_precision": 1
},
"arthropods": [
{
"species": 145,
"sex": 3,
"num_count": 3
},
{
"species": 145,
"sex": 4,
"num_count": 5
}
]
}
Response
Data
Name | Type | Description |
---|---|---|
add_date | string | Date on which collection record was saved to database. |
updated | string | Date on which collection record was last updated. |
id | number | Internal ID corresponding to this collection. |
collection_date | string | Date on which trap was picked up. |
collection_num | number | Agency reference number for collection. |
comments | string | Description of collection event. |
identified_by | string | Name of person that identified arthropods in this trap. |
num_trap | number | The number of unique traps in operation at one site for this collection event. |
site | number | Internal ID corresponding to the site at which the collection took place. |
trap | number | Internal ID corresponding to the trap type used for the collection. |
trap_nights | number | Number of nights from start to end of collection. |
agency | number | Internal ID corresponding to the agency that made the collection. |
surv_year | number | Year in which surveillance occurred. |
user | number | Internal ID corresponding to the user that created the collection. |
location | object | Shape object. |
arthropods | array | Array of abundance records. |
lures | array | Array of internal IDs corresponding to newly created lure records. |
Sample Response Body
sample_response.json
{
"add_date": "2023-01-01T05:55:29.895Z",
"updated": "2023-01-01T05:55:29.895Z",
"id": 456789,
"collection_date": "2020-01-01T00:00:00.000Z",
"collection_num": 123456,
"comments": "This is an example comment",
"identified_by": "Collection Sampler",
"num_trap": 1,
"site": 223344,
"trap": 3,
"trap_nights": 4,
"trap_problem_bit": false,
"agency": 10,
"collection_date_date_only": true,
"surv_year": 2020,
"user": 123,
"location": {
"table_name": "arthro_collection",
"record_id": 66066,
"agency": 10,
"shape": {
"crs": {
"type": "name",
"properties": {
"name": "EPSG:4326"
}
},
"type": "Point",
"coordinates": [-118.39643, 37.358737]
},
"coordinate_precision": 1
},
"arthropods": [
{
"id": 30236,
"species": 145,
"sex": 3,
"num_count": 3,
"collection": 66066,
"agency": 10,
"deactive_date": null
},
{
"id": 30235,
"species": 145,
"sex": 4,
"num_count": 5,
"collection": 66066,
"agency": 10,
"deactive_date": null
}
],
"lures": [98765]
}
Updating a collection
URL
: /v1/arthropod/collection/{id}
Request Type
: PUT
Request
Parameters
General
Name | Type | Description |
---|---|---|
agency | number | Internal ID corresponding to the agency that made the collection. |
collection_date | string | Date on which trap was picked up. |
collection_date_date_only | boolean | False indicates that collection date has information beyond date such as time. |
collection_num | number | Agency reference number for collection. Defaults to next sequentially available. |
comments | string | Description of collection event. |
identified_by | string | Name of person that identified arthropods in this collection. |
num_trap | number | The number of unique traps in operation at one site for this collection event. |
site | number | Internal ID corresponding to the site at which the collection took place. |
location | object | Shape object. Drawn from site if omitted. |
surv_year | number | Year in which surveillance occurred. |
trap | number | Internal ID corresponding to the trap type used for the collection. |
trap_nights | number | Number of nights from start to end of collection. |
trap_problem_bit | boolean | True indicates an issue with the collection, such as a mechanical failure. |
user | number | Internal ID corresponding to the user that created the collection. |
lures | array | Array of internal IDs corresponding to lures used with the trap. |
arthropods | array | Array of abundance objects. |
Sample Request Body
sample_collection_request_updating_date_and_trap.json
{
"collection_date": "2020-02-02",
"trap": 30
}
Response
Data
Name | Type | Description |
---|---|---|
add_date | string | Date on which collection record was saved to database. |
updated | string | Date on which collection record was last updated. |
id | number | Internal ID corresponding to this collection. |
collection_date | string | Date on which trap was picked up. |
collection_num | number | Agency reference number for collection. |
comments | string | Description of collection event. |
identified_by | string | Name of person that identified arthropods in this trap. |
num_trap | number | The number of unique traps in operation at one site for this collection event. |
site | number | Internal ID corresponding to the site at which the collection took place. |
trap | number | Internal ID corresponding to the trap type used for the collection. |
trap_nights | number | Number of nights from start to end of collection. |
agency | number | Internal ID corresponding to the agency that made the collection. |
surv_year | number | Year in which surveillance occurred. |
user | number | Internal ID corresponding to the user that created the collection. |
location | object | Shape object. |
arthropods | array | Array of abundance records. |
lures | array | Array of internal IDs corresponding to active lure records associated with collection. |
Sample Response Body
sample_response.json
{
"add_date": "2023-01-01T05:55:29.895Z",
"updated": "2023-01-01T05:55:29.895Z",
"id": 456789,
"collection_date": "2020-01-01T00:00:00.000Z",
"collection_num": 123456,
"comments": "This is an example comment",
"identified_by": "Collection Sampler",
"num_trap": 1,
"site": 223344,
"trap": 30,
"trap_nights": 4,
"trap_problem_bit": false,
"agency": 10,
"collection_date_date_only": true,
"surv_year": 2020,
"user": 123,
"arthropods": [
{
"id": 30236,
"species": 145,
"sex": 3,
"num_count": 3,
"collection": 66066,
"agency": 10,
"deactive_date": null
},
{
"id": 30235,
"species": 145,
"sex": 4,
"num_count": 5,
"collection": 66066,
"agency": 10,
"deactive_date": null
}
],
"lures": [98765]
}
Retrieving collection information
URL
: /v1/arthropod/collection/{id}
Request Type
: GET
Request
Parameters
General
Name | Type | Description |
---|---|---|
populate[] | array | Interior fields to be expanded. Possible values: agency, user, trap, site, location, arthropods, pools, lures. |
sort | query | Order for returned records. Default will be provided. |
fields[] | array | Fields to include in response. |
page | number | Page number. |
page size | number | Number of results per page. |
search | string | Pattern to search for. |
searchFields[] | array | Array of fields to be pattern searched. String fields only. |
query | array | Supplemental postgres queries. |
Sample Request Body
Response
Sample Response Body
sample_response.json
{
"add_date": "2023-01-01T05:55:29.895Z",
"updated": "2023-01-01T05:55:29.895Z",
"id": 456789,
"collection_date": "2020-01-01T00:00:00.000Z",
"collection_num": 123456,
"comments": "This is an example comment",
"identified_by": "Collection Sampler",
"num_trap": 1,
"site": 223344,
"trap": 30,
"trap_nights": 4,
"trap_problem_bit": false,
"agency": 10,
"collection_date_date_only": true,
"surv_year": 2020,
"user": 123,
"arthropods": [
{
"id": 30236,
"species": 145,
"sex": 3,
"num_count": 3,
"collection": 66066,
"agency": 10,
"deactive_date": null
},
{
"id": 30235,
"species": 145,
"sex": 4,
"num_count": 5,
"collection": 66066,
"agency": 10,
"deactive_date": null
}
],
"lures": [98765]
}