Description

API archivefiles allows user to search for available files in a station and download the file.

URL

https://data.oceannetworks.ca/api/archivefiles
MethodDescriptionExample
getListByLocationGet a list of files for a given location code and device category code, and filtered by others optional parameters.method=getListByLocation
getListByDeviceGet a list of files for a given device code, and filtered by others optional parameters.method=getListByDevice
getFileDownload a file from DMAS Archiving System by specifying the file name.method=getFile


getListByLocation

Get a list of files available in Oceans 3.0 Archiving System for a given location code and device category code. The list of filenames can be filtered by time range.

Parameters

ParameterTypeDescriptionExample
Required
tokenstringAll Web Services require a token. This can be generated at https://data.oceannetworks.ca/Profile. Click on the "Web Services" tab and click "Generate Token".token=YOUR_TOKEN_HERE
locationCodestring

Return a list of files from a specific Location.

  • Location Code must be valid.
  • Specific Location Codes can be obtained using the locations service.
locationCode=BACUS
deviceCategoryCodestring

Return a list of files of a specific Device Category Code.

deviceCategoryCode=JB
Optional
dateFromdate

Return files that have a timestamp on or after a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the beginning of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateFrom=2010-07-27T00:00:00.000Z

dateFrom=2010-07-27

dateFrom=-P1DT1H

  • Previous 1 day and 1 hour, relative to the dateTo. Note the '-' before the P.
dateTodate

Return files that have a timestamp before a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the end of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateTo=2016-08-01T00:00:00.000Z

dateTo=2016-08-01

dateTo=PT12H30M

  • Next 12 hours and 30 minutes, relative to the dateFrom.
dateArchivedFromdate

Return files archived on or after a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the beginning of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateArchivedFrom=2010-07-27T00:00:00.000Z

dateArchivedFrom=2010-07-27

dateArchivedFrom=-P1DT1H

  • Previous 1 day and 1 hour, relative to the dateTo. Note the '-' before the P.
dateArchivedTodate

Return files archived before a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the end of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateArchivedTo=2016-08-01T00:00:00.000Z

dateArchivedTo=2016-08-01

dateArchivedTo=PT12H30M

  • Next 12 hours and 30 minutes, relative to the dateFrom.
fileExtensionString

Return files of a specific File Extension.

  • file extension is not case sensitive
png
dataProductCodeString

Return files of a specific Data Product Code.

HSD
returnOptionsstring

If there is no value given, list of filenames will be returned.

If the value is "archiveLocation"  a list of filenames with their archiveLocation will be returned. Mostly used by www.oceannetworks.ca website.

If the value is "all" , more metadata information will be returned.


returnOptions=archiveLocation
rowLimitinteger

The maximum number of data to return, within the constraints of the service. Note this will limit the data starting at the dateFrom time and ending at the row limit, not necessarily at the dateTo time.

default row limit: 100000

rowLimit=100
pageinteger

The service will return data starting from a certain page. By default this value is 1.

If the data size is greater than rowLimit, results will be split into pages where each page contains at most rowLimit number of data.

This parameter is used to generate serviceMetadata.next parameter, which can be used to get the next set of data.

page=1
getLatestboolean Specifies whether or not the latest raw data readings should be returned first. This is false by default. When set to true, readings are returned and pagination is done from latest to earliest.getLatest=true


Response

Success

HTTP status code 200 will be returned in HTTP header.

If "returnOption" parameter is "all", a list of files with their metadata information will be returned.

  • Order of list will be by filename ascending
{
"citations":
[
	{
		"citation": <string>,
		"doi": <string>,
		"landingPageUrl": <String (URL)>,
		"queryPid": <string>
	}
],
"files":
[
	{
        "archiveLocation": <string>,
    	"archivedDate": <string>,
        "compression": <string>,
		"dataProductCode": <string>,
        "dateFrom": <string>,
        "dateTo": <string>,
        "deviceCode":<string>,
        "fileSize": <long>,
        "filename": <string>,
        "modifyDate": <string>,
        "path" <string>,
        "uncompressedFileSize": <long>
            
    },
],
"messages": <string>[],
"next":
{
    "parameters":
    {
        "returnOptions": <string>,
        "method": <string>,
        "fileExtension": <string>,
        "dateTo": <string>,
        "rowLimit": <string>, 
        "page": <string>, 
        "locationCode": <string>,
        "deviceCategoryCode": <string>,
        "dateFrom": <string>,
        "token": <string>,
    },
    "url": <string>
},
"queryUrl": <string>,
"returnOption": <string>
} 


PropertyTypeDescriptionExample
citations.citationstringThe citation for the dataset from which the included files pertain to
citations.doistringThe DOI for the citation
citations.landingPageUrlstringThe URL to the Dataset Landing Page for the citation's dataset
citations.queryPidnullUsed in other services, but will always be null for the archivefiles service
files.archiveLocationstringThe location of the file
files.archivedDatestringThe time stamp of current file in AD while it is archived2010-04-21T00:00:00.000Z
files.compressionstringThe file extension if the file is compressedgz
files.dataProductCodestringData product code8
files.dateFromstringThe beginning time stamp the data is recorded in the file2010-04-21T00:00:00.000Z
files.dateTostringThe end time stamp the data is recorded in the file2010-04-22T00:00:00.000Z
files.deviceCodestringDevice Code
files.fileSizelongFile size, in bytes, after compressed with GZip
files.filenamestringThe name of the file "BC_POD2_JB_20090908T000000.000Z.txt"
files.modifyDatedateThe last time stamp of any modification related to the file2010-04-22T01:55:00.000Z
files.pathstringThe directory path to the location of the file
files.uncompressedFileSizelongOriginal file size, in bytes, without compressed 156545

messages

string[]A list of the restrictions that apply to the retrieved files

next.parameters.returnOptions

stringAs passed into the original call

next.parameters.method

stringAs passed into the original call

next.parameters.fileExtension

stringAs passed into the original call

next.parameters.dateTo

date

As passed into the original call

Note: a dateTo will only be included in next.parameters and next.url if the original call was passed a dateTo as well


next.parameters.rowLimit

stringAs passed into the original call

next.parameters.page

stringThe page number for the next files based on the parameters

next.parameters.locationCode

stringAs passed into the original call

next.parameters.deviceCategoryCode

stringAs passed into the original call

next.parameters.token

stringAs passed into the original call

"YOUR_TOKEN_HERE"

next.url

stringThe complete URL that can be used to get the next set of data in the requested range.

queryUrl

stringThe complete URL that can be used to get this set of data in the requested range.

returnOption

stringAs passed into the original call


Example

{
    "citations": [
		{
        	"citation": "Ocean Networks Canada Society. 2009. Upper Slope South Junction Box Deployed 2009-09-08. Ocean Networks Canada Society. https://doi.org/10.34943/270927b5-6786-4369-809f-18b1712678a0."
            "doi": "10.34943/270927b5-6786-4369-809f-18b1712678a0",
			"landingPageUrl": "https://doi.org/10.34943/270927b5-6786-4369-809f-18b1712678a0"
			"queryPid: null
		}
		...
	],
    "files":[
		"BC_POD2_JB_20090908T000000.000Z.txt",
		"BC_POD2_JB_20090909T000000.000Z.txt",
		"BC_POD2_JB_20090916T000000.000Z.txt",
		"BC_POD2_JB_20090925T000000.000Z.txt",
		"BC_POD2_JB_20090926T000000.000Z.txt"
	],
	"next":{
		"parameters":{
			"method":"getListByLocation",      
            "rowLimit":"5",
			"page":"2",
			"locationCode":"BACUS",
			"deviceCategoryCode":"JB",
			"token":"YOUR_TOKEN_HERE"
		},
		"url":"https://data.oceannetworks.ca/api/archivefiles?method=getListByLocation&rowLimit=5&page=2&locationCode=BACUS&deviceCategoryCode=JB&token=YOUR_TOKEN_HERE"
	}
	"queryUrl": "https://data.oceannetworks.ca/api/archivefiles?method=getListByLocation&token=0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d&locationCode=BACUS&deviceCategoryCode=JB&rowLimit=5",
	"returnOption": "default"
}


{
    "citations": [
		{
        	"citation": "Ocean Networks Canada Society. 2009. Upper Slope South Junction Box Deployed 2009-09-08. Ocean Networks Canada Society. https://doi.org/10.34943/270927b5-6786-4369-809f-18b1712678a0."
            "doi": "10.34943/270927b5-6786-4369-809f-18b1712678a0",
			"landingPageUrl": "https://doi.org/10.34943/270927b5-6786-4369-809f-18b1712678a0"
			"queryPid: null
		}
		...
	],
    "files": [
    	{
      		"archiveLocation": "/archive/AD/venus/VENUS_UNIQUE/VUNIQUE0007",
      		"archivedDate": "2010-06-03T08:27:23.000Z",
		    "compression": "gz",
      		"dataProductCode": "LF",
      		"dateFrom": "2009-09-08T00:00:00.000Z",
      		"dateTo": "2009-09-09T00:00:00.000Z",
      		"deviceCode": "BC_POD2_JB",
      		"fileSize": 24668,
		    "filename": "BC_POD2_JB_20090908T000000.000Z.txt",
      		"modifyDate": "2015-01-09T19:40:22.000Z",
      		"path": "00/15/88",
      		"uncompressedFileSize": 684891
    	}
  	],
	"next":{
		"parameters":{
			"method":"getListByLocation",
			"returnOptions": "all",     
            "rowLimit":"1",
			"page":"2",
			"locationCode":"BACUS",
			"deviceCategoryCode":"JB",
			"token":"YOUR_TOKEN_HERE"
		},
		"url":"https://data.oceannetworks.ca/api/archivefiles?method=getListByLocation&returnOptions=all&rowLimit=1&page=2&locationCode=BACUS&deviceCategoryCode=JB&token=YOUR_TOKEN_HERE"
	}
	"queryUrl": "https://data.oceannetworks.ca/api/archivefiles?method=getListByLocation&returnOptions=all&token=0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d&locationCode=BACUS&deviceCategoryCode=JB&rowLimit=1",
	"returnOption": "all"
}


{
    "citations": [
		{
        	"citation": "Ocean Networks Canada Society. 2009. Upper Slope South Junction Box Deployed 2009-09-08. Ocean Networks Canada Society. https://doi.org/10.34943/270927b5-6786-4369-809f-18b1712678a0."
            "doi": "10.34943/270927b5-6786-4369-809f-18b1712678a0",
			"landingPageUrl": "https://doi.org/10.34943/270927b5-6786-4369-809f-18b1712678a0"
			"queryPid: null
		}
		...
	],
    "files": [
    	{
   		   "archiveLocation": "/archive/AD/venus/VENUS_UNIQUE/VUNIQUE0007",
   		   "dateFrom": "2009-09-08T00:00:00.000Z",
  		   "filename": "BC_POD2_JB_20090908T000000.000Z.txt",
 		   "path": "00/15/88"
 	    }
 	],
	"next":{
		"parameters":{
			"method":"getListByLocation",
			"returnOptions": "archiveLocation"      
            "rowLimit":"1",
			"page":"2",
			"locationCode":"BACUS",
			"deviceCategoryCode":"JB",
			"token":"YOUR_TOKEN_HERE"
		},
		"url":"https://data.oceannetworks.ca/api/archivefiles?method=getListByLocation&returnOptions=archiveLocation&rowLimit=1&page=2&locationCode=BACUS&deviceCategoryCode=JB&token=YOUR_TOKEN_HERE"
	}
	"queryUrl": "https://data.oceannetworks.ca/api/archivefiles?method=getListByLocation&returnOptions=archiveLocation&token=0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d&locationCode=BACUS&deviceCategoryCode=JB&rowLimit=1",
	"returnOption": "archiveLocation"
}



getListByDevice

Get a list of files available in Oceans 3.0 Archiving System for a given device code. The list of filenames can be filtered by time range.

Parameters

ParameterTypeDescriptionExample
Required
tokenstringAll Web Services require a token. This can be generated at http://data.oceannetworks.ca/Profile. Click on the "Web Services" tab and click "Generate Token".token=YOUR_TOKEN_HERE
deviceCodestring

Return a list of files of a specific Device Code.

  • Device Code must be valid.
  • Specific Device Codes can be found by simply running the service without this parameter to get a list of all devices.
deviceCode=BC_POD2_JB
Optional
dateFromdate

Return files that have a timestamp on or after a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the beginning of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateFrom=2010-07-27T00:00:00.000Z

dateFrom=2010-07-27

dateFrom=-P1DT1H

  • Previous 1 day and 1 hour, relative to the dateTo. Note the '-' before the P.
dateTodate

Return files that have a timestamp before a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the end of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateTo=2016-08-01T00:00:00.000Z

dateTo=2016-08-01

dateTo=PT12H30M

  • Next 12 hours and 30 minutes, relative to the dateFrom.
dateArchivedFromdate

Return files archived on or after a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the beginning of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateArchivedFrom=2010-07-27T00:00:00.000Z

dateArchivedFrom=2010-07-27

dateArchivedFrom=-P1DT1H

  • Previous 1 day and 1 hour, relative to the dateTo. Note the '-' before the P.
dateArchivedTodate

Return files archived before a specific date/time.

Accepted DateTime formats:

  • yyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601 Extended)
  • yyyy-MM-dd (ISO 8601 Extended)
  • PnYnMnDTnHnMnS (ISO 8601 Duration)

If not specified, the default value is the end of time.

  • DateTime is represented in Coordinated Universal Time (UTC).

  • ISO 8601 Extended format without a time will be assumed to mean midnight (T00:00:000.000Z).
  • Queries with both dateFrom and dateTo in the ISO 8601 Duration format will not be accepted.

dateArchivedTo=2016-08-01T00:00:00.000Z

dateArchivedTo=2016-08-01

dateArchivedTo=PT12H30M

  • Next 12 hours and 30 minutes, relative to the dateFrom.
fileExtensionString

Return files of a specific File Extension.

  • file extension is not case sensitive
png
dataProductCodeString

Return files of a specific Data Product Code.

HSD
returnOptionsstring

If there is no value given, list of filenames will be returned.

If the value is "archiveLocation"  a list of filenames with their archiveLocation will be returned.

If the value is "all" , more metadata information will be returned.

 *All results returned with serviceMetadata object. 


returnOptions=archiveLocation
rowLimitinteger

The maximum number of data to return, within the constraints of the service. Note this will limit the data starting at the dateFrom time and ending at the row limit, not necessarily at the dateTo time.

default row limit: 100000

rowLimit=100
pageinteger

The service will return data starting from a certain page. By default this value is 1.

If the data size is greater than rowLimit, results will be split into pages where each page contains at most rowLimit number of data.

This parameter is used to generate serviceMetadata.next parameter, which can be used to get the next set of data.

page=1
getLatestboolean Specifies whether or not the latest raw data readings should be returned first. This is false by default. When set to true, readings are returned and pagination is done from latest to earliest.getLatest=true


Response

Success

HTTP status code 200 will be returned in HTTP header.

If "returnOption" parameter is "all", a list of file names with their metadata information will be returned.

  • Order of list will be by filename ascending
{
"citations":
[
	{
		"citation": <string>,
		"doi": <string>,
		"landingPageUrl": <String (URL)>,
		"queryPid": <string>
	}
],
"files":
[
	{
        "archiveLocation": <string>,
    	"archivedDate": <string>,
        "compression": <string>,
		"dataProductCode": <string>,
        "dateFrom": <string>,
        "dateTo": <string>,
        "deviceCode":<string>,
        "fileSize": <long>,
        "filename": <string>,
        "modifyDate": <string>,
        "path" <string>,
        "uncompressedFileSize": <long>
            
    },
],
"messages": <string>[],
"next":
{
    "parameters":
    {
        "returnOptions": <string>,
        "method": <string>,
        "fileExtension": <string>,
        "dateTo": <string>,
        "rowLimit": <string>, 
        "page": <string>, 
        "locationCode": <string>,
        "deviceCategoryCode": <string>,
        "dateFrom": <string>,
        "token": <string>,
    },
    "url": <string>
},
"queryUrl": <string>,
"returnOption": <string>
}
PropertyTypeDescriptionExample
citations.citationstringThe citation for the dataset from which the included files pertain to
citations.doistringThe DOI for the citation
citations.landingPageUrlstringThe URL to the Dataset Landing Page for the citation's dataset
citations.queryPidnullUsed in other services, but will always be null for the archivefiles service
files.archiveLocationstringThe location of the file
files.archivedDatestringThe time stamp of current file in AD while it is archived2010-04-21T00:00:00.000Z
files.compressionstringThe file extension if the file is compressedgz
files.dataProductCodestringData product code8
files.dateFromstringThe beginning time stamp the data is recorded in the file2010-04-21T00:00:00.000Z
files.dateTostringThe end time stamp the data is recorded in the file2010-04-22T00:00:00.000Z
files.deviceCodestringDevice Code
files.fileSizelongFile size, in bytes, after compressed with GZip
files.filenamestringThe name of the file "BC_POD2_JB_20090908T000000.000Z.txt"
files.modifyDatedateThe last time stamp of any modification related to the file2010-04-22T01:55:00.000Z
files.pathstringThe directory path to the location of the file
files.uncompressedFileSizelongOriginal file size, in bytes, without compressed 156545

messages

string[]A list of the restrictions that apply to the retrieved files

next.parameters.returnOptions

stringAs passed into the original call

next.parameters.method

stringAs passed into the original call

next.parameters.fileExtension

stringAs passed into the original call

next.parameters.dateTo

date

As passed into the original call

Note: a dateTo will only be included in next.parameters and next.url if the original call was passed a dateTo as well


next.parameters.rowLimit

stringAs passed into the original call

next.parameters.page

stringThe page number for the next files based on the parameters

next.parameters.locationCode

stringAs passed into the original call

next.parameters.deviceCategoryCode

stringAs passed into the original call

next.parameters.token

stringAs passed into the original call

"YOUR_TOKEN_HERE"

next.url

stringThe complete URL that can be used to get the next set of data in the requested range.

queryUrl

stringThe complete URL that can be used to get this set of data in the requested range.

returnOption

stringAs passed into the original call

Example

{
  "next": {
    "parameters": {
      "method": "getListByDevice",
      "deviceCode": "BC_POD2_JB",
      "rowLimit": "5",
      "page": "2",
      "token": "0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d"
    },
    "url": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&deviceCode=BC_POD2_JB&rowLimit=5&page=2&token=0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d"
  },
  "queryUrl": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&token=0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d&deviceCode=BC_POD2_JB&rowLimit=5",
  "returnOption": "default",
  "citations": [
    {
      "citation": "Ocean Networks Canada Society. 2009. Upper Slope South Junction Box Deployed 2009-09-08. Ocean Networks Canada Society. https://doi.org/10.34943/270927b5-6786-4369-809f-18b1712678a0.",
      "doi": "10.34943/270927b5-6786-4369-809f-18b1712678a0",
      "landingPageUrl": "https://doi.org/10.34943/270927b5-6786-4369-809f-18b1712678a0",
      "queryPid": null
    },
    ...
  ],
  "files": [
    "BC_POD2_JB_20080929T000000.000Z.log",
    "BC_POD2_JB_20081002T000000.000Z.txt",
    "BC_POD2_JB_20081002T000000.000Z.log",
    "BC_POD2_JB_20081003T000000.000Z.txt",
    "BC_POD2_JB_20081004T000000.000Z.txt"
  ],
  "messages": []
}

 

{
  "citations": [
    {
      "citation": "Ocean Networks Canada Society. 2009. Upper Slope South Junction Box Deployed 2009-09-08. Ocean Networks Canada Society. https://doi.org/10.34943/270927b5-6786-4369-809f-18b1712678a0.",
      "doi": "10.34943/270927b5-6786-4369-809f-18b1712678a0",
      "landingPageUrl": "https://doi.org/10.34943/270927b5-6786-4369-809f-18b1712678a0",
      "queryPid": null
    },
    ...
  ],
  "files": [
    {
      "archiveLocation": "/archive/AD_8",
      "archivedDate": "2013-08-08T17:45:08.000Z",
      "compression": "gz",
      "dataProductCode": "LF",
      "dateFrom": "2008-09-29T00:00:00.000Z",
      "dateTo": "2008-09-30T00:00:00.000Z",
      "deviceCode": "BC_POD2_JB",
      "fileSize": 87,
      "filename": "BC_POD2_JB_20080929T000000.000Z.log",
      "modifyDate": "2018-05-01T13:11:56.836Z",
      "path": "00/51/65",
      "uncompressedFileSize": 67
    }
  ],
  "messages": [],
  "next": {
    "parameters": {
      "method": "getListByDevice",
      "returnOptions": "all",
      "deviceCode": "BC_POD2_JB",
      "rowLimit": "1",
      "page": "2",
      "token": "0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d"
    },
    "url": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&returnOptions=all&deviceCode=BC_POD2_JB&rowLimit=1&page=2&token=0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d"
  },
  "queryUrl": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&token=0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d&deviceCode=BC_POD2_JB&rowLimit=1&returnOptions=all",
  "returnOption": "all"
}
{
  "next": {
    "parameters": {
      "method": "getListByDevice",
      "fileExtension": "png",
      "deviceCode": "IOS3HYDARR01",
      "rowLimit": "5",
      "page": "2",
      "token": "0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d"
    },
    "url": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&fileExtension=png&deviceCode=IOS3HYDARR01&rowLimit=5&page=2&token=0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d"
  },
  "queryUrl": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&token=0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d&deviceCode=IOS3HYDARR01&rowLimit=5&fileExtension=png",
  "returnOption": "default",
  "citations": [
    {
      "citation": "Ocean Networks Canada Society. 2009. Patricia Bay Hydrophone Deployed 2006-02-26. Ocean Networks Canada Society. https://doi.org/10.34943/39b8e1e6-c3e8-49bc-b16e-fc7400764582.",
      "doi": "10.34943/39b8e1e6-c3e8-49bc-b16e-fc7400764582",
      "landingPageUrl": "https://doi.org/10.34943/39b8e1e6-c3e8-49bc-b16e-fc7400764582",
      "queryPid": null
    },
    ...
  ],
  "files": [
    "IOS3HYDARR01_20060314T130754.000Z-spect-H2.png",
    "IOS3HYDARR01_20060314T130754.000Z-spect-H1.png",
    "IOS3HYDARR01_20060314T130754.000Z-spect-H3.png",
    "IOS3HYDARR01_20060314T131752.000Z-spect-H1.png",
    "IOS3HYDARR01_20060314T131752.000Z-spect-H2.png"
  ],
  "messages": [
    "deviceCode: IOS3HYDARR01 has data restricted by Ocean Networks Canada Society (data product code SHV, extension png). To access, get written permission via Ben Biffard (bbiffard@uvic.ca). This product is restricted for all time. For more information on accessing restricted go to https://wiki.oceannetworks.ca/display/DP/Data+Restrictions"
  ]
}
{
  "next": {
    "parameters": {
      "method": "getListByDevice",
      "dataProductCode": "HSD",
      "deviceCode": "IOS3HYDARR01",
      "rowLimit": "5",
      "page": "2",
      "token": "0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d"
    },
    "url": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&dataProductCode=HSD&deviceCode=IOS3HYDARR01&rowLimit=5&page=2&token=0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d"
  },
  "queryUrl": "https://data.oceannetworks.ca/api/archivefiles?method=getListByDevice&token=0b25bdb2-b31f-4116-81d6-c0aa9f65ee7d&deviceCode=IOS3HYDARR01&rowLimit=5&dataProductCode=HSD",
  "returnOption": "default",
  "citations": [
    {
      "citation": "Ocean Networks Canada Society. 2009. Patricia Bay Hydrophone Deployed 2006-02-26. Ocean Networks Canada Society. https://doi.org/10.34943/39b8e1e6-c3e8-49bc-b16e-fc7400764582.",
      "doi": "10.34943/39b8e1e6-c3e8-49bc-b16e-fc7400764582",
      "landingPageUrl": "https://doi.org/10.34943/39b8e1e6-c3e8-49bc-b16e-fc7400764582",
      "queryPid": null
    },
    ...
  ],
  "files": [
    "IOS3HYDARR01_20060314T130754.000Z-spect-H2.png",
    "IOS3HYDARR01_20060314T130754.000Z-spect-H1.pdf",
    "IOS3HYDARR01_20060314T130754.000Z-spect-H2.pdf",
    "IOS3HYDARR01_20060314T130754.000Z-spect-H3.pdf",
    "IOS3HYDARR01_20060314T130754.000Z-spect-H1.png"
  ],
  "messages": []
}



getFile

Download a file from Oceans 3.0 Archiving System by specifying the file name. The file will be downloaded without any compression.

Many files in the archive are compressed for storage, uncompressing these files takes time on the server and increases data volume to transfer. We will address this performance issue in a future update.

Parameters 

ParameterTypeDescriptionExample
Required
filenamestringA valid name of a file in DMAS Archiving System.NAXYS_02345_P008_20100107T185747.660Z.wav
tokenstringCredential token.

Response

Success

HTTP status code 200 will be returned in HTTP header and the requested file will be downloaded.

Example

https://data.oceannetworks.ca/api/archivefiles?method=getFile&token=SAMPLETOKEN123456789&filename=NAXYS_02345_P008_20100107T185747.660Z.wav

  • No labels

1 Comment

  1. Mic PROD Thorne

    The value of the required parameter station for the getList service call, comes from the the DMAS database column searchtreenodecode in the table searchtreenode.