1 | {"info":{"title":"ACE API","version":"0.0.0"},"host":"localhost:5000","basePath":"/","schemes":["http","https"],"securityDefinitions":{"ApiToken":{"type":"apiKey","in":"header","name":"X-Api-Token"}},"security":[{"ApiToken":[]}],"responses":{"UnauthorizedError":{"description":"API key is missing or invalid","headers":{"WWW_Authenticate":{"type":"string"}}}},"swagger":"2.0","paths":{"/cache/clear":{"get":{"tags":["cache"],"summary":"Clear cache","description":"Clears the LRU cache of API responses","produces":["text/plain"],"responses":{"200":{"description":"Result"}}}},"/email/template":{"get":{"tags":["email"],"summary":"Render email template","produces":["text/html"],"parameters":[{"name":"templateSlug","description":"Template slug (folder name of the template)","in":"query","required":true,"type":"string"},{"name":"entityId","description":"Entity `id` from which to render the template","in":"query","required":false,"type":"string"},{"name":"preview","description":"Preview mode (disable inlining of styles etc)","in":"query","required":false,"type":"boolean"}],"responses":{"200":{"description":"Template"}}}},"/entities/index":{"get":{"tags":["entities"],"summary":"Show indexes","description":"Show all indexes, use this to find fields available for search/query.","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Indexes"}}}},"/entities/search":{"get":{"tags":["entities"],"summary":"Search entities","description":"This endpoint extends Cloudant's Lucene based search. Learn more from Cloudant's [documentation](https://docs.cloudant.com/search.html).","produces":["application/json"],"parameters":[{"name":"query","description":"Lucene search query","in":"query","required":true,"type":"string"},{"name":"include_docs","description":"Include docs in search results (ignored if `children` or `parents` is `true`)","in":"query","required":false,"type":"boolean","default":false},{"name":"sort","description":"Field to sort results by. Prefixed with `-` to reverse order. Suffixed with <`string|number`>","in":"query","required":false,"type":"string"},{"name":"limit","description":"Limit results (max 200)","in":"query","required":false,"type":"number"},{"name":"bookmark","description":"Bookmark for the next page of results","in":"query","required":false,"type":"string"},{"name":"group_field","description":"Field to group results by","in":"query","required":false,"type":"string"},{"name":"index","description":"Search index","in":"query","required":false,"type":"string","default":"all"},{"name":"children","description":"Get child entities","in":"query","required":false,"type":"boolean","default":false},{"name":"parents","description":"Get parent entities","in":"query","required":false,"type":"boolean","default":false},{"name":"trashed","description":"Get trashed entities","in":"query","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"Search result","schema":{"type":"object","properties":{"bookmark":{"type":"string"},"total_rows":{"type":"number"},"rows":{"type":"array","items":{"$ref":"#/definitions/Entity"}}}}}}}},"/entities/find":{"get":{"tags":["entities"],"summary":"Query entities","description":"This endpoint extends CouchDB's Mango query. Learn more from Cloudant's [documentation](https://docs.cloudant.com/cloudant_query.html#finding-documents-using-an-index).","produces":["application/json"],"parameters":[{"name":"query","description":"JSON query object, refer to CouchDB/Cloudant docs.","in":"query","required":true,"type":"string"},{"name":"children","description":"Get child entities","in":"query","required":false,"type":"boolean","default":false},{"name":"parents","description":"Get parent entities","in":"query","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"Query result","schema":{"type":"object","properties":{"bookmark":{"type":"string"},"docs":{"type":"array","items":{"$ref":"#/definitions/Entity"}}}}}}}},"/entities":{"get":{"tags":["entities"],"summary":"Get all entities","description":"Get all entities, optionally from an array of IDs","produces":["application/json"],"parameters":[{"name":"id","description":"Entity ID","in":"query","required":false,"type":"string"},{"name":"ids","description":"Entity IDs","in":"query","required":false,"type":"array","items":{"type":"string"}},{"name":"children","description":"Get child entities","in":"query","required":false,"type":"boolean","default":false},{"name":"parents","description":"Get parent entities","in":"query","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"Entities","schema":{"type":"array","items":{"$ref":"#/definitions/Entity"}}}}}},"/metadata":{"get":{"tags":["metadata"],"summary":"Get metadata","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Metadata","schema":{"type":"object","properties":{"description":{"type":"string"}}}}}}},"/taxonomy":{"get":{"tags":["taxonomy"],"summary":"Get taxonomy","produces":["application/json"],"parameters":[{"name":"slug","description":"Taxonomy slug","in":"query","required":true,"type":"string"}],"responses":{"200":{"description":"Taxonomy","schema":{"type":"object","$ref":"#/definitions/Taxonomy"}}}}},"/token":{"get":{"tags":["token"],"summary":"Get JWT","description":"Get Json Web Token (JWT) for API access","produces":["application/json"],"parameters":[{"name":"slug","description":"Slug for token payload (super user only)","in":"query","required":false,"type":"string"},{"name":"userId","description":"User ID for token payload (super user only)","in":"query","required":false,"type":"string"},{"name":"role","description":"Role for token payload (super user only)","in":"query","required":false,"type":"string"},{"name":"expiresIn","description":"Duration of token in seconds","in":"query","required":false,"type":"number"}],"responses":{"200":{"description":"Token"}}}}},"definitions":{"Entity":{"type":"object","required":["_id","_rev"],"properties":{"_id":{"type":"string"},"_rev":{"type":"string"},"schema":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"thumbnail":{"type":"object"},"fields":{"type":"object"},"published":{"type":"boolean"},"publishedAt":{"type":"string"}}},"Taxonomy":{"type":"object","properties":{"title":{"type":"string"},"slug":{"type":"string"},"terms":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"terms":{"type":"array"}}}}}}},"parameters":{},"tags":[]} |