Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Description

See the External Web Services for method, token, and responseType usage and error messages.

...

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

https://wiki.oceannetworks.ca/display/help/stations

...

for

...

list

...

of

...

stations

...

URL

...

Method

Description

Example

getList

Get a list of files for a given station, and filtered by others optional parameters.

method=getList

getFile

Download a file from DMAS Archiving System by specifying the file name.

method=getFile

getList

Get a list of files available in DMAS Archiving System for a given station. The list of filenames can be filtered by device category and time range.

Parameters

Parameter

Type

Description

Example

Required

station

string

Station code defined by DMAS.

 

token

string

Credential token.

 

Optional

deviceCategory

string

Device category code defined by DMAS.

 

dateFrom

date

The date (in "yyyy-MM-ddTHH:mm:ss.SSSZ"

...

format).

...

2010-02-15T00:00:00.000Z

...

dateTo

date

The date (in "yyyy-MM-ddTHH:mm:ss.SSSZ"

...

format).

...

2010-03-15T18:00:00.000Z

...

dateArchivedFrom

date

The date (in "yyyy-MM-ddTHH:mm:ss.SSSZ"

...

format).

...

2010-04-15T00:00:00.000Z

...

dateArchivedTo

date

The date (in "yyyy-MM-ddTHH:mm:ss.SSSZ"

...

format).

...

2010-07-15T22:30:00.000Z

...

returnOptions

string

If there is no value given, only a list of filenames will be returned.
If the value is "all" there are more metadata information will be returned.

 

rowLimit

integer

The maximum number of results to return. If no rowLimit is provided, or if
the provided rowLimit exceeds the default, the default rowLimit of 100000 is used.

20000

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 dateFrom ascending
    Code Block
    
    [
    	{
        	"archivedDate": {date},
            "compression": {string},
    		"dataProductFormatId": {integer}
            "dateFrom": {date},
            "dateTo": {date},
            "deviceId":{integer},
            "fileSize": {long},
            "filename": {string},
            "modifyDate": {date},
            "uncompressedFileSize": {long}
    
        },
    ]

...

  • Property

    Type

    Description

    Example

    archivedDate

    date

    The time stamp of current file in AD while it is archived

    2010-04-21T00:00:00.000Z

...

  • compressedSize

    long

    File size, in bytes, after compressed with GZip

     

    compression

    string

    The file extension if the file is compressed

    gz

    dataProductFormatId

    integer

    Data product format ID

    8

    dateFrom

    date

    The beginning time stamp the data is recorded in the file

    2010-04-21T00:00:00.000Z

...

  • dateModified

    date

    The last time stamp of any modification related to the file

    2010-04-22T01:55:00.000Z

...

  • dateTo

    date

    The end time stamp the data is recorded in the file

    2010-04-22T00:00:00.000Z

...

  • deviceId

    integer

    Device ID

     

    filename

    string

    The name of the file

     

    uncompressedSize

    long

    Original file size, in bytes, without compressed

     

    If "returnOptions" parameter is NOT set, only a list of file names will be returned in JSON array object.
    Code Block
    [
        {string},
        {string}
    ]

...

  • Type

    Description

    Example

    string

    The name of the file

    "BIOSONICSDTXU08003_20100129T000000.000Z.txt"

...

Sample syntax

http://dmas.uvic.ca/api/archivefiles?method=getList&token=YOUR-TOKEN&station=FPDP.J1&deviceCategory=HYDROPHONE&dateFrom=2010-02-26T18:38:00.000Z&dateTo=2010-02-26T19:04:00.000Z&returnOptions=all

Code Block
]

{code}[
    {
        "archivedDate": "2010-02-26T19:29:15.000Z",
        "compression": "gz",
        "dataProductFormatId": 8,
        "dateFrom": "2010-02-26T18:38:23.000Z",
        "dateTo": "2010-02-26T18:43:28.000Z",
        "deviceId": 21601,
        "fileSize": 29325540,
        "filename": "NAXYS_HYD_P004_20100226T183823.766Z.wav",
        "modifyDate": "2010-02-26T19:29:15.000Z",
        "uncompressedFileSize": 57600044
    },
    {
        "archivedDate": "2010-03-17T19:11:41.000Z",
        "compression": "gz",
        "dataProductFormatId": 8,
        "dateFrom": "2010-02-26T18:43:28.000Z",
        "dateTo": "2010-02-26T18:48:28.000Z",
        "deviceId": 21601,
        "fileSize": 29092930,
        "filename": "NAXYS_HYD_P004_20100226T184328.414Z.wav",
        "modifyDate": "2010-03-17T19:11:41.000Z",
        "uncompressedFileSize": 57600044
    },
    {
        "archivedDate": "2010-02-26T18:53:34.000Z",
        "compression": "gz",
        "dataProductFormatId": 8,
        "dateFrom": "2010-02-26T18:48:28.000Z",
        "dateTo": "2010-02-26T18:53:34.000Z",
        "deviceId": 21601,
        "filename": "NAXYS_HYD_P004_20100226T184828.572Z.wav"
    },
    {
        "archivedDate": "2010-03-17T23:17:50.000Z",
        "compression": "gz",
        "dataProductFormatId": 8,
        "dateFrom": "2010-02-26T18:53:34.000Z",
        "dateTo": "2010-02-26T18:58:34.000Z",
        "deviceId": 21601,
        "fileSize": 28719719,
        "filename": "NAXYS_HYD_P004_20100226T185334.825Z.wav",
        "modifyDate": "2010-03-17T23:17:50.000Z",
        "uncompressedFileSize": 57600044
    },
    {
        "archivedDate": "2010-02-26T20:40:40.000Z",
        "compression": "gz",
        "dataProductFormatId": 8,
        "dateFrom": "2010-02-26T18:58:34.000Z",
        "dateTo": "2010-02-26T19:03:34.000Z",
        "deviceId": 21601,
        "fileSize": 28891774,
        "filename": "NAXYS_HYD_P004_20100226T185834.820Z.wav",
        "modifyDate": "2010-02-26T20:40:40.000Z",
        "uncompressedFileSize": 57600044
    }
]
{code}
[

http://dmas.uvic.ca/api/archivefiles?method=getList&token=YOUR-TOKEN&station=FPDP.J1&dateFrom=2012-03-05T00:00:00.000Z&dateTo=2012-03-06T00:00:00.000Z

] {
Code Block
}[
	"RDIADCP300WH15551_20120305T000000.000Z.rdi",
    "RDIADCP300WH15551_20120305T000000.000Z.txt",
    "RDIADCP300WH15551_20120305T060000.000Z.rdi",
    "RDIADCP300WH15551_20120305T120000.000Z.rdi"
]{code}

h2. getFile

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

h3. *Parameters*

|| Parameter || Type || Description || Example ||
| {color:#993300}{*}Required{*}{color} |
| filename | string | A valid name of a file in DMAS Archiving System. | {color:#003366}

getFile

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

Parameters

Parameter

Type

Description

Example

Required

filename

string

A valid name of a file in DMAS Archiving System.

NAXYS_02345_P008_20100107T185747.660Z.wav

...

token

string

Credential token.

 

Response

Success

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

Sample syntax

NAXYS_02345_P008_20100107T185747.660Z.wav"

...

class="external-link"

...

rel="nofollow"linktype="raw"

...

wikidestination="http://dmas.uvic.ca/api/archivefiles?method=getFile&token=YOUR-TOKEN&filename=NAXYS_02345_P008_20100107T185747.660Z.wav"

...

originalalias="http://dmas.uvic.ca/api/archivefiles?method=getFile&token=SAMPLETOKEN123456789&filename=NAXYS_02345_P008_20100107T185747.660Z.wav"

...

>http://dmas.uvic.ca/api/archivefiles?method=getFile&token=SAMPLETOKEN123456789&filename=NAXYS_02345_P008_20100107T185747.660Z.wav

...

(http://dmas.uvic.ca/api/archivefiles?method=getFile&token=SAMPLETOKEN123456789&filename=

...