Commit e734c863 authored by Łukasz Nowak's avatar Łukasz Nowak

Simplify API.

Return object of access points.
parent b8bc61a5
......@@ -105,7 +105,7 @@ Introsepcation Methods
Fetching list of access urls
----------------------------
Explain acccess points in ``access_point`` list.
Explain acccess points in dictionary.
Client is expected to ask about connection points before doing any request.
......@@ -146,7 +146,6 @@ Extract of possible response::
Content-Type: application/json; charset=utf-8
{
"access_point": [
"instance_bang": {
"authentication": true,
"url": "{instance_url}/bang",
......@@ -186,7 +185,6 @@ Extract of possible response::
},
"optional": {}
}
]
}
All documentation here will refer to named access points except otherwise
......
......@@ -464,7 +464,7 @@ class VifibRestApiV1Tool(BaseTool):
rfc1123_date(self.api_modification_date))
self.REQUEST.response.setHeader('Cache-Control', 'public')
self.REQUEST.response.setStatus(200)
d = {'access_point': [{
d = {
"discovery": {
"authentication": False,
"url": self.absolute_url(),
......@@ -527,7 +527,7 @@ class VifibRestApiV1Tool(BaseTool):
},
'optional' : {}
}
}]}
}
self.REQUEST.response.setBody(jsonify(d))
return self.REQUEST.response
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment