Fix AuthorityVisualizations

This commit is contained in:
Jasmine Schladen 2021-02-17 14:52:28 -08:00
parent 24c1415983
commit 5f2e32ff92
1 changed files with 42 additions and 17 deletions

View File

@ -493,6 +493,26 @@ class CertificateAuthority(AuthenticatedResource):
class AuthorityVisualizations(AuthenticatedResource): class AuthorityVisualizations(AuthenticatedResource):
def get(self, authority_id): def get(self, authority_id):
""" """
.. http:get:: /authorities/1/visualize
Authority visualization
**Example request**:
.. sourcecode:: http
GET /certificates/1/visualize HTTP/1.1
Host: example.com
Accept: application/json, text/javascript
**Example response**:
.. sourcecode:: http
HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript
{"name": "flare", {"name": "flare",
"children": [ "children": [
{ {
@ -509,7 +529,12 @@ class AuthorityVisualizations(AuthenticatedResource):
} }
] ]
} }
]} ]
}
:reqheader Authorization: OAuth token to authenticate
:statuscode 200: no error
:statuscode 403: unauthenticated
""" """
authority = service.get(authority_id) authority = service.get(authority_id)
return dict( return dict(