photo-front/documentation/api/GetHelloWorld.markdown

1.8 KiB

Open Photo API / Hello World

OpenPhoto, a photo service for the masses


  1. Purpose
  2. Endpoint
  3. Parameters
  4. Examples
  1. Response

Purpose of the Get Hello World API

This endpoint is used to test connectivity and/or authentication. Any parameters passed in the query string are returned in the response.


Endpoint

Authentication: optional

GET /hello.json

Parameters

  1. auth (optional), Pass this in with a value of true to test OAuth requests.

Examples

Command line curl

curl "http://jmathai.openphoto.me/hello.json"
curl "http://jmathai.openphoto.me/hello.json?auth=true"

PHP

$ch = curl_init('http://jmathai.openphoto.me/hello.json');
curl_exec($ch);

Response

The response is in a standard response envelope.

  • message, A string describing the result. Don't use this for anything but reading.
  • code, 200 on success
  • result, An array of [Tag][Tag] objects

Sample

{
  "message":"Hello, world!",
  "code":200,
  "result":
  {
    "__route__":"\/hello.json"
  }
}