Species Observation System API (Public)
API change historySpecies Observation System API V1.5. The Species Observation System GitHub repository contains source code and documentation.
Exports_DownloadDwC
Download DwC export file. The limit is 25 000 observations. If you need to download more observations, use the OrderDwC endpoint.
Try itFörfrågan
Begärans-URL
Begäranparametrar
-
(valfri)boolean
Event based Darwin Core if true
-
(valfri)boolean
If true, validation of search filter values will be made. I.e. HTTP bad request response will be sent if there are invalid parameter values.
-
(valfri)boolean
Include sensitive observations if true
Begärandehuvud
-
(valfri)integer
Format - int32. Limit user authorization too specified role
-
(valfri)string
Name of application used in authorization.
-
(valfri)string
The requested API version
-
(valfri)string
Name of system doing the request
-
(valfri)stringMedietyp i texten som skickas till API:et.
-
stringOAuth 2.0-åtkomsttoken har erhållits från ids.artdatabanken.se. Beviljandetyper som stöds: Authorization code.
Brödtext i begäran
{
"birdNestActivityLimit": 0,
"dataProvider": {
"ids": [
0
]
},
"dataStewardship": {
"datasetIdentifiers": [
"string"
]
},
"date": {
"startDate": "string",
"endDate": "string",
"dateFilterType": "OverlappingStartDateAndEndDate",
"timeRanges": [
"Morning"
]
},
"determinationFilter": "NoFilter",
"diffusionStatuses": [
"NotDiffused"
],
"event": {
"ids": [
"string"
]
},
"excludeFilter": {
"occurrenceIds": [
"string"
]
},
"geographics": {
"areas": [
{
"areaType": "Municipality",
"featureId": "string"
}
],
"boundingBox": {
"bottomRight": {
"latitude": 0.0,
"longitude": 0.0
},
"topLeft": {
"latitude": 0.0,
"longitude": 0.0
}
},
"considerDisturbanceRadius": true,
"considerObservationAccuracy": true,
"maxDistanceFromPoint": 0.0,
"geometries": [
{
"type": "string"
}
],
"locationIds": [
"string"
],
"locationNameFilter": "string",
"maxAccuracy": 0
},
"modifiedDate": {
"from": "string",
"to": "string"
},
"notRecoveredFilter": "NoFilter",
"observedByMe": true,
"occurrenceStatus": "Present",
"projectIds": [
0
],
"reportedByMe": true,
"taxon": {
"includeUnderlyingTaxa": true,
"ids": [
0
],
"taxonListIds": [
0
],
"redListCategories": [
"string"
],
"taxonCategories": [
0
],
"taxonListOperator": "Merge"
},
"verificationStatus": "BothVerifiedAndNotVerified",
"output": {
"fieldSet": "Minimum",
"fields": [
"string"
]
}
}
{
"type": "object",
"properties": {
"birdNestActivityLimit": {
"type": "integer",
"description": "Limit returned observations based on bird nest activity level.\r\nOnly bird observations in Artportalen are affected\r\nby this search criteria.\r\nObservation of other organism groups (not birds) are\r\nnot affected by this search criteria.",
"format": "int32",
"nullable": true
},
"dataProvider": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Data provider id's",
"nullable": true
}
},
"additionalProperties": false,
"description": "Data provider filter."
},
"dataStewardship": {
"type": "object",
"properties": {
"datasetIdentifiers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Dataset filter",
"nullable": true
}
},
"additionalProperties": false
},
"date": {
"type": "object",
"properties": {
"startDate": {
"type": "string",
"description": "Observation start date specified in the ISO 8601 standard. If no timezone is specified, GMT+1 (CEST) is assumed",
"format": "date-time",
"nullable": true
},
"endDate": {
"type": "string",
"description": "Observation end date specified in the ISO 8601 standard. If no timezone is specified, GMT+1 (CEST) is assumed",
"format": "date-time",
"nullable": true
},
"dateFilterType": {
"enum": [
"OverlappingStartDateAndEndDate",
"BetweenStartDateAndEndDate",
"OnlyStartDate",
"OnlyEndDate"
],
"type": "string",
"description": "OverlappingStartDateAndEndDate, Start or EndDate of the observation must be within the specified interval \r\nBetweenStartDateAndEndDate, Start and EndDate of the observation must be within the specified interval \r\nOnlyStartDate, Only StartDate of the observation must be within the specified interval \r\nOnlyEndDate, Only EndDate of the observation must be within the specified interval"
},
"timeRanges": {
"type": "array",
"items": {
"enum": [
"Morning",
"Forenoon",
"Afternoon",
"Evening",
"Night"
],
"type": "string"
},
"description": "Predefined time ranges",
"nullable": true
}
},
"additionalProperties": false,
"description": "Date filter."
},
"determinationFilter": {
"enum": [
"NoFilter",
"NotUnsureDetermination",
"OnlyUnsureDetermination"
],
"type": "string"
},
"diffusionStatuses": {
"type": "array",
"items": {
"enum": [
"NotDiffused",
"DiffusedBySystem",
"DiffusedByProvider"
],
"type": "string",
"description": "Diffuse status dto"
},
"description": "Filter by diffusion status.",
"nullable": true
},
"event": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Event id's",
"nullable": true
}
},
"additionalProperties": false
},
"excludeFilter": {
"type": "object",
"properties": {
"occurrenceIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Exclude observations with listed occurrence id's",
"nullable": true
}
},
"additionalProperties": false
},
"geographics": {
"type": "object",
"properties": {
"areas": {
"type": "array",
"items": {
"type": "object",
"properties": {
"areaType": {
"enum": [
"Municipality",
"Community",
"Sea",
"CountryRegion",
"NatureType",
"Province",
"Ramsar",
"BirdValidationArea",
"Parish",
"Spa",
"County",
"ProtectedNature",
"SwedishForestAgencyDistricts",
"Sci",
"WaterArea",
"Atlas5x5",
"Atlas10x10",
"SfvDistricts",
"Campus"
],
"type": "string",
"description": "Area type dto"
},
"featureId": {
"type": "string",
"description": "Feature",
"nullable": true
}
},
"additionalProperties": false,
"description": "Area filter."
},
"description": "Area filter",
"nullable": true
},
"boundingBox": {
"type": "object",
"properties": {
"bottomRight": {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"format": "double"
},
"longitude": {
"type": "number",
"format": "double"
}
},
"additionalProperties": false
},
"topLeft": {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"format": "double"
},
"longitude": {
"type": "number",
"format": "double"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"considerDisturbanceRadius": {
"type": "boolean",
"description": "If true, observations that are outside Geometries polygons\r\nbut close enough when disturbance sensitivity of species\r\nare considered, will be included in the result."
},
"considerObservationAccuracy": {
"type": "boolean",
"description": "If true, observations that are outside Geometries polygons\r\nbut possibly inside when accuracy (coordinateUncertaintyInMeters)\r\nof observation is considered, will be included in the result."
},
"maxDistanceFromPoint": {
"type": "number",
"description": "If Geometries is of point type, this property must be set to a value greater than 0.\r\nObservations inside circle (center=point, radius=MaxDistanceFromPoint) will be returned.",
"format": "double",
"nullable": true
},
"geometries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"nullable": true,
"readOnly": true
}
},
"additionalProperties": false
},
"description": "Point or polygon geometry used for search.\r\nIf the geometry is a point, then MaxDistanceFromPoint is also used in search.",
"nullable": true
},
"locationIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Filter on location id/s. Only observations with passed location id/s this will be returned",
"nullable": true
},
"locationNameFilter": {
"type": "string",
"description": "Location name wild card filter",
"nullable": true
},
"maxAccuracy": {
"type": "integer",
"description": "Limit observation accuracy. Only observations with accuracy less than this will be returned",
"format": "int32",
"nullable": true
}
},
"additionalProperties": false,
"description": "Geometry filter."
},
"modifiedDate": {
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "Changed from",
"format": "date-time",
"nullable": true
},
"to": {
"type": "string",
"description": "Changed tp",
"format": "date-time",
"nullable": true
}
},
"additionalProperties": false,
"description": "Filter for observation Modified date"
},
"notRecoveredFilter": {
"enum": [
"NoFilter",
"OnlyNotRecovered",
"DontIncludeNotRecovered"
],
"type": "string"
},
"observedByMe": {
"type": "boolean",
"description": "Only get observations observed by me"
},
"occurrenceStatus": {
"enum": [
"Present",
"Absent",
"BothPresentAndAbsent"
],
"type": "string",
"description": "Possible values for the OccurrenceStatus filter."
},
"projectIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Project id's to match.",
"nullable": true
},
"reportedByMe": {
"type": "boolean",
"description": "Only get observations reported by me"
},
"taxon": {
"type": "object",
"properties": {
"includeUnderlyingTaxa": {
"type": "boolean",
"description": "If true, also include the underlying hierarchical taxa in search.\r\nE.g. If ids=[4000104](Aves) and includeUnderlyingTaxa=true, then you search for all birds."
},
"ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Dyntaxa taxon id's to match.",
"nullable": true
},
"taxonListIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Add (merge) or filter taxa by using taxon lists.",
"nullable": true
},
"redListCategories": {
"type": "array",
"items": {
"type": "string"
},
"description": "Redlist categories to match.\r\nPossible values are: \"DD\", \"EX\", \"RE\", \"CR\", \"EN\", \"VU\", \"NT\", \"LC\", \"NA\", \"NE\"",
"nullable": true
},
"taxonCategories": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Taxon categories to match.",
"nullable": true
},
"taxonListOperator": {
"enum": [
"Merge",
"Filter"
],
"type": "string",
"description": "Operator to use when TaxonListIds is specified."
}
},
"additionalProperties": false,
"description": "Taxon filter."
},
"verificationStatus": {
"enum": [
"BothVerifiedAndNotVerified",
"Verified",
"NotVerified"
],
"type": "string"
},
"output": {
"type": "object",
"properties": {
"fieldSet": {
"enum": [
"Minimum",
"Extended",
"AllWithValues",
"All",
"None"
],
"type": "string",
"description": "Export property sets."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "This parameter allows you to decide what fields should be returned, using a projection.\r\nOmit this parameter and you will receive the complete collection of fields.\r\nFor example, to retrieve only basic observation data, specify:\r\n[\"event.startDate\", \"event.endDate\", \"location.decimalLatitude\", \"location.decimalLongitude\", \"location.municipality\", \"taxon.id\", \"taxon.scientificName\", \"occurrence.recordedBy\", \"occurrence.occurrenceStatus\"].",
"nullable": true
}
},
"additionalProperties": false,
"description": "Response output settings"
}
},
"additionalProperties": false,
"description": "Search filter."
}
{
"birdNestActivityLimit": 0,
"dataProvider": {
"ids": [
0
]
},
"dataStewardship": {
"datasetIdentifiers": [
"string"
]
},
"date": {
"startDate": "string",
"endDate": "string",
"dateFilterType": "OverlappingStartDateAndEndDate",
"timeRanges": [
"Morning"
]
},
"determinationFilter": "NoFilter",
"diffusionStatuses": [
"NotDiffused"
],
"event": {
"ids": [
"string"
]
},
"excludeFilter": {
"occurrenceIds": [
"string"
]
},
"geographics": {
"areas": [
{
"areaType": "Municipality",
"featureId": "string"
}
],
"boundingBox": {
"bottomRight": {
"latitude": 0.0,
"longitude": 0.0
},
"topLeft": {
"latitude": 0.0,
"longitude": 0.0
}
},
"considerDisturbanceRadius": true,
"considerObservationAccuracy": true,
"maxDistanceFromPoint": 0.0,
"geometries": [
{
"type": "string"
}
],
"locationIds": [
"string"
],
"locationNameFilter": "string",
"maxAccuracy": 0
},
"modifiedDate": {
"from": "string",
"to": "string"
},
"notRecoveredFilter": "NoFilter",
"observedByMe": true,
"occurrenceStatus": "Present",
"projectIds": [
0
],
"reportedByMe": true,
"taxon": {
"includeUnderlyingTaxa": true,
"ids": [
0
],
"taxonListIds": [
0
],
"redListCategories": [
"string"
],
"taxonCategories": [
0
],
"taxonListOperator": "Merge"
},
"verificationStatus": "BothVerifiedAndNotVerified",
"output": {
"fieldSet": "Minimum",
"fields": [
"string"
]
}
}
{
"type": "object",
"properties": {
"birdNestActivityLimit": {
"type": "integer",
"description": "Limit returned observations based on bird nest activity level.\r\nOnly bird observations in Artportalen are affected\r\nby this search criteria.\r\nObservation of other organism groups (not birds) are\r\nnot affected by this search criteria.",
"format": "int32",
"nullable": true
},
"dataProvider": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Data provider id's",
"nullable": true
}
},
"additionalProperties": false,
"description": "Data provider filter."
},
"dataStewardship": {
"type": "object",
"properties": {
"datasetIdentifiers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Dataset filter",
"nullable": true
}
},
"additionalProperties": false
},
"date": {
"type": "object",
"properties": {
"startDate": {
"type": "string",
"description": "Observation start date specified in the ISO 8601 standard. If no timezone is specified, GMT+1 (CEST) is assumed",
"format": "date-time",
"nullable": true
},
"endDate": {
"type": "string",
"description": "Observation end date specified in the ISO 8601 standard. If no timezone is specified, GMT+1 (CEST) is assumed",
"format": "date-time",
"nullable": true
},
"dateFilterType": {
"enum": [
"OverlappingStartDateAndEndDate",
"BetweenStartDateAndEndDate",
"OnlyStartDate",
"OnlyEndDate"
],
"type": "string",
"description": "OverlappingStartDateAndEndDate, Start or EndDate of the observation must be within the specified interval \r\nBetweenStartDateAndEndDate, Start and EndDate of the observation must be within the specified interval \r\nOnlyStartDate, Only StartDate of the observation must be within the specified interval \r\nOnlyEndDate, Only EndDate of the observation must be within the specified interval"
},
"timeRanges": {
"type": "array",
"items": {
"enum": [
"Morning",
"Forenoon",
"Afternoon",
"Evening",
"Night"
],
"type": "string"
},
"description": "Predefined time ranges",
"nullable": true
}
},
"additionalProperties": false,
"description": "Date filter."
},
"determinationFilter": {
"enum": [
"NoFilter",
"NotUnsureDetermination",
"OnlyUnsureDetermination"
],
"type": "string"
},
"diffusionStatuses": {
"type": "array",
"items": {
"enum": [
"NotDiffused",
"DiffusedBySystem",
"DiffusedByProvider"
],
"type": "string",
"description": "Diffuse status dto"
},
"description": "Filter by diffusion status.",
"nullable": true
},
"event": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Event id's",
"nullable": true
}
},
"additionalProperties": false
},
"excludeFilter": {
"type": "object",
"properties": {
"occurrenceIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Exclude observations with listed occurrence id's",
"nullable": true
}
},
"additionalProperties": false
},
"geographics": {
"type": "object",
"properties": {
"areas": {
"type": "array",
"items": {
"type": "object",
"properties": {
"areaType": {
"enum": [
"Municipality",
"Community",
"Sea",
"CountryRegion",
"NatureType",
"Province",
"Ramsar",
"BirdValidationArea",
"Parish",
"Spa",
"County",
"ProtectedNature",
"SwedishForestAgencyDistricts",
"Sci",
"WaterArea",
"Atlas5x5",
"Atlas10x10",
"SfvDistricts",
"Campus"
],
"type": "string",
"description": "Area type dto"
},
"featureId": {
"type": "string",
"description": "Feature",
"nullable": true
}
},
"additionalProperties": false,
"description": "Area filter."
},
"description": "Area filter",
"nullable": true
},
"boundingBox": {
"type": "object",
"properties": {
"bottomRight": {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"format": "double"
},
"longitude": {
"type": "number",
"format": "double"
}
},
"additionalProperties": false
},
"topLeft": {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"format": "double"
},
"longitude": {
"type": "number",
"format": "double"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"considerDisturbanceRadius": {
"type": "boolean",
"description": "If true, observations that are outside Geometries polygons\r\nbut close enough when disturbance sensitivity of species\r\nare considered, will be included in the result."
},
"considerObservationAccuracy": {
"type": "boolean",
"description": "If true, observations that are outside Geometries polygons\r\nbut possibly inside when accuracy (coordinateUncertaintyInMeters)\r\nof observation is considered, will be included in the result."
},
"maxDistanceFromPoint": {
"type": "number",
"description": "If Geometries is of point type, this property must be set to a value greater than 0.\r\nObservations inside circle (center=point, radius=MaxDistanceFromPoint) will be returned.",
"format": "double",
"nullable": true
},
"geometries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"nullable": true,
"readOnly": true
}
},
"additionalProperties": false
},
"description": "Point or polygon geometry used for search.\r\nIf the geometry is a point, then MaxDistanceFromPoint is also used in search.",
"nullable": true
},
"locationIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Filter on location id/s. Only observations with passed location id/s this will be returned",
"nullable": true
},
"locationNameFilter": {
"type": "string",
"description": "Location name wild card filter",
"nullable": true
},
"maxAccuracy": {
"type": "integer",
"description": "Limit observation accuracy. Only observations with accuracy less than this will be returned",
"format": "int32",
"nullable": true
}
},
"additionalProperties": false,
"description": "Geometry filter."
},
"modifiedDate": {
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "Changed from",
"format": "date-time",
"nullable": true
},
"to": {
"type": "string",
"description": "Changed tp",
"format": "date-time",
"nullable": true
}
},
"additionalProperties": false,
"description": "Filter for observation Modified date"
},
"notRecoveredFilter": {
"enum": [
"NoFilter",
"OnlyNotRecovered",
"DontIncludeNotRecovered"
],
"type": "string"
},
"observedByMe": {
"type": "boolean",
"description": "Only get observations observed by me"
},
"occurrenceStatus": {
"enum": [
"Present",
"Absent",
"BothPresentAndAbsent"
],
"type": "string",
"description": "Possible values for the OccurrenceStatus filter."
},
"projectIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Project id's to match.",
"nullable": true
},
"reportedByMe": {
"type": "boolean",
"description": "Only get observations reported by me"
},
"taxon": {
"type": "object",
"properties": {
"includeUnderlyingTaxa": {
"type": "boolean",
"description": "If true, also include the underlying hierarchical taxa in search.\r\nE.g. If ids=[4000104](Aves) and includeUnderlyingTaxa=true, then you search for all birds."
},
"ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Dyntaxa taxon id's to match.",
"nullable": true
},
"taxonListIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Add (merge) or filter taxa by using taxon lists.",
"nullable": true
},
"redListCategories": {
"type": "array",
"items": {
"type": "string"
},
"description": "Redlist categories to match.\r\nPossible values are: \"DD\", \"EX\", \"RE\", \"CR\", \"EN\", \"VU\", \"NT\", \"LC\", \"NA\", \"NE\"",
"nullable": true
},
"taxonCategories": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Taxon categories to match.",
"nullable": true
},
"taxonListOperator": {
"enum": [
"Merge",
"Filter"
],
"type": "string",
"description": "Operator to use when TaxonListIds is specified."
}
},
"additionalProperties": false,
"description": "Taxon filter."
},
"verificationStatus": {
"enum": [
"BothVerifiedAndNotVerified",
"Verified",
"NotVerified"
],
"type": "string"
},
"output": {
"type": "object",
"properties": {
"fieldSet": {
"enum": [
"Minimum",
"Extended",
"AllWithValues",
"All",
"None"
],
"type": "string",
"description": "Export property sets."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "This parameter allows you to decide what fields should be returned, using a projection.\r\nOmit this parameter and you will receive the complete collection of fields.\r\nFor example, to retrieve only basic observation data, specify:\r\n[\"event.startDate\", \"event.endDate\", \"location.decimalLatitude\", \"location.decimalLongitude\", \"location.municipality\", \"taxon.id\", \"taxon.scientificName\", \"occurrence.recordedBy\", \"occurrence.occurrenceStatus\"].",
"nullable": true
}
},
"additionalProperties": false,
"description": "Response output settings"
}
},
"additionalProperties": false,
"description": "Search filter."
}
{
"birdNestActivityLimit": 0,
"dataProvider": {
"ids": [
0
]
},
"dataStewardship": {
"datasetIdentifiers": [
"string"
]
},
"date": {
"startDate": "string",
"endDate": "string",
"dateFilterType": "OverlappingStartDateAndEndDate",
"timeRanges": [
"Morning"
]
},
"determinationFilter": "NoFilter",
"diffusionStatuses": [
"NotDiffused"
],
"event": {
"ids": [
"string"
]
},
"excludeFilter": {
"occurrenceIds": [
"string"
]
},
"geographics": {
"areas": [
{
"areaType": "Municipality",
"featureId": "string"
}
],
"boundingBox": {
"bottomRight": {
"latitude": 0.0,
"longitude": 0.0
},
"topLeft": {
"latitude": 0.0,
"longitude": 0.0
}
},
"considerDisturbanceRadius": true,
"considerObservationAccuracy": true,
"maxDistanceFromPoint": 0.0,
"geometries": [
{
"type": "string"
}
],
"locationIds": [
"string"
],
"locationNameFilter": "string",
"maxAccuracy": 0
},
"modifiedDate": {
"from": "string",
"to": "string"
},
"notRecoveredFilter": "NoFilter",
"observedByMe": true,
"occurrenceStatus": "Present",
"projectIds": [
0
],
"reportedByMe": true,
"taxon": {
"includeUnderlyingTaxa": true,
"ids": [
0
],
"taxonListIds": [
0
],
"redListCategories": [
"string"
],
"taxonCategories": [
0
],
"taxonListOperator": "Merge"
},
"verificationStatus": "BothVerifiedAndNotVerified",
"output": {
"fieldSet": "Minimum",
"fields": [
"string"
]
}
}
{
"type": "object",
"properties": {
"birdNestActivityLimit": {
"type": "integer",
"description": "Limit returned observations based on bird nest activity level.\r\nOnly bird observations in Artportalen are affected\r\nby this search criteria.\r\nObservation of other organism groups (not birds) are\r\nnot affected by this search criteria.",
"format": "int32",
"nullable": true
},
"dataProvider": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Data provider id's",
"nullable": true
}
},
"additionalProperties": false,
"description": "Data provider filter."
},
"dataStewardship": {
"type": "object",
"properties": {
"datasetIdentifiers": {
"type": "array",
"items": {
"type": "string"
},
"description": "Dataset filter",
"nullable": true
}
},
"additionalProperties": false
},
"date": {
"type": "object",
"properties": {
"startDate": {
"type": "string",
"description": "Observation start date specified in the ISO 8601 standard. If no timezone is specified, GMT+1 (CEST) is assumed",
"format": "date-time",
"nullable": true
},
"endDate": {
"type": "string",
"description": "Observation end date specified in the ISO 8601 standard. If no timezone is specified, GMT+1 (CEST) is assumed",
"format": "date-time",
"nullable": true
},
"dateFilterType": {
"enum": [
"OverlappingStartDateAndEndDate",
"BetweenStartDateAndEndDate",
"OnlyStartDate",
"OnlyEndDate"
],
"type": "string",
"description": "OverlappingStartDateAndEndDate, Start or EndDate of the observation must be within the specified interval \r\nBetweenStartDateAndEndDate, Start and EndDate of the observation must be within the specified interval \r\nOnlyStartDate, Only StartDate of the observation must be within the specified interval \r\nOnlyEndDate, Only EndDate of the observation must be within the specified interval"
},
"timeRanges": {
"type": "array",
"items": {
"enum": [
"Morning",
"Forenoon",
"Afternoon",
"Evening",
"Night"
],
"type": "string"
},
"description": "Predefined time ranges",
"nullable": true
}
},
"additionalProperties": false,
"description": "Date filter."
},
"determinationFilter": {
"enum": [
"NoFilter",
"NotUnsureDetermination",
"OnlyUnsureDetermination"
],
"type": "string"
},
"diffusionStatuses": {
"type": "array",
"items": {
"enum": [
"NotDiffused",
"DiffusedBySystem",
"DiffusedByProvider"
],
"type": "string",
"description": "Diffuse status dto"
},
"description": "Filter by diffusion status.",
"nullable": true
},
"event": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Event id's",
"nullable": true
}
},
"additionalProperties": false
},
"excludeFilter": {
"type": "object",
"properties": {
"occurrenceIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Exclude observations with listed occurrence id's",
"nullable": true
}
},
"additionalProperties": false
},
"geographics": {
"type": "object",
"properties": {
"areas": {
"type": "array",
"items": {
"type": "object",
"properties": {
"areaType": {
"enum": [
"Municipality",
"Community",
"Sea",
"CountryRegion",
"NatureType",
"Province",
"Ramsar",
"BirdValidationArea",
"Parish",
"Spa",
"County",
"ProtectedNature",
"SwedishForestAgencyDistricts",
"Sci",
"WaterArea",
"Atlas5x5",
"Atlas10x10",
"SfvDistricts",
"Campus"
],
"type": "string",
"description": "Area type dto"
},
"featureId": {
"type": "string",
"description": "Feature",
"nullable": true
}
},
"additionalProperties": false,
"description": "Area filter."
},
"description": "Area filter",
"nullable": true
},
"boundingBox": {
"type": "object",
"properties": {
"bottomRight": {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"format": "double"
},
"longitude": {
"type": "number",
"format": "double"
}
},
"additionalProperties": false
},
"topLeft": {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"format": "double"
},
"longitude": {
"type": "number",
"format": "double"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"considerDisturbanceRadius": {
"type": "boolean",
"description": "If true, observations that are outside Geometries polygons\r\nbut close enough when disturbance sensitivity of species\r\nare considered, will be included in the result."
},
"considerObservationAccuracy": {
"type": "boolean",
"description": "If true, observations that are outside Geometries polygons\r\nbut possibly inside when accuracy (coordinateUncertaintyInMeters)\r\nof observation is considered, will be included in the result."
},
"maxDistanceFromPoint": {
"type": "number",
"description": "If Geometries is of point type, this property must be set to a value greater than 0.\r\nObservations inside circle (center=point, radius=MaxDistanceFromPoint) will be returned.",
"format": "double",
"nullable": true
},
"geometries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"nullable": true,
"readOnly": true
}
},
"additionalProperties": false
},
"description": "Point or polygon geometry used for search.\r\nIf the geometry is a point, then MaxDistanceFromPoint is also used in search.",
"nullable": true
},
"locationIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Filter on location id/s. Only observations with passed location id/s this will be returned",
"nullable": true
},
"locationNameFilter": {
"type": "string",
"description": "Location name wild card filter",
"nullable": true
},
"maxAccuracy": {
"type": "integer",
"description": "Limit observation accuracy. Only observations with accuracy less than this will be returned",
"format": "int32",
"nullable": true
}
},
"additionalProperties": false,
"description": "Geometry filter."
},
"modifiedDate": {
"type": "object",
"properties": {
"from": {
"type": "string",
"description": "Changed from",
"format": "date-time",
"nullable": true
},
"to": {
"type": "string",
"description": "Changed tp",
"format": "date-time",
"nullable": true
}
},
"additionalProperties": false,
"description": "Filter for observation Modified date"
},
"notRecoveredFilter": {
"enum": [
"NoFilter",
"OnlyNotRecovered",
"DontIncludeNotRecovered"
],
"type": "string"
},
"observedByMe": {
"type": "boolean",
"description": "Only get observations observed by me"
},
"occurrenceStatus": {
"enum": [
"Present",
"Absent",
"BothPresentAndAbsent"
],
"type": "string",
"description": "Possible values for the OccurrenceStatus filter."
},
"projectIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Project id's to match.",
"nullable": true
},
"reportedByMe": {
"type": "boolean",
"description": "Only get observations reported by me"
},
"taxon": {
"type": "object",
"properties": {
"includeUnderlyingTaxa": {
"type": "boolean",
"description": "If true, also include the underlying hierarchical taxa in search.\r\nE.g. If ids=[4000104](Aves) and includeUnderlyingTaxa=true, then you search for all birds."
},
"ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Dyntaxa taxon id's to match.",
"nullable": true
},
"taxonListIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Add (merge) or filter taxa by using taxon lists.",
"nullable": true
},
"redListCategories": {
"type": "array",
"items": {
"type": "string"
},
"description": "Redlist categories to match.\r\nPossible values are: \"DD\", \"EX\", \"RE\", \"CR\", \"EN\", \"VU\", \"NT\", \"LC\", \"NA\", \"NE\"",
"nullable": true
},
"taxonCategories": {
"type": "array",
"items": {
"type": "integer",
"format": "int32"
},
"description": "Taxon categories to match.",
"nullable": true
},
"taxonListOperator": {
"enum": [
"Merge",
"Filter"
],
"type": "string",
"description": "Operator to use when TaxonListIds is specified."
}
},
"additionalProperties": false,
"description": "Taxon filter."
},
"verificationStatus": {
"enum": [
"BothVerifiedAndNotVerified",
"Verified",
"NotVerified"
],
"type": "string"
},
"output": {
"type": "object",
"properties": {
"fieldSet": {
"enum": [
"Minimum",
"Extended",
"AllWithValues",
"All",
"None"
],
"type": "string",
"description": "Export property sets."
},
"fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "This parameter allows you to decide what fields should be returned, using a projection.\r\nOmit this parameter and you will receive the complete collection of fields.\r\nFor example, to retrieve only basic observation data, specify:\r\n[\"event.startDate\", \"event.endDate\", \"location.decimalLatitude\", \"location.decimalLongitude\", \"location.municipality\", \"taxon.id\", \"taxon.scientificName\", \"occurrence.recordedBy\", \"occurrence.occurrenceStatus\"].",
"nullable": true
}
},
"additionalProperties": false,
"description": "Response output settings"
}
},
"additionalProperties": false,
"description": "Search filter."
}
Svar
200 OK
Success
Återgivningar
{
"type": "string",
"format": "byte",
"x-apim-inline": true
}
string
{
"type": "string",
"format": "byte",
"x-apim-inline": true
}
string
{
"type": "string",
"format": "byte",
"x-apim-inline": true
}
500 Internal Server Error
Server Error
Kodexempel
@ECHO OFF
curl -v -X POST "https://api.artdatabanken.se/species-observation-system/v1/Exports/Download/DwC?eventBased=false&validateSearchFilter=false&sensitiveObservations=false"
-H "X-Authorization-Role-Id: "
-H "X-Authorization-Application-Identifier: "
-H "X-Api-Version: 1.5"
-H "X-Requesting-System: "
-H "Content-Type: application/json"
-H "Ocp-Apim-Subscription-Key: {subscription key}"
-H "Authorization: {access token}"
--data-ascii "{body}"
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;
namespace CSHttpClientSample
{
static class Program
{
static void Main()
{
MakeRequest();
Console.WriteLine("Hit ENTER to exit...");
Console.ReadLine();
}
static async void MakeRequest()
{
var client = new HttpClient();
var queryString = HttpUtility.ParseQueryString(string.Empty);
// Request headers
client.DefaultRequestHeaders.Add("X-Authorization-Role-Id", "");
client.DefaultRequestHeaders.Add("X-Authorization-Application-Identifier", "");
client.DefaultRequestHeaders.Add("X-Api-Version", "1.5");
client.DefaultRequestHeaders.Add("X-Requesting-System", "");
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");
client.DefaultRequestHeaders.Add("Authorization", "{access token}");
// Request parameters
queryString["eventBased"] = "false";
queryString["validateSearchFilter"] = "false";
queryString["sensitiveObservations"] = "false";
var uri = "https://api.artdatabanken.se/species-observation-system/v1/Exports/Download/DwC?" + queryString;
HttpResponseMessage response;
// Request body
byte[] byteData = Encoding.UTF8.GetBytes("{body}");
using (var content = new ByteArrayContent(byteData))
{
content.Headers.ContentType = new MediaTypeHeaderValue("< your content type, i.e. application/json >");
response = await client.PostAsync(uri, content);
}
}
}
}
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
public class JavaSample
{
public static void main(String[] args)
{
HttpClient httpclient = HttpClients.createDefault();
try
{
URIBuilder builder = new URIBuilder("https://api.artdatabanken.se/species-observation-system/v1/Exports/Download/DwC");
builder.setParameter("eventBased", "false");
builder.setParameter("validateSearchFilter", "false");
builder.setParameter("sensitiveObservations", "false");
URI uri = builder.build();
HttpPost request = new HttpPost(uri);
request.setHeader("X-Authorization-Role-Id", "");
request.setHeader("X-Authorization-Application-Identifier", "");
request.setHeader("X-Api-Version", "1.5");
request.setHeader("X-Requesting-System", "");
request.setHeader("Content-Type", "application/json");
request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");
request.setHeader("Authorization", "{access token}");
// Request body
StringEntity reqEntity = new StringEntity("{body}");
request.setEntity(reqEntity);
HttpResponse response = httpclient.execute(request);
HttpEntity entity = response.getEntity();
if (entity != null)
{
System.out.println(EntityUtils.toString(entity));
}
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
}
}
<!DOCTYPE html>
<html>
<head>
<title>JSSample</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(function() {
var params = {
// Request parameters
"eventBased": "false",
"validateSearchFilter": "false",
"sensitiveObservations": "false",
};
$.ajax({
url: "https://api.artdatabanken.se/species-observation-system/v1/Exports/Download/DwC?" + $.param(params),
beforeSend: function(xhrObj){
// Request headers
xhrObj.setRequestHeader("X-Authorization-Role-Id","");
xhrObj.setRequestHeader("X-Authorization-Application-Identifier","");
xhrObj.setRequestHeader("X-Api-Version","1.5");
xhrObj.setRequestHeader("X-Requesting-System","");
xhrObj.setRequestHeader("Content-Type","application/json");
xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
xhrObj.setRequestHeader("Authorization","{access token}");
},
type: "POST",
// Request body
data: "{body}",
})
.done(function(data) {
alert("success");
})
.fail(function() {
alert("error");
});
});
</script>
</body>
</html>
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString* path = @"https://api.artdatabanken.se/species-observation-system/v1/Exports/Download/DwC";
NSArray* array = @[
// Request parameters
@"entities=true",
@"eventBased=false",
@"validateSearchFilter=false",
@"sensitiveObservations=false",
];
NSString* string = [array componentsJoinedByString:@"&"];
path = [path stringByAppendingFormat:@"?%@", string];
NSLog(@"%@", path);
NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
[_request setHTTPMethod:@"POST"];
// Request headers
[_request setValue:@"" forHTTPHeaderField:@"X-Authorization-Role-Id"];
[_request setValue:@"" forHTTPHeaderField:@"X-Authorization-Application-Identifier"];
[_request setValue:@"1.5" forHTTPHeaderField:@"X-Api-Version"];
[_request setValue:@"" forHTTPHeaderField:@"X-Requesting-System"];
[_request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
[_request setValue:@"{access token}" forHTTPHeaderField:@"Authorization"];
// Request body
[_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
NSURLResponse *response = nil;
NSError *error = nil;
NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];
if (nil != error)
{
NSLog(@"Error: %@", error);
}
else
{
NSError* error = nil;
NSMutableDictionary* json = nil;
NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
NSLog(@"%@", dataString);
if (nil != _connectionData)
{
json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
}
if (error || !json)
{
NSLog(@"Could not parse loaded json with error:%@", error);
}
NSLog(@"%@", json);
_connectionData = nil;
}
[pool drain];
return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';
$request = new Http_Request2('https://api.artdatabanken.se/species-observation-system/v1/Exports/Download/DwC');
$url = $request->getUrl();
$headers = array(
// Request headers
'X-Authorization-Role-Id' => '',
'X-Authorization-Application-Identifier' => '',
'X-Api-Version' => '1.5',
'X-Requesting-System' => '',
'Content-Type' => 'application/json',
'Ocp-Apim-Subscription-Key' => '{subscription key}',
'Authorization' => '{access token}',
);
$request->setHeader($headers);
$parameters = array(
// Request parameters
'eventBased' => 'false',
'validateSearchFilter' => 'false',
'sensitiveObservations' => 'false',
);
$url->setQueryVariables($parameters);
$request->setMethod(HTTP_Request2::METHOD_POST);
// Request body
$request->setBody("{body}");
try
{
$response = $request->send();
echo $response->getBody();
}
catch (HttpException $ex)
{
echo $ex;
}
?>
########### Python 2.7 #############
import httplib, urllib, base64
headers = {
# Request headers
'X-Authorization-Role-Id': '',
'X-Authorization-Application-Identifier': '',
'X-Api-Version': '1.5',
'X-Requesting-System': '',
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': '{subscription key}',
'Authorization': '{access token}',
}
params = urllib.urlencode({
# Request parameters
'eventBased': 'false',
'validateSearchFilter': 'false',
'sensitiveObservations': 'false',
})
try:
conn = httplib.HTTPSConnection('api.artdatabanken.se')
conn.request("POST", "/species-observation-system/v1/Exports/Download/DwC?%s" % params, "{body}", headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
####################################
########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64
headers = {
# Request headers
'X-Authorization-Role-Id': '',
'X-Authorization-Application-Identifier': '',
'X-Api-Version': '1.5',
'X-Requesting-System': '',
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': '{subscription key}',
'Authorization': '{access token}',
}
params = urllib.parse.urlencode({
# Request parameters
'eventBased': 'false',
'validateSearchFilter': 'false',
'sensitiveObservations': 'false',
})
try:
conn = http.client.HTTPSConnection('api.artdatabanken.se')
conn.request("POST", "/species-observation-system/v1/Exports/Download/DwC?%s" % params, "{body}", headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
####################################
require 'net/http'
uri = URI('https://api.artdatabanken.se/species-observation-system/v1/Exports/Download/DwC')
query = URI.encode_www_form({
# Request parameters
'eventBased' => 'false',
'validateSearchFilter' => 'false',
'sensitiveObservations' => 'false'
})
if query.length > 0
if uri.query && uri.query.length > 0
uri.query += '&' + query
else
uri.query = query
end
end
request = Net::HTTP::Post.new(uri.request_uri)
# Request headers
request['X-Authorization-Role-Id'] = ''
# Request headers
request['X-Authorization-Application-Identifier'] = ''
# Request headers
request['X-Api-Version'] = '1.5'
# Request headers
request['X-Requesting-System'] = ''
# Request headers
request['Content-Type'] = 'application/json'
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request headers
request['Authorization'] = '{access token}'
# Request body
request.body = "{body}"
response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
http.request(request)
end
puts response.body