Issues with the API:

* /gdc/project is not navigatable

/gdc/project/<project_id> hierarchy exists, but there are no links
reachable from root that would point into it. On the other hand,
/gdc/md returns navigatable list of projects and is linked from
/gdc/projects as well. This list of project should probably be moved from
/gdc/md to /gdc/projects.

* Some error responses (notably token failures) don't respect Accept

They always return HTML responses, since Apache's auth modules are too
high in the processing stack. Nothing could probably be done about this.

* Certain errors return different structures than others

Some are { error => { message => ..., parameters => [...] }}, while others
lack the error key:

'{"parameters":[],"component":"Account::Login::AuthShare",
        "message":"Bad Login or Password\\"!"}',

* 401 responses don't tell us how to authenticate

Missing an WWW-Authenticate header is a violation of RFC 2616.
Values like 'GoodData cookie=GDCAuthTT' or
'GoodData login=/gdc/account/login' might be more helpful.

For now, we can tell that we need to refresh the token only by following
a redirect that's sent only to browsers (we pretend to be one by accepting
application/xhtml+xml).

* No charset information

Content-Encoding header is not present, nor is MIME type in Content-Type
(or multipart parts) enriched with charset= key.

* DELETE /gdc/md/<project_id> returns 200

And same contant as GET of the resource.

* Broken empty responses handling

They should have 204 return code and no Content-Type header.

* DELETE /gdc/projects/<project_id> returns: ""
* DELETE https://secure.gooddata.com/gdc/account/login/<id> returns: 2

It should be empty.

* 401 Error message without login makes little sense

When requesting authenticated resource without SST, only "/gdc/account/login"
message is gotten.

* HTML template at /gdc/exporter/executor lacks some formats

Offers PDF/XLS only (no PNG).

* POST to exporter resource returns invalid JSON

Returns: "/gdc/exporter/chart_result/<...>/<...>".
Should be: { uri => "/gdc/exporter/chart_result/<...>/<...>" }.

* Report without reportdefinitions was seen in real life

URI: /gdc/md/i729zexwpdr03c4hjf1vktrlwa5m590q/obj/7610
When POSTed to xtab2 executor3: 500 Internal Server Error
Missing ReportID in Storage.pm-&gt;Register() at /opt/common/lib/XTabLib/Storage.pm line 191.

* Inconsitency in "self" links

{report}{meta}{uri}
{project}{meta}{self}

* Exported document returns 202 with invalid body until exported

"null" with application/json content-type.
According to RFC 2616, body SHOULD be present and indicate status.

* Crappy diagnostics from chart exporter

Exporter worker returned ERROR status at lib/WWW/GoodData/Agent.pm line 146.
This happened once without a good reason and retry succeeded.

* Invalid structure errors are really hard to grok

Checking 'result_req', result STRUCTURE INVALID - name of structure:'ResultReq'(tag:result_req),  /result_req/ExecuteResult/format: Object  does not match any alternative. Alternatives tried : [STRUCTURE INVALID - name of structure:'ResultReq'(tag:result_req),  /result_req/ExecuteResult/format/case:: Constant 'pdf' expected. at /opt/common/lib/REST/GrammarStructure/Atom.pm line 67.
, STRUCTURE INVALID - name of structure:'ResultReq'(tag:result_req),  /result_req/ExecuteResult/format/case:: Constant 'xls' expected. at /opt/common/lib/REST/GrammarStructure/Atom.pm line 67.
, STRUCTURE INVALID - name of structure:'ResultReq'(tag:result_req),  /result_req/ExecuteResult/format/case:: Constant 'png' expected. at /opt/common/lib/REST/GrammarStructure/Atom.pm line 67.
] at /opt/common/lib/REST/GrammarStructure/Alternative.pm line 116.

* Chart PDF exports have weird title

One from result used should be there instead.
