{"note":"OpenAPI conversion -- returning structured metadata","name":"opentrials-local","description":"OpenTrials API","version":"0.0.1","base_url":"","endpoints":17,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api OpenTrials API\n@version 0.0.1\n@endpoints 17\n@toc search(3), trials(3), publications(1), conditions(1), organisations(1), persons(1), interventions(1), sources(1), fda_applications(2), documents(2), document_categories(1)\n\n@group search\n@endpoint GET /search\n@desc Returns trials based on a search query. By default, it'll search in all of a trial's attributes.\n@optional {q: any # The search query (follows the [ElasticSearch Query String](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-query-string-query.html#query-string-syntax) syntax), page: any # The page number, per_page: any # Number of items per page}\n@returns(200) Success\n\n@endpoint GET /search/autocomplete/{in}\n@desc Autocomplete search feature for supported database entities (`location`). It has the same options as a regular `search` operation, with an extra **required** `in` parameter indicating the entity type to search.\n@required {in: any # The entity to search for}\n@optional {q: any # The search query, page: any # The page number, per_page: any # Number of items per page}\n@returns(200) Success\n\n@endpoint GET /search/fda_documents\n@desc Search the FDA documents\n@optional {q: any # The search query (follows the [ElasticSearch Query String](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-query-string-query.html#query-string-syntax) syntax), text: any # Search query on the documents file's text (follows the [ElasticSearch Simple Query String](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/query-dsl-simple-query-string-query.html#_simple_query_string_syntax) syntax), page: any # The page number, per_page: any # Number of items per page}\n@returns(200) Success\n\n@endgroup\n\n@group trials\n@endpoint GET /trials/{id}\n@desc Returns a trial's details and related entities (e.g. `conditions`).\n@required {id: any # ID of the trial}\n@returns(200) Success\n@errors {404: Trial not found}\n\n@endgroup\n\n@group publications\n@endpoint GET /publications/{id}\n@desc Returns publication details\n@required {id: any # ID of the publication}\n@returns(200) Success\n@errors {404: Publication not found}\n\n@endgroup\n\n@group conditions\n@endpoint GET /conditions/{id}\n@desc Returns condition details\n@required {id: any # ID of the condition}\n@returns(200) Success\n@errors {404: Condition not found}\n\n@endgroup\n\n@group organisations\n@endpoint GET /organisations/{id}\n@desc Returns organisation details\n@required {id: any # ID of the organisation}\n@returns(200) Success\n@errors {404: Organisation not found}\n\n@endgroup\n\n@group trials\n@endpoint GET /trials/{id}/records\n@desc Returns a trial's raw records from its sources\n@required {id: any # ID of the trial}\n@returns(200) Success\n@errors {404: Trial not found}\n\n@endpoint GET /trials/{trialId}/records/{id}\n@desc Returns a trial's raw record from its sources\n@required {trialId: any # ID of the trial, id: any # ID of the trial's record}\n@returns(200) Success\n@errors {404: Trial not found}\n\n@endgroup\n\n@group persons\n@endpoint GET /persons/{id}\n@desc Returns person details\n@required {id: any # ID of the person}\n@returns(200) Success\n@errors {404: Person not found}\n\n@endgroup\n\n@group interventions\n@endpoint GET /interventions/{id}\n@desc Returns intervention details\n@required {id: any # ID of the intervention}\n@returns(200) Success\n@errors {404: Intervention not found}\n\n@endgroup\n\n@group sources\n@endpoint GET /sources\n@desc Returns list of sources\n@returns(200) Success\n\n@endgroup\n\n@group fda_applications\n@endpoint GET /fda_applications\n@desc Returns FDA applications\n@optional {page: any # The page number, per_page: any # Number of items per page}\n@returns(200) Success\n\n@endpoint GET /fda_applications/{id}\n@desc Returns an FDA application details\n@required {id: any # ID of the FDA application}\n@returns(200) Success\n@errors {404: FDA application not found}\n\n@endgroup\n\n@group documents\n@endpoint GET /documents\n@desc Returns documents\n@optional {page: any # The page number, per_page: any # Number of items per page}\n@returns(200) Success\n\n@endpoint GET /documents/{id}\n@desc Returns details of a document\n@required {id: any # ID of the document}\n@returns(200) Success\n@errors {404: Document not found}\n\n@endgroup\n\n@group document_categories\n@endpoint GET /document_categories\n@desc Returns document categories\n@returns(200) Success\n\n@endgroup\n\n@end\n"}