Home » ANF Web Services

The ANF is actively working on a RESTful API to allow external users to query our datastreams for their applications. The reason for this has come from pre-existing external requests for metadata, station photos, etc.

API Design

Status codes

There are only 3 main outcomes in the interaction between an app and an API:

Status codes

HTTP Status Codes that the Apache server should return to the client in case of failure. These are server-side errors above the API layer. No JSON object will be included with these erros since we neveer got to deliver the query to the API code. Some problems that may result in this type of failure are directory permissions, file permissions, transfer mode errors, shebang line errors, etc.

HTTP Status Codes originating from within the API code to notify the client about results will default to status code 200. Testing for requirements and validity of the query will take place inside the API and any errors will be included in a JSON object with extra information about the outcome.

The application will verify the value of 'errorCode' and 'status' to determine success or failure of the query. This allows easy exception handling logic at the application. Some possible codes in the JSON object are:

Example JSON object with extra information about the outcome.

$result = array( 'developerMessage' => '', 'userMessage' => '', 'errorCode' => 0, 'moreInfo' => 'http://anf.ucsd.edu/api', 'status' => 200, 'code' => 200 );

API Methods


To be updated.


To be updated.


To be updated.