Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


{
    "message": "Transferring (BarkleyCanyon_Axis_ADCP2MHz_20160727T000005Z_20160731T235958Z-clean.csv) to the FTP server",
    "status": "running"
}



Property
Type
Description
Example
statusstringThe current status of the data product request. Valid values are ("queued", "error" and "running")
"status": "running"
messagestringThe latest status message reported by the data product process. "message": "Transferring (BarkleyCanyon_Axis_ADCP2MHz_20160727T000005Z_20160731T235958Z-clean.csv) to the FTP server"


Cancel
Anchor

...

cancel

...

cancel

The cancel method cancels the data product ran by a call to the run method.

Parameters

Parameter

Type

Description

Example

Required


tokenstringAll Web Services require a token. Once logged in at http://data.oceannetworks.ca/login, your token can be retrieved or generated at http://data.oceannetworks.ca/Profile . Click on the "Web Services" tab, then click "Generate Token".token=YOUR_TOKEN_HERE
dpRequestIdinteger

A dpRequestId returned from the request method.

dpRequestId=1852695

Response

Success (HTTP 200)

HTTP status code 200 is returned when all of the queued and running  data products in the request have been cancelled.

[
   {
      "dpRunId": 4521400,
      "status": "cancelled"
   }
]


The payload contains a list of runs, each containing the following properties:

Property

Type

Description

Example

dpRunId
integerA Run Id that can be used to download the data product when processing is complete.
"dpRunId":4521400
statusstringThe current status of the data product request. Valid values are ("cancelled", "queued", "error", "running" and "complete").
"status": "cancelled"

Unauthorized (HTTP 401)

{
    "errors": [
        {
            "errorCode": 127,
            "errorMessage": "Invalid parameter value",
            "parameter": "token"
        }
    ]
}


errorCode

errorMessage

Description

127

Invalid parameter value

Occurs when an invalid token is used.

128Missing parameter

Occurs when the token parameter is not included in the request



Bad Request (HTTP 400)

{
    "errors": [
        {
            "errorCode": 129,
            "errorMessage": "Invalid parameter name",
            "parameter": "RequestId"
        },
        {
            "errorCode": 128,
            "errorMessage": "Missing parameter",
            "parameter": "dpRequestId"
        }
    ]
}


errorCode

errorMessage

Description

127Invalid parameter value

Occurs when an invalid code is used in the query.

  • The name of the filter parameter will be included in the "parameter" property
128Missing parameter

Occurs when multiple parameters are needed, but not all are present. Occurs when begin is used without end.

  • The names of the required filter parameters, separated by /, are included in the parameter property,
129Invalid parameter name

Occurs when an unsupported filter parameter is used.

  • The name of the filter parameter will be included in the "parameter" property

Example

https://data.oceannetworks.ca/api/dataProductDelivery?method=cancel&token=[YOUR_TOKEN_HERE]&dpRequestId=[YOUR_REQUEST_ID_HERE]


Restart
Anchor

...

restart

...

restart

The restart method restarts the data product cancelled by a call to the cancel method.

Parameters

Parameter

Type

Description

Example

Required


tokenstringAll Web Services require a token. Once logged in at http://data.oceannetworks.ca/login, your token can be retrieved or generated at http://data.oceannetworks.ca/Profile . Click on the "Web Services" tab, then click "Generate Token".token=YOUR_TOKEN_HERE
dpRequestIdinteger

A dpRequestId returned from the request method.

dpRequestId=1852695

Response

Success (HTTP 200)

HTTP status code 200 is returned when all of the cancelled data products in the request have restarted.

[
   {
      "dpRunId": 4521400,
      "status": "queued"
   }
]


The payload contains a list of runs, each containing the following properties:

Property

Type

Description

Example

dpRunId
integerA Run Id that can be used to download the data product when processing is complete.
"dpRunId":4521400
statusstringThe current status of the data product request. Valid values are ("cancelled", "queued", "error", "running" and "complete").
"status": "queued"

Unauthorized (HTTP 401)

{
    "errors": [
        {
            "errorCode": 127,
            "errorMessage": "Invalid parameter value",
            "parameter": "token"
        }
    ]
}


errorCode

errorMessage

Description

127

Invalid parameter value

Occurs when an invalid token is used.

128Missing parameter

Occurs when the token parameter is not included in the request



Bad Request (HTTP 400)

{
    "errors": [
        {
            "errorCode": 129,
            "errorMessage": "Invalid parameter name",
            "parameter": "RequestId"
        },
        {
            "errorCode": 128,
            "errorMessage": "Missing parameter",
            "parameter": "dpRequestId"
        }
    ]
}


errorCode

errorMessage

Description

127Invalid parameter value

Occurs when an invalid code is used in the query.

  • The name of the filter parameter will be included in the "parameter" property
128Missing parameter

Occurs when multiple parameters are needed, but not all are present. Occurs when begin is used without end.

  • The names of the required filter parameters, separated by /, are included in the parameter property,
129Invalid parameter name

Occurs when an unsupported filter parameter is used.

  • The name of the filter parameter will be included in the "parameter" property

Example

https://data.oceannetworks.ca/api/dataProductDelivery?method=restart&token=[YOUR_TOKEN_HERE]&dpRequestId=[YOUR_REQUEST_ID_HERE]

...