API Reference - GET content by URL
To fetch the content info for a particular source URL, make an HTTP GET
request to /v1/content/?url=<url>, where
<url> is the source URL of the content.
If this source URL hasn't been seen yet, Zoom.it will begin processing it, unless the service is currently overloaded.
Be sure to URL-encode the source URL if it has any special
characters. For example, ampersands (&) should be replaced with
%26.
Possible responses:
301 Moved Permanently: the content exists, or has been
created. In the RESTful case, the response is a permanent redirect to
the content’s ID endpoint (/v1/content/<id>) to
optimize the performance of subsequent fetches, but the response body is
the content info for convenience.
In the non-RESTful case, this content info is the content
field in the response object, and the content's ID endpoint
is given in the redirectLocation field.
400 Bad Request: the URL was malformed or missing.
Examples of malformed URLs are those that don’t begin with "http://" or
"https://". In the RESTful case, the response body is a plaintext error
message. In the non-RESTful case, this error message is the
error field in the response object.
503 Service Unavailable: the Zoom.it service is either
down for maintenance or overloaded. In the RESTful case, the response
body is a plaintext error message. In the non-RESTful case, this error
message is the error field in the response
object.
Example requests:
curl -i api.zoom.it/v1/content/?url=http://example.com/
Returns 301 Moved Permanently with JSON content info as the response body.
curl -i api.zoom.it/v1/content/?url=example.com
Returns 400 Bad Request with a plaintext error message as the response body.
http://api.zoom.it/v1/content/?format=xml&url=http://example.com/
Returns 200 OK with XML response info; the <response> object has a
301 <status> and a <content> element.
http://api.zoom.it/v1/content/?format=xml&url=example.com
Returns 200 OK with XML response info; the <response> object has a
400 <status> and an <error> element.
