From 3f34cf7f83f6416abe472c939dbbb29d6f8aed2d Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Fri, 17 Jan 2025 11:06:00 +0100 Subject: [PATCH 1/4] wip: implemented basic search api endpoint and also added default parameters to docs (needs udpates) --- .../Controllers/API/CompoundController.php | 44 - app/Http/Controllers/API/SearchController.php | 294 +--- app/Jobs/ImportEntry.php | 2 +- .../RestDocumentationServiceProvider.php | 79 + config/media-library.php | 2 +- config/permission.php | 4 +- database/seeders/LicenseSeeder.php | 12 +- public/vendor/rest/openapi.json | 1343 +++++++++++++---- routes/api.php | 2 + 9 files changed, 1136 insertions(+), 646 deletions(-) delete mode 100644 app/Http/Controllers/API/CompoundController.php diff --git a/app/Http/Controllers/API/CompoundController.php b/app/Http/Controllers/API/CompoundController.php deleted file mode 100644 index 23d0b210..00000000 --- a/app/Http/Controllers/API/CompoundController.php +++ /dev/null @@ -1,44 +0,0 @@ -where('identifier', $id)->firstOrFail(); - - if (isset($property)) { - if (isset($key)) { - return $molecule[$property][$key]; - } - - return $molecule[$property]; - } - - return $molecule; - } - - public function list(Request $request) - { - $sort = $request->get('sort'); - $size = $request->get('size'); - - if ($size == null) { - $size = 15; - } - - if ($sort == 'latest') { - return MoleculeResource::collection(Molecule::where('active', true)->orderByDesc('updated_at')->paginate($size)); - } else { - return MoleculeResource::collection(Molecule::where('active', true)->paginate($size)); - } - - return MoleculeResource::collection(Molecule::where('active', true)->paginate($size)); - } -} diff --git a/app/Http/Controllers/API/SearchController.php b/app/Http/Controllers/API/SearchController.php index 2a21f544..8034d6d5 100644 --- a/app/Http/Controllers/API/SearchController.php +++ b/app/Http/Controllers/API/SearchController.php @@ -2,291 +2,45 @@ namespace App\Http\Controllers\API; +use App\Actions\Coconut\SearchMolecule; use App\Http\Controllers\Controller; -use App\Models\Molecule; -use Illuminate\Database\QueryException; use Illuminate\Http\Request; -use Illuminate\Pagination\LengthAwarePaginator; -use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Cache; class SearchController extends Controller { - public function search(Request $request) + public function search(Request $request, SearchMolecule $search) { - try { - set_time_limit(300); - - $queryType = 'text'; - $results = []; - - $limit = $request->query('limit'); - $sort = $request->query('sort'); - $limit = $limit ? $limit : 24; - $page = $request->query('page'); - $tagType = $request->get('tagType') ? $request->get('tagType') : null; - - $offset = - (($page != null && $page != 'null' && $page != 0 ? $page : 1) - - 1) * - $limit; - - $query = $request->get('query'); - - $type = $request->query('type') - ? $request->query('type') - : $request->get('type'); - - if ($type) { - $queryType = $type; - } else { - //inchi - $re = - '/^((InChI=)?[^J][0-9BCOHNSOPrIFla+\-\(\)\\\\\/,pqbtmsih]{6,})$/i'; - preg_match_all($re, $query, $imatches, PREG_SET_ORDER, 0); - - if (count($imatches) > 0 && substr($query, 0, 6) == 'InChI=') { - $queryType = 'inchi'; - } - - //inchikey - $re = '/^([0-9A-Z\-]+)$/i'; - preg_match_all($re, $query, $ikmatches, PREG_SET_ORDER, 0); - if ( - count($ikmatches) > 0 && - substr($query, 14, 1) == '-' && - strlen($query) == 27 - ) { - $queryType = 'inchikey'; - } - - // smiles - $re = '/^([^J][0-9BCOHNSOPrIFla@+\-\[\]\(\)\\\\\/%=#$]{6,})$/i'; - preg_match_all($re, $query, $matches, PREG_SET_ORDER, 0); - - if (count($matches) > 0 && substr($query, 14, 1) != '-') { - $queryType = 'smiles'; - } - } - - $filterMap = [ - 'mf' => 'molecular_formula', - - 'mw' => 'molecular_weight', - 'hac' => 'heavy_atom_count', - 'tac' => 'total_atom_count', + $query = $request->get('query'); - 'arc' => 'aromatic_ring_count', - 'rbc' => 'rotatable_bond_count', - 'mrc' => 'minimal_number_of_rings', - 'fc' => 'formal_charge', - 'cs' => 'contains_sugar', - 'crs' => 'contains_ring_sugars', - 'cls' => 'contains_linear_sugars', + $sort = $request->query('sort'); + $type = $request->get('type') ? $request->get('type') : null; + $tagType = $request->get('tagType') ? $request->get('tagType') : null; + $page = $request->query('page'); - 'npl' => 'np_likeness_score', - 'alogp' => 'alogp', - 'topopsa' => 'topo_psa', - 'fsp3' => 'fsp3', - 'hba' => 'h_bond_acceptor_count', - 'hbd' => 'h_bond_donor_count', - 'ro5v' => 'rule_of_5_violations', - 'lhba' => 'lipinski_h_bond_acceptor_count', - 'lhbd' => 'lipinski_h_bond_donor_count', - 'lro5v' => 'lipinski_rule_of_5_violations', - 'ds' => 'found_in_databases', + $limit = $request->query('limit'); + $limit = $limit ? $limit : 24; - 'class' => 'chemical_class', - 'subclass' => 'chemical_sub_class', - 'superclass' => 'chemical_super_class', - 'parent' => 'direct_parent_classification', + $results = []; - ]; + $offset = $request->query('offset'); - $queryType = strtolower($queryType); - - $statement = null; - - if ($queryType == 'smiles' || $queryType == 'substructure') { - $statement = - "select id, COUNT(*) OVER () from mols where m@>'". - $query. - "' limit ". - $limit. - ' offset '. - $offset; - } elseif ($queryType == 'inchi') { - $statement = - "select id, COUNT(*) OVER () from molecules where standard_inchi LIKE '%". - $query. - "%' limit ". - $limit. - ' offset '. - $offset; - } elseif ($queryType == 'inchikey') { - $statement = - "select id, COUNT(*) OVER () from molecules where standard_inchi_key LIKE '%". - $query. - "%' limit ". - $limit. - ' offset '. - $offset; - } elseif ($queryType == 'exact') { - $statement = - "select id, COUNT(*) OVER () from mols where m@='". - $query. - "' limit ". - $limit. - ' offset '. - $offset; - } elseif ($queryType == 'similarity') { - $statement = - "select id, COUNT(*) OVER () from fps where mfp2%morganbv_fp('". - $query. - "') limit ". - $limit. - ' offset '. - $offset; - } elseif ($queryType == 'tags') { - if ($tagType == 'dataSource') { - - } else { - $results = Molecule::withAnyTags([$query], $tagType)->paginate($limit)->items(); - $count = Molecule::withAnyTags([$query], $tagType)->count(); - } - } elseif ($queryType == 'filters') { - $orConditions = explode('OR', $query); - $isORInitial = true; - $statement = - 'select molecule_id as id, COUNT(*) OVER () from properties where '; - foreach ($orConditions as $orCondition) { - if ($isORInitial === false) { - $statement = $statement.' OR '; - } - $isORInitial = false; - $statement = $statement.'('; - $andConditions = explode(' ', trim($orCondition, ' ')); - $isANDInitial = true; - foreach ($andConditions as $andCondition) { - if ($isANDInitial === false) { - $statement = $statement.' AND '; - } - $isANDInitial = false; - $_filter = explode(':', $andCondition); - if (str_contains($_filter[1], '..')) { - $range = array_values(explode('..', $_filter[1])); - $statement = - $statement. - '('. - $filterMap[$_filter[0]]. - ' between '. - $range[0]. - ' and '. - $range[1]. - ')'; - } elseif ( - $_filter[1] === 'true' || - $_filter[1] === 'false' - ) { - $statement = - $statement. - '('. - $filterMap[$_filter[0]]. - ' = '. - $_filter[1]. - ')'; - } elseif (str_contains($_filter[1], '|')) { - $dbFilters = explode('|', $_filter[1]); - $dbs = explode('+', $dbFilters[0]); - $statement = - $statement. - '('. - $filterMap[$_filter[0]]. - " @> '[\"". - implode('","', $dbs). - "\"]')"; - } else { - if (str_contains($_filter[1], '+')) { - $_filter[1] = str_replace('+', ' ', $_filter[1]); - } - $statement = - $statement. - '('.$filterMap[$_filter[0]].'::TEXT ILIKE \'%'.$_filter[1].'%\')'; - } - } - $statement = $statement.')'; - } - $statement = $statement.' LIMIT '.$limit; - } else { - if ($query) { - $query = str_replace("'", "''", $query); - $statement = - "select id, COUNT(*) OVER () from molecules WHERE (\"name\"::TEXT ILIKE '%". - $query. - "%') OR (\"synonyms\"::TEXT ILIKE '%". - $query. - "%') OR (\"identifier\"::TEXT ILIKE '%". - $query. - "%') limit ". - $limit. - ' offset '. - $offset; - } else { - $statement = - 'select id, COUNT(*) OVER () from mols limit '. - $limit. - ' offset '. - $offset. - 'ORDER BY annotation_level DESC'; - } - } - if ($statement) { - $expression = DB::raw($statement); - $qString = $expression->getValue( - DB::connection()->getQueryGrammar() - ); + try { + $cacheKey = 'search.'.md5($query.$limit.$type.$sort.$tagType.$page); - $hits = DB::select($qString); + $results = Cache::remember($cacheKey, now()->addDay(), function () use ($search, $query, $limit, $type, $sort, $tagType, $page) { + return $search->query($query, $limit, $type, $sort, $tagType, $page); + }); - $count = count($hits) > 0 ? $hits[0]->count : 0; + $collection = $results[1]; + $organisms = $results[2]; - $ids = implode( - ',', - collect($hits) - ->pluck('id') - ->toArray() - ); - - if ($ids != '') { - $statement = - 'SELECT * FROM molecules WHERE ID IN ('. - implode( - ',', - collect($hits) - ->pluck('id') - ->toArray() - ). - ')'; - if ($sort == 'recent') { - $statement = $statement.' ORDER BY created_at DESC'; - } - $expression = DB::raw($statement); - $string = $expression->getValue( - DB::connection()->getQueryGrammar() - ); - $results = DB::select($string); - } else { - $results = []; - $count = 0; - } - } - $pagination = new LengthAwarePaginator( - $results, - $count, - $limit, - $page + return response()->json( + [ + 'data' => $results[0], + ], + 200 ); - - return $pagination; } catch (QueryException $exception) { $message = $exception->getMessage(); if (str_contains(strtolower($message), strtolower('SQLSTATE[42P01]'))) { diff --git a/app/Jobs/ImportEntry.php b/app/Jobs/ImportEntry.php index c2fbaa45..15c0730f 100644 --- a/app/Jobs/ImportEntry.php +++ b/app/Jobs/ImportEntry.php @@ -271,7 +271,7 @@ public function fetchDOICitation($doi, $molecule) foreach ($dois as $doi) { if ($doi) { - //check if citation already exists + // check if citation already exists try { $citation = Citation::firstOrCreate(['doi' => $doi]); } catch (QueryException $e) { diff --git a/app/Providers/RestDocumentationServiceProvider.php b/app/Providers/RestDocumentationServiceProvider.php index cec9c45f..b52057c8 100644 --- a/app/Providers/RestDocumentationServiceProvider.php +++ b/app/Providers/RestDocumentationServiceProvider.php @@ -9,6 +9,7 @@ use Lomkit\Rest\Documentation\Schemas\MediaType; use Lomkit\Rest\Documentation\Schemas\OpenAPI; use Lomkit\Rest\Documentation\Schemas\Operation; +use Lomkit\Rest\Documentation\Schemas\Parameter; use Lomkit\Rest\Documentation\Schemas\Path; use Lomkit\Rest\Documentation\Schemas\RequestBody; use Lomkit\Rest\Documentation\Schemas\Response; @@ -156,6 +157,84 @@ public function boot() ], ], ])))), + '/api/search' => (new Path) + ->withGet( + (new Operation) + ->withSummary('Search endpoints') + ->withTags(['Search']) + ->withResponses( + (new Responses) + ->withDefault((new Response) + ->withDescription('Search based on various query parameters') + ->withContent([ + 'application/json' => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'data' => [ + ], + ], + ], + ], + ]) + ->generate()) + ->withOthers([ + json_encode('401') => (new Response) + ->withDescription('Unauthenticated') + ->generate(), + + ]) + ) + )->withParameters([ + (new Parameter) + ->withName('query') + ->withIn('query') + ->withDescription('Search query string') + ->withSchema((new SchemaConcrete)->withType('string')) + ->withRequired(false), + + (new Parameter) + ->withName('sort') + ->withIn('query') + ->withDescription('Sorting option') + ->withSchema((new SchemaConcrete)->withType('string')) + ->withRequired(false), + + (new Parameter) + ->withName('type') + ->withIn('query') + ->withDescription('Type filter') + ->withSchema((new SchemaConcrete)->withType('string')) + ->withRequired(false), + + (new Parameter) + ->withName('tagType') + ->withIn('query') + ->withDescription('Tag type filter') + ->withSchema((new SchemaConcrete)->withType('string')) + ->withRequired(false), + + (new Parameter) + ->withName('page') + ->withIn('query') + ->withDescription('Page number for pagination') + ->withSchema((new SchemaConcrete)->withType('integer')) + ->withRequired(false), + + (new Parameter) + ->withName('limit') + ->withIn('query') + ->withDescription('Number of results per page (default: 24)') + ->withSchema((new SchemaConcrete)->withType('integer')) + ->withRequired(false), + + (new Parameter) + ->withName('offset') + ->withIn('query') + ->withDescription('Offset for pagination') + ->withSchema((new SchemaConcrete)->withType('integer')) + ->withRequired(false), + ]), ] + (Features::enabled(Features::emailVerification()) ? [ '/api/auth/verify/{user_id}' => (new Path) ->withGet( diff --git a/config/media-library.php b/config/media-library.php index 7f6abbdb..edff5834 100644 --- a/config/media-library.php +++ b/config/media-library.php @@ -136,7 +136,7 @@ '-m 6', // for the slowest compression method in order to get the best compression. '-pass 10', // for maximizing the amount of analysis pass. '-mt', // multithreading for some speed improvements. - '-q 90', //quality factor that brings the least noticeable changes. + '-q 90', // quality factor that brings the least noticeable changes. ], Spatie\ImageOptimizer\Optimizers\Avifenc::class => [ '-a cq-level=23', // constant quality level, lower values mean better quality and greater file size (0-63). diff --git a/config/permission.php b/config/permission.php index 2a520f35..74c6402d 100644 --- a/config/permission.php +++ b/config/permission.php @@ -75,8 +75,8 @@ /* * Change this if you want to name the related pivots other than defaults */ - 'role_pivot_key' => null, //default 'role_id', - 'permission_pivot_key' => null, //default 'permission_id', + 'role_pivot_key' => null, // default 'role_id', + 'permission_pivot_key' => null, // default 'permission_id', /* * Change this if you want to name the related model primary key other than diff --git a/database/seeders/LicenseSeeder.php b/database/seeders/LicenseSeeder.php index 70c06977..68035e69 100644 --- a/database/seeders/LicenseSeeder.php +++ b/database/seeders/LicenseSeeder.php @@ -15,7 +15,7 @@ class LicenseSeeder extends Seeder public function run() { $licenses = [ - /*Creative Commons*/ + /* Creative Commons */ [ 'title' => 'Creative Commons Zero v1.0 Universal (CC0 1.0)', 'slug' => 'cc0-1.0', @@ -115,7 +115,7 @@ public function run() 'body' => 'Creative Commons License Deed
You are free to:
  • Share — copy and redistribute the material in any medium or format.
  • The licensor cannot revoke these freedoms as long as you follow the license terms.

  • Under the following terms:
  • Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • NonCommercial - You may not use the material for commercial purposes.
  • NoDerivatives — If you remix, transform, or build upon the material, you may not distribute the modified material.
  • No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

  • Notices:
  • You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
  • No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
  • Note:

    This is a human-readable summary of (and not a substitute for) the license.', 'category' => 'Creative Commons', ], - /*GPL*/ + /* GPL */ [ 'title' => 'GNU General Public License v2.0 only (GNU GPL)', 'slug' => 'gpl-2.0', @@ -153,7 +153,7 @@ public function run() 'category' => 'GPL', ], - /*Open Data Commons*/ + /* Open Data Commons */ [ 'title' => 'Open Data Commons Database Contents License (DbCL)', 'slug' => '', @@ -191,7 +191,7 @@ public function run() 'category' => 'Open Data Commons', ], - /*Community Data License*/ + /* Community Data License */ [ 'title' => 'Community Data License Agreement Permissive 1.0 (CDLA-Permissive-1.0)', 'slug' => 'cdla-permissive-1.0', @@ -211,7 +211,7 @@ public function run() 'category' => 'Community Data License', ], - /*Special*/ + /* Special */ [ 'title' => 'The World Bank Dataset Terms of Use', 'slug' => '', @@ -249,7 +249,7 @@ public function run() 'category' => 'Special', ], - /*Other*/ + /* Other */ [ 'title' => 'Data files © Original Authors', 'slug' => '', diff --git a/public/vendor/rest/openapi.json b/public/vendor/rest/openapi.json index e8d6da00..639c0d87 100644 --- a/public/vendor/rest/openapi.json +++ b/public/vendor/rest/openapi.json @@ -1,28 +1,33 @@ { "openapi": "3.1.0", "info": { - "title": "COCONUT", + "title": "coconut", "summary": "COlleCtion of Open NatUral producTs", "description": "A comprehensive platform facilitating natural product research by providing data, tools, and services for deposition, curation, and reuse.", "contact": { - "name": "COCONUT", - "url": "http://localhost", + "name": "coconut", + "url": "https:\/\/coconut.naturalproducts.net\/", "email": "info.coconut@uni-jena.de" }, - "license": { "name": "MIT", "identifier": "MIT" }, + "license": { + "name": "MIT", + "identifier": "MIT" + }, "version": "2.0.0", - "termsOfService": "https://coconut.naturalproducts.net/terms" + "termsOfService": "https:\/\/coconut.naturalproducts.net\/terms" }, "paths": { - "/api/molecules": { + "\/api\/molecules": { "get": { - "tags": ["Molecules"], + "tags": [ + "Molecules" + ], "summary": "Get the resource detail", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { "actions": [], @@ -51,7 +56,11 @@ "is_placeholder" ], "scout_fields": [], - "limits": [10, 25, 50], + "limits": [ + 10, + 25, + 50 + ], "scopes": [], "relations": [ { @@ -77,17 +86,27 @@ } } }, - "description": "Get every detail about the resource according to the current user connected" + "description": "Get every detail about the resource according to the current user connected", + "security": [ + { + "sanctum": [] + } + ] }, "delete": { - "tags": ["Molecules"], + "tags": [ + "Molecules" + ], "summary": "Perform a destroy request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": [], "meta": [] } + "application\/json": { + "example": { + "data": [], + "meta": [] + } } } } @@ -95,23 +114,39 @@ "description": "Delete database records using primary key", "requestBody": { "content": { - "application/json": { - "example": { "resources": [1, 5, 6] } + "application\/json": { + "example": { + "resources": [ + 1, + 5, + 6 + ] + } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/molecules/search": { + "\/api\/molecules\/search": { "post": { - "tags": ["Molecules"], + "tags": [ + "Molecules" + ], "summary": "Perform a search request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": [], "meta": [] } + "application\/json": { + "example": { + "data": [], + "meta": [] + } } } } @@ -119,7 +154,7 @@ "description": "Crunch the Api's data with multiple attributes", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "scopes": [], @@ -250,7 +285,10 @@ "field": "name", "direction": "desc" }, - { "field": "cas", "direction": "desc" }, + { + "field": "cas", + "direction": "desc" + }, { "field": "iupac_name", "direction": "desc" @@ -305,58 +343,121 @@ } ], "selects": [ - { "field": "standard_inchi" }, - { "field": "standard_inchi_key" }, - { "field": "canonical_smiles" }, - { "field": "sugar_free_smiles" }, - { "field": "identifier" }, - { "field": "name" }, - { "field": "cas" }, - { "field": "iupac_name" }, - { "field": "murko_framework" }, - { "field": "structural_comments" }, - { "field": "name_trust_level" }, - { "field": "annotation_level" }, - { "field": "variants_count" }, - { "field": "status" }, - { "field": "active" }, - { "field": "has_variants" }, - { "field": "has_stereo" }, - { "field": "is_tautomer" }, - { "field": "is_parent" }, - { "field": "is_placeholder" } + { + "field": "standard_inchi" + }, + { + "field": "standard_inchi_key" + }, + { + "field": "canonical_smiles" + }, + { + "field": "sugar_free_smiles" + }, + { + "field": "identifier" + }, + { + "field": "name" + }, + { + "field": "cas" + }, + { + "field": "iupac_name" + }, + { + "field": "murko_framework" + }, + { + "field": "structural_comments" + }, + { + "field": "name_trust_level" + }, + { + "field": "annotation_level" + }, + { + "field": "variants_count" + }, + { + "field": "status" + }, + { + "field": "active" + }, + { + "field": "has_variants" + }, + { + "field": "has_stereo" + }, + { + "field": "is_tautomer" + }, + { + "field": "is_parent" + }, + { + "field": "is_placeholder" + } + ], + "includes": [ + { + "relation": "properties" + } ], - "includes": [{ "relation": "properties" }], "aggregates": [], "instructions": [], - "gates": ["create", "update", "delete"], + "gates": [ + "create", + "update", + "delete" + ], "page": 1, "limit": 10 } } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/molecules/mutate": { + "\/api\/molecules\/mutate": { "post": { - "tags": ["Molecules"], + "tags": [ + "Molecules" + ], "summary": "Perform a mutate request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "created": [1], "updated": [2, 3] } + "application\/json": { + "example": { + "created": [ + 1 + ], + "updated": [ + 2, + 3 + ] + } } } } }, - "description": "Create / Modify the database data with multiple options", + "description": "Create \/ Modify the database data with multiple options", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "mutate": [ { @@ -394,28 +495,46 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/molecules/actions/{action}": { - "parameters": [ - { + "\/api\/molecules\/actions\/{action}": { + "parameters": { + "0": { "name": "action", "in": "path", "description": "The action uriKey", "required": true, - "schema": { "type": "string" } - } - ], + "schema": { + "type": "string" + } + }, + "security": [ + { + "sanctum": [] + } + ] + }, "post": { - "tags": ["Molecules"], + "tags": [ + "Molecules" + ], "summary": "Perform an action request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": { "impacted": 2 } } + "application\/json": { + "example": { + "data": { + "impacted": 2 + } + } } } } @@ -423,7 +542,7 @@ "description": "Launch actions", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "filters": [ @@ -442,18 +561,25 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/collections": { + "\/api\/collections": { "get": { - "tags": ["Collections"], + "tags": [ + "Collections" + ], "summary": "Get the resource detail", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { "actions": [], @@ -466,7 +592,11 @@ "url" ], "scout_fields": [], - "limits": [10, 25, 50], + "limits": [ + 10, + 25, + 50 + ], "scopes": [], "relations": [], "rules": { @@ -480,21 +610,28 @@ } } }, - "description": "Get every detail about the resource according to the current user connected" + "description": "Get every detail about the resource according to the current user connected", + "security": [ + { + "sanctum": [] + } + ] }, "delete": { - "tags": ["Collections"], + "tags": [ + "Collections" + ], "summary": "Perform a destroy request", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { - "title": "Reprehenderit pariatur doloribus consequatur.", - "description": "Sit autem ab nemo voluptatem possimus consequuntur. Placeat qui ut ab eligendi et ab aspernatur. Sunt voluptatem iste error officiis autem. Iusto id voluptatem alias sed omnis.", - "url": "http://kiehn.info/", + "title": "Quod adipisci autem.", + "description": "Explicabo aut amet et non. Sed vitae sit eveniet pariatur laboriosam. Minus est ut doloremque ullam et iure.", + "url": "http:\/\/homenick.org\/rerum-enim-exercitationem-dolores-qui.html", "identifier": null }, "meta": [] @@ -506,27 +643,40 @@ "description": "Delete database records using primary key", "requestBody": { "content": { - "application/json": { - "example": { "resources": [1, 5, 6] } + "application\/json": { + "example": { + "resources": [ + 1, + 5, + 6 + ] + } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/collections/search": { + "\/api\/collections\/search": { "post": { - "tags": ["Collections"], + "tags": [ + "Collections" + ], "summary": "Perform a search request", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { - "title": "Occaecati minima commodi.", - "description": "Repudiandae nemo sunt adipisci illum id quam doloribus. Officia dignissimos molestias nesciunt eveniet voluptates ratione sequi. Officia maxime quis magni quia. Et voluptatum soluta laborum alias dicta saepe.", - "url": "http://www.altenwerth.net/voluptatem-aut-sit-maiores-recusandae-sint-perspiciatis.html", + "title": "Quasi debitis debitis reiciendis debitis.", + "description": "Dolores ea dolorem perspiciatis ut. Minus aut odio doloribus est consequatur. Deserunt autem rem soluta molestiae magnam sint quia.", + "url": "https:\/\/thiel.com\/quidem-enim-nisi-officia-harum-itaque-sed.html", "identifier": null }, "meta": [] @@ -538,7 +688,7 @@ "description": "Crunch the Api's data with multiple attributes", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "scopes": [], @@ -577,45 +727,75 @@ "field": "identifier", "direction": "desc" }, - { "field": "url", "direction": "desc" } + { + "field": "url", + "direction": "desc" + } ], "selects": [ - { "field": "title" }, - { "field": "description" }, - { "field": "identifier" }, - { "field": "url" } + { + "field": "title" + }, + { + "field": "description" + }, + { + "field": "identifier" + }, + { + "field": "url" + } ], "includes": [], "aggregates": [], "instructions": [], - "gates": ["create", "update", "delete"], + "gates": [ + "create", + "update", + "delete" + ], "page": 1, "limit": 10 } } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/collections/mutate": { + "\/api\/collections\/mutate": { "post": { - "tags": ["Collections"], + "tags": [ + "Collections" + ], "summary": "Perform a mutate request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "created": [1], "updated": [2, 3] } + "application\/json": { + "example": { + "created": [ + 1 + ], + "updated": [ + 2, + 3 + ] + } } } } }, - "description": "Create / Modify the database data with multiple options", + "description": "Create \/ Modify the database data with multiple options", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "mutate": [ { @@ -632,28 +812,46 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/collections/actions/{action}": { - "parameters": [ - { + "\/api\/collections\/actions\/{action}": { + "parameters": { + "0": { "name": "action", "in": "path", "description": "The action uriKey", "required": true, - "schema": { "type": "string" } - } - ], + "schema": { + "type": "string" + } + }, + "security": [ + { + "sanctum": [] + } + ] + }, "post": { - "tags": ["Collections"], + "tags": [ + "Collections" + ], "summary": "Perform an action request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": { "impacted": 2 } } + "application\/json": { + "example": { + "data": { + "impacted": 2 + } + } } } } @@ -661,7 +859,7 @@ "description": "Launch actions", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "filters": [ @@ -680,18 +878,25 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/citations": { + "\/api\/citations": { "get": { - "tags": ["Citations"], + "tags": [ + "Citations" + ], "summary": "Get the resource detail", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { "actions": [], @@ -704,7 +909,11 @@ "citation_text" ], "scout_fields": [], - "limits": [10, 25, 50], + "limits": [ + 10, + 25, + 50 + ], "scopes": [], "relations": [], "rules": { @@ -718,21 +927,28 @@ } } }, - "description": "Get every detail about the resource according to the current user connected" + "description": "Get every detail about the resource according to the current user connected", + "security": [ + { + "sanctum": [] + } + ] }, "delete": { - "tags": ["Citations"], + "tags": [ + "Citations" + ], "summary": "Perform a destroy request", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { - "doi": "10.3389/fchem.2023.1234211~0", - "title": "Editorial: Advances in natural product chemistry: Yunnan University 100th anniversary.", - "authors": "Chen W, Dong J, Panda SS.", + "doi": "10.1016\/j.bioorg.2024.107699~20", + "title": "The potential of marine natural Products: Recent Advances in the discovery of Anti-Tuberculosis agents.", + "authors": "Peng X, Zeng Z, Hassan S, Xue Y.", "citation_text": "" }, "meta": [] @@ -744,27 +960,40 @@ "description": "Delete database records using primary key", "requestBody": { "content": { - "application/json": { - "example": { "resources": [1, 5, 6] } + "application\/json": { + "example": { + "resources": [ + 1, + 5, + 6 + ] + } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/citations/search": { + "\/api\/citations\/search": { "post": { - "tags": ["Citations"], + "tags": [ + "Citations" + ], "summary": "Perform a search request", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { - "doi": "10.3389/abp.2024.12569~0", - "title": "Marine natural products: potential agents for depression treatment.", - "authors": "Wang X, Yang C, Zhang X, Ye C, Liu W, Wang C.", + "doi": "10.1021\/acsorginorgau.3c00040~38", + "title": "Natural Product Synthesis: The Endless Quest for Unreachable Perfection.", + "authors": "Fay N, Kouklovsky C, de la Torre A.", "citation_text": "" }, "meta": [] @@ -776,7 +1005,7 @@ "description": "Crunch the Api's data with multiple attributes", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "scopes": [], @@ -803,7 +1032,10 @@ } ], "sorts": [ - { "field": "doi", "direction": "desc" }, + { + "field": "doi", + "direction": "desc" + }, { "field": "title", "direction": "desc" @@ -818,42 +1050,69 @@ } ], "selects": [ - { "field": "doi" }, - { "field": "title" }, - { "field": "authors" }, - { "field": "citation_text" } + { + "field": "doi" + }, + { + "field": "title" + }, + { + "field": "authors" + }, + { + "field": "citation_text" + } ], "includes": [], "aggregates": [], "instructions": [], - "gates": ["create", "update", "delete"], + "gates": [ + "create", + "update", + "delete" + ], "page": 1, "limit": 10 } } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/citations/mutate": { + "\/api\/citations\/mutate": { "post": { - "tags": ["Citations"], + "tags": [ + "Citations" + ], "summary": "Perform a mutate request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "created": [1], "updated": [2, 3] } + "application\/json": { + "example": { + "created": [ + 1 + ], + "updated": [ + 2, + 3 + ] + } } } } }, - "description": "Create / Modify the database data with multiple options", + "description": "Create \/ Modify the database data with multiple options", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "mutate": [ { @@ -870,28 +1129,46 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/citations/actions/{action}": { - "parameters": [ - { + "\/api\/citations\/actions\/{action}": { + "parameters": { + "0": { "name": "action", "in": "path", "description": "The action uriKey", "required": true, - "schema": { "type": "string" } - } - ], + "schema": { + "type": "string" + } + }, + "security": [ + { + "sanctum": [] + } + ] + }, "post": { - "tags": ["Citations"], + "tags": [ + "Citations" + ], "summary": "Perform an action request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": { "impacted": 2 } } + "application\/json": { + "example": { + "data": { + "impacted": 2 + } + } } } } @@ -899,7 +1176,7 @@ "description": "Launch actions", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "filters": [ @@ -918,18 +1195,25 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/organisms": { + "\/api\/organisms": { "get": { - "tags": ["Organisms"], + "tags": [ + "Organisms" + ], "summary": "Get the resource detail", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { "actions": [], @@ -942,7 +1226,11 @@ "molecule_count" ], "scout_fields": [], - "limits": [10, 25, 50], + "limits": [ + 10, + 25, + 50 + ], "scopes": [], "relations": [], "rules": { @@ -956,17 +1244,27 @@ } } }, - "description": "Get every detail about the resource according to the current user connected" + "description": "Get every detail about the resource according to the current user connected", + "security": [ + { + "sanctum": [] + } + ] }, "delete": { - "tags": ["Organisms"], + "tags": [ + "Organisms" + ], "summary": "Perform a destroy request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": [], "meta": [] } + "application\/json": { + "example": { + "data": [], + "meta": [] + } } } } @@ -974,23 +1272,39 @@ "description": "Delete database records using primary key", "requestBody": { "content": { - "application/json": { - "example": { "resources": [1, 5, 6] } + "application\/json": { + "example": { + "resources": [ + 1, + 5, + 6 + ] + } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/organisms/search": { + "\/api\/organisms\/search": { "post": { - "tags": ["Organisms"], + "tags": [ + "Organisms" + ], "summary": "Perform a search request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": [], "meta": [] } + "application\/json": { + "example": { + "data": [], + "meta": [] + } } } } @@ -998,7 +1312,7 @@ "description": "Crunch the Api's data with multiple attributes", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "scopes": [], @@ -1029,7 +1343,10 @@ "field": "name", "direction": "desc" }, - { "field": "iri", "direction": "desc" }, + { + "field": "iri", + "direction": "desc" + }, { "field": "rank", "direction": "desc" @@ -1040,42 +1357,69 @@ } ], "selects": [ - { "field": "name" }, - { "field": "iri" }, - { "field": "rank" }, - { "field": "molecule_count" } + { + "field": "name" + }, + { + "field": "iri" + }, + { + "field": "rank" + }, + { + "field": "molecule_count" + } ], "includes": [], "aggregates": [], "instructions": [], - "gates": ["create", "update", "delete"], + "gates": [ + "create", + "update", + "delete" + ], "page": 1, "limit": 10 } } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/organisms/mutate": { + "\/api\/organisms\/mutate": { "post": { - "tags": ["Organisms"], + "tags": [ + "Organisms" + ], "summary": "Perform a mutate request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "created": [1], "updated": [2, 3] } + "application\/json": { + "example": { + "created": [ + 1 + ], + "updated": [ + 2, + 3 + ] + } } } } }, - "description": "Create / Modify the database data with multiple options", + "description": "Create \/ Modify the database data with multiple options", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "mutate": [ { @@ -1092,28 +1436,46 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/organisms/actions/{action}": { - "parameters": [ - { + "\/api\/organisms\/actions\/{action}": { + "parameters": { + "0": { "name": "action", "in": "path", "description": "The action uriKey", "required": true, - "schema": { "type": "string" } - } - ], + "schema": { + "type": "string" + } + }, + "security": [ + { + "sanctum": [] + } + ] + }, "post": { - "tags": ["Organisms"], + "tags": [ + "Organisms" + ], "summary": "Perform an action request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": { "impacted": 2 } } + "application\/json": { + "example": { + "data": { + "impacted": 2 + } + } } } } @@ -1121,7 +1483,7 @@ "description": "Launch actions", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "filters": [ @@ -1140,26 +1502,40 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/users": { + "\/api\/users": { "get": { - "tags": ["Users"], + "tags": [ + "Users" + ], "summary": "Get the resource detail", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { "actions": [], "instructions": [], "scout_instructions": [], - "fields": ["name", "email"], + "fields": [ + "name", + "email" + ], "scout_fields": [], - "limits": [10, 25, 50], + "limits": [ + 10, + 25, + 50 + ], "scopes": [], "relations": [], "rules": { @@ -1173,20 +1549,27 @@ } } }, - "description": "Get every detail about the resource according to the current user connected" + "description": "Get every detail about the resource according to the current user connected", + "security": [ + { + "sanctum": [] + } + ] }, "delete": { - "tags": ["Users"], + "tags": [ + "Users" + ], "summary": "Perform a destroy request", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { - "name": "Prof. Bethel Stroman", - "email": "btromp@example.com" + "name": "Dulce Wehner", + "email": "elwin.donnelly@example.org" }, "meta": [] } @@ -1197,26 +1580,39 @@ "description": "Delete database records using primary key", "requestBody": { "content": { - "application/json": { - "example": { "resources": [1, 5, 6] } + "application\/json": { + "example": { + "resources": [ + 1, + 5, + 6 + ] + } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/users/search": { + "\/api\/users\/search": { "post": { - "tags": ["Users"], + "tags": [ + "Users" + ], "summary": "Perform a search request", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { - "name": "Kayleigh Nikolaus", - "email": "margarete.farrell@example.net" + "name": "Eldora Effertz", + "email": "kali.blick@example.com" }, "meta": [] } @@ -1227,7 +1623,7 @@ "description": "Crunch the Api's data with multiple attributes", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "scopes": [], @@ -1254,40 +1650,63 @@ } ], "selects": [ - { "field": "name" }, - { "field": "email" } + { + "field": "name" + }, + { + "field": "email" + } ], "includes": [], "aggregates": [], "instructions": [], - "gates": ["create", "update", "delete"], + "gates": [ + "create", + "update", + "delete" + ], "page": 1, "limit": 10 } } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/users/mutate": { + "\/api\/users\/mutate": { "post": { - "tags": ["Users"], + "tags": [ + "Users" + ], "summary": "Perform a mutate request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "created": [1], "updated": [2, 3] } + "application\/json": { + "example": { + "created": [ + 1 + ], + "updated": [ + 2, + 3 + ] + } } } } }, - "description": "Create / Modify the database data with multiple options", + "description": "Create \/ Modify the database data with multiple options", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "mutate": [ { @@ -1302,28 +1721,46 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/users/actions/{action}": { - "parameters": [ - { + "\/api\/users\/actions\/{action}": { + "parameters": { + "0": { "name": "action", "in": "path", "description": "The action uriKey", "required": true, - "schema": { "type": "string" } - } - ], + "schema": { + "type": "string" + } + }, + "security": [ + { + "sanctum": [] + } + ] + }, "post": { - "tags": ["Users"], + "tags": [ + "Users" + ], "summary": "Perform an action request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": { "impacted": 2 } } + "application\/json": { + "example": { + "data": { + "impacted": 2 + } + } } } } @@ -1331,7 +1768,7 @@ "description": "Launch actions", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "filters": [ @@ -1350,18 +1787,25 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/properties": { + "\/api\/properties": { "get": { - "tags": ["Properties"], + "tags": [ + "Properties" + ], "summary": "Get the resource detail", "responses": { "default": { "description": "", "content": { - "application/json": { + "application\/json": { "example": { "data": { "actions": [], @@ -1402,7 +1846,11 @@ "np_classifier_is_glycoside" ], "scout_fields": [], - "limits": [10, 25, 50], + "limits": [ + 10, + 25, + 50 + ], "scopes": [], "relations": [ { @@ -1428,17 +1876,27 @@ } } }, - "description": "Get every detail about the resource according to the current user connected" + "description": "Get every detail about the resource according to the current user connected", + "security": [ + { + "sanctum": [] + } + ] }, "delete": { - "tags": ["Properties"], + "tags": [ + "Properties" + ], "summary": "Perform a destroy request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": [], "meta": [] } + "application\/json": { + "example": { + "data": [], + "meta": [] + } } } } @@ -1446,23 +1904,39 @@ "description": "Delete database records using primary key", "requestBody": { "content": { - "application/json": { - "example": { "resources": [1, 5, 6] } + "application\/json": { + "example": { + "resources": [ + 1, + 5, + 6 + ] + } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/properties/search": { + "\/api\/properties\/search": { "post": { - "tags": ["Properties"], + "tags": [ + "Properties" + ], "summary": "Perform a search request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": [], "meta": [] } + "application\/json": { + "example": { + "data": [], + "meta": [] + } } } } @@ -1470,7 +1944,7 @@ "description": "Crunch the Api's data with multiple attributes", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "scopes": [], @@ -1767,18 +2241,36 @@ } ], "selects": [ - { "field": "total_atom_count" }, - { "field": "heavy_atom_count" }, - { "field": "molecular_weight" }, - { "field": "exact_molecular_weight" }, - { "field": "molecular_formula" }, - { "field": "alogp" }, + { + "field": "total_atom_count" + }, + { + "field": "heavy_atom_count" + }, + { + "field": "molecular_weight" + }, + { + "field": "exact_molecular_weight" + }, + { + "field": "molecular_formula" + }, + { + "field": "alogp" + }, { "field": "topological_polar_surface_area" }, - { "field": "rotatable_bond_count" }, - { "field": "hydrogen_bond_acceptors" }, - { "field": "hydrogen_bond_donors" }, + { + "field": "rotatable_bond_count" + }, + { + "field": "hydrogen_bond_acceptors" + }, + { + "field": "hydrogen_bond_donors" + }, { "field": "hydrogen_bond_acceptors_lipinski" }, @@ -1788,61 +2280,118 @@ { "field": "lipinski_rule_of_five_violations" }, - { "field": "aromatic_rings_count" }, - { "field": "qed_drug_likeliness" }, - { "field": "formal_charge" }, - { "field": "fractioncsp3" }, - { "field": "number_of_minimal_rings" }, - { "field": "van_der_walls_volume" }, - { "field": "contains_sugar" }, - { "field": "contains_ring_sugars" }, - { "field": "contains_linear_sugars" }, - { "field": "murcko_framework" }, - { "field": "np_likeness" }, - { "field": "chemical_class" }, - { "field": "chemical_sub_class" }, - { "field": "chemical_super_class" }, + { + "field": "aromatic_rings_count" + }, + { + "field": "qed_drug_likeliness" + }, + { + "field": "formal_charge" + }, + { + "field": "fractioncsp3" + }, + { + "field": "number_of_minimal_rings" + }, + { + "field": "van_der_walls_volume" + }, + { + "field": "contains_sugar" + }, + { + "field": "contains_ring_sugars" + }, + { + "field": "contains_linear_sugars" + }, + { + "field": "murcko_framework" + }, + { + "field": "np_likeness" + }, + { + "field": "chemical_class" + }, + { + "field": "chemical_sub_class" + }, + { + "field": "chemical_super_class" + }, { "field": "direct_parent_classification" }, - { "field": "np_classifier_pathway" }, - { "field": "np_classifier_superclass" }, - { "field": "np_classifier_class" }, + { + "field": "np_classifier_pathway" + }, + { + "field": "np_classifier_superclass" + }, + { + "field": "np_classifier_class" + }, { "field": "np_classifier_is_glycoside" } ], - "includes": [{ "relation": "molecule" }], + "includes": [ + { + "relation": "molecule" + } + ], "aggregates": [], "instructions": [], - "gates": ["create", "update", "delete"], + "gates": [ + "create", + "update", + "delete" + ], "page": 1, "limit": 10 } } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/properties/mutate": { + "\/api\/properties\/mutate": { "post": { - "tags": ["Properties"], + "tags": [ + "Properties" + ], "summary": "Perform a mutate request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "created": [1], "updated": [2, 3] } + "application\/json": { + "example": { + "created": [ + 1 + ], + "updated": [ + 2, + 3 + ] + } } } } }, - "description": "Create / Modify the database data with multiple options", + "description": "Create \/ Modify the database data with multiple options", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "mutate": [ { @@ -1892,28 +2441,46 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/properties/actions/{action}": { - "parameters": [ - { + "\/api\/properties\/actions\/{action}": { + "parameters": { + "0": { "name": "action", "in": "path", "description": "The action uriKey", "required": true, - "schema": { "type": "string" } - } - ], + "schema": { + "type": "string" + } + }, + "security": [ + { + "sanctum": [] + } + ] + }, "post": { - "tags": ["Properties"], + "tags": [ + "Properties" + ], "summary": "Perform an action request", "responses": { "default": { "description": "", "content": { - "application/json": { - "example": { "data": { "impacted": 2 } } + "application\/json": { + "example": { + "data": { + "impacted": 2 + } + } } } } @@ -1921,7 +2488,7 @@ "description": "Launch actions", "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "search": { "filters": [ @@ -1940,23 +2507,34 @@ } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/auth/login": { + "\/api\/auth\/login": { "post": { - "tags": ["Authentication"], + "tags": [ + "Authentication" + ], "summary": "Login endpoint", "responses": { "default": { "description": "Login successful", "content": { - "application/json": { + "application\/json": { "schema": { "type": "object", "properties": { - "access_token": { "type": "string" }, - "token_type": { "type": "string" } + "access_token": { + "type": "string" + }, + "token_type": { + "type": "string" + } } } } @@ -1965,7 +2543,7 @@ }, "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "email": "john@example.com", "password": "password" @@ -1975,42 +2553,59 @@ } } }, - "/api/auth/logout": { + "\/api\/auth\/logout": { "get": { - "tags": ["Authentication"], + "tags": [ + "Authentication" + ], "summary": "Logout endpoint", "responses": { "default": { "description": "Logout successful", "content": { - "application/json": { + "application\/json": { "schema": { "type": "object", "properties": { - "logout": { "type": "string" } + "logout": { + "type": "string" + } } } } } } - } + }, + "security": [ + { + "sanctum": [] + } + ] } }, - "/api/auth/register": { + "\/api\/auth\/register": { "post": { - "tags": ["Authentication"], + "tags": [ + "Authentication" + ], "summary": "Register endpoint", "responses": { "default": { "description": "Successfully created user", "content": { - "application/json": { + "application\/json": { "schema": { "type": "object", "properties": { - "success": { "type": "boolean" }, - "message": { "type": "string" }, - "token": { "type": "string" } + "success": { + "type": "boolean" + }, + "message": { + "type": "string" + }, + "token": { + "type": "string" + } } } } @@ -2019,7 +2614,7 @@ }, "requestBody": { "content": { - "application/json": { + "application\/json": { "example": { "first_name": "John", "last_name": "Doe", @@ -2033,21 +2628,125 @@ } } } + }, + "\/api\/search": { + "parameters": { + "0": { + "name": "query", + "in": "query", + "description": "Search query string", + "required": false, + "schema": { + "type": "string" + } + }, + "1": { + "name": "sort", + "in": "query", + "description": "Sorting option", + "required": false, + "schema": { + "type": "string" + } + }, + "2": { + "name": "type", + "in": "query", + "description": "Type filter", + "required": false, + "schema": { + "type": "string" + } + }, + "3": { + "name": "tagType", + "in": "query", + "description": "Tag type filter", + "required": false, + "schema": { + "type": "string" + } + }, + "4": { + "name": "page", + "in": "query", + "description": "Page number for pagination", + "required": false, + "schema": { + "type": "integer" + } + }, + "5": { + "name": "limit", + "in": "query", + "description": "Number of results per page (default: 24)", + "required": false, + "schema": { + "type": "integer" + } + }, + "6": { + "name": "offset", + "in": "query", + "description": "Offset for pagination", + "required": false, + "schema": { + "type": "integer" + } + }, + "security": [ + { + "sanctum": [] + } + ] + }, + "get": { + "tags": [ + "Search" + ], + "summary": "Search endpoints", + "responses": { + "default": { + "description": "Search based on various query parameters", + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": [] + } + } + } + } + }, + "\"401\"": { + "description": "Unauthenticated" + } + }, + "security": [ + { + "sanctum": [] + } + ] + } } }, - "servers": [{ "url": "/", "description": "The current server" }], - "security": [{ "sanctum": [] }], + "servers": [ + { + "url": "\/", + "description": "The current server" + } + ], + "security": [], "components": { "securitySchemes": { "sanctum": { "scheme": "Bearer", "in": "header", - "flows": [], "description": "Enter token in format (Bearer \\)", "type": "apiKey", - "name": "Authorization", - "openIdConnectUrl": "" + "name": "Authorization" } } } -} +} \ No newline at end of file diff --git a/routes/api.php b/routes/api.php index 99d53f25..5d2922e3 100644 --- a/routes/api.php +++ b/routes/api.php @@ -36,6 +36,8 @@ }); }); +Route::get('search', [\App\Http\Controllers\API\SearchController::class, 'search'])->name('api.search'); + Route::middleware(['auth:sanctum', 'verified'])->group(function () { Rest::resource('molecules', \App\Rest\Controllers\MoleculesController::class); Rest::resource('collections', \App\Rest\Controllers\CollectionsController::class); From 7597f1af7e787e90526ec096b31df127b831c1e5 Mon Sep 17 00:00:00 2001 From: Sagar Date: Sun, 19 Jan 2025 21:51:05 +0100 Subject: [PATCH 2/4] fix: advanced filters are now accessible over swagger ui --- .../RestDocumentationServiceProvider.php | 156 +- public/vendor/rest/openapi.json | 2753 +---------------- routes/api.php | 2 +- 3 files changed, 130 insertions(+), 2781 deletions(-) diff --git a/app/Providers/RestDocumentationServiceProvider.php b/app/Providers/RestDocumentationServiceProvider.php index b52057c8..9b010e70 100644 --- a/app/Providers/RestDocumentationServiceProvider.php +++ b/app/Providers/RestDocumentationServiceProvider.php @@ -82,7 +82,9 @@ public function boot() ], ], ]) - ))), + ) + ) + ), '/api/auth/logout' => (new Path) ->withGet( (new Operation) @@ -156,33 +158,127 @@ public function boot() ], ], ], - ])))), + ] + )) + ) + ), '/api/search' => (new Path) - ->withGet( + ->withPost( (new Operation) - ->withSummary('Search endpoints') - ->withTags(['Search']) + ->withSummary('Advanced Molecule Search') + ->withDescription("Advanced search using filters. Support the following filters:\n\n". + "Molecular Properties:\n". + "- tac: Total Atom Count (range: 1 to 1071)\n". + "- hac: Heavy Atom Count (range: 0 to 551)\n". + "- mw: Molecular Weight (range: 5.01 to 7860.71)\n". + "- emw: Exact Molecular Weight (range: 1.00728 to 7855.66038)\n". + "- mrc: Number of Minimal Rings (range: 0 to 51)\n". + "- vdwv: Van der Walls Volume (range: 10.14 to 5177.31)\n". + "- fc: Formal Charge (range: -8 to 7)\n". + "\nChemical Properties:\n". + "- alogp: ALogP (range: -82.67 to 67.03)\n". + "- topopsa: Topological Polar Surface Area (range: 0.00 to 3453.72)\n". + "- fcsp3: Fraction CSP3 (range: 0.00 to 1.00)\n". + "- np: NP Likeness (range: -3.53 to 4.12)\n". + "- qed: QED Drug Likeliness (range: 0.00 to 0.95)\n". + "\nStructural Features:\n". + "- rbc: Rotatable Bond Count (range: 0 to 224)\n". + "- arc: Aromatic Rings Count (range: 0 to 31)\n". + "- hba: Hydrogen Bond Acceptors (range: 0 to 191)\n". + "- hbd: Hydrogen Bond Donors (range: 0 to 116)\n". + "\nLipinski Parameters:\n". + "- lhba: Lipinski H-Bond Acceptors (range: 0 to 191)\n". + "- lhbd: Lipinski H-Bond Donors (range: 0 to 116)\n". + "- lro5v: Lipinski Rule of 5 Violations (range: 0 to 4)\n". + "\nSugar-Related Properties:\n". + "- cs: Contains Sugar (true/false)\n". + "- crs: Contains Ring Sugars (true/false)\n". + "- cls: Contains Linear Sugars (true/false)\n". + "\nClassifications:\n". + "- class: Chemical Class (e.g., 1,2-diaryl-2-propen-1-ols)\n". + "- subclass: Chemical Sub Class (e.g., 1,1'-azonaphthalenes)\n". + "- superclass: Chemical Super Class (e.g., Acetylides)\n". + "- parent: Direct Parent Classification (e.g., 1,1'-azonaphthalenes)\n". + "\nNatural Product Classifications:\n". + "- np_pathway: NP Classifier Pathway (e.g., Amino acids and Peptides)\n". + "- np_superclass: NP Classifier Superclass (e.g., Aminosugars and aminoglycosides)\n". + "- np_class: NP Classifier Class (e.g., 2-arylbenzofurans)\n". + "- np_glycoside: NP Classifier Is Glycoside (true/false)\n". + "\nUsage Examples:\n". + "1. Range query: type=filters&q=tac:4..6\n". + "2. Boolean query: type=filters&q=cs:true\n". + "3. Classification query: type=filters&q=class:1,2-diaryl-2-propen-1-ols\n". + "4. Multiple conditions: type=filters&q=tac:4..6 mw:100..200\n". + '5. Complex query: type=filters&q=tac:4..6 cs:true OR mw:100..200') + ->withTags(['Advanced Search']) + ->withRequestBody( + (new RequestBody) + ->withContent([ + 'application/json' => (new MediaType) + ->withExample( + (new Example) + ->withValue([ + 'type' => 'filters', + 'query' => 'tac:4..6', + 'limit' => 20, + 'sort' => 'desc', + 'page' => 1, + 'offset' => 0, + ]) + ->generate() + ) + ->generate(), + ]) + ) ->withResponses( (new Responses) - ->withDefault((new Response) - ->withDescription('Search based on various query parameters') - ->withContent([ - 'application/json' => [ - 'schema' => [ - 'type' => 'object', - 'properties' => [ - 'data' => [ - ], - ], - ], - ], - ]) - ->generate()) + ->withDefault( + (new Response) + ->withDescription('Successful operation') + ->withContent([ + 'application/json' => (new MediaType) + ->withExample( + (new Example) + ->withValue([ + 'data' => [ + [ + 'identifier' => 'CNP0000001', + 'name' => 'Example Molecule', + 'molecular_formula' => 'C4H10', + 'total_atom_count' => 5, + 'annotation_level' => 3, + ], + ], + 'current_page' => 1, + 'total' => 100, + 'per_page' => 24, + ]) + ->generate() + ) + ->generate(), + ]) + ->withDescription('Example queries:\n'. + '1. Range query: /search?type=filters&q=tac:4..6\n'. + '2. Multiple conditions: /search?type=filters&q=tac:4..6 mw:100..200\n'. + '3. Boolean query: /search?type=filters&q=cs:true\n'. + '4. Database query: /search?type=filters&q=ds:pubchem|chembl\n'. + '5. Complex query: /search?type=filters&q=tac:4..6 cs:true OR mw:100..200') + ) ->withOthers([ - json_encode('401') => (new Response) - ->withDescription('Unauthenticated') + json_encode('500') => (new Response) + ->withDescription('Server Error') + ->withContent([ + 'application/json' => (new MediaType) + ->withExample( + (new Example) + ->withValue([ + 'message' => 'An error occurred during the search operation.', + ]) + ->generate() + ) + ->generate(), + ]) ->generate(), - ]) ) )->withParameters([ @@ -224,7 +320,7 @@ public function boot() (new Parameter) ->withName('limit') ->withIn('query') - ->withDescription('Number of results per page (default: 24)') + ->withDescription('Number of results per page') ->withSchema((new SchemaConcrete)->withType('integer')) ->withRequired(false), @@ -260,7 +356,8 @@ public function boot() ]) ), ] - )) + ) + ) ->withResponses( (new Responses) ->withDefault( @@ -275,12 +372,15 @@ public function boot() ->withSchema((new SchemaConcrete) ->withType('integer')), ]) - ->withDescription('Email verification successful and redirected')) + ->withDescription('Email verification successful and redirected') + ) ->withOthers([ json_encode('401') => (new Response) ->withDescription('Invalid/Expired URL provided') ->generate(), - ]))), + ]) + ) + ), '/api/auth/email/resend' => (new Path) ->withGet( @@ -292,13 +392,13 @@ public function boot() ->withDefault((new Response) ->withDescription('Email verification link sent to your email address') ->generate()) - )), + ) + ), ] : []) ); return $openAPI; }); - } } diff --git a/public/vendor/rest/openapi.json b/public/vendor/rest/openapi.json index 639c0d87..a639fa3b 100644 --- a/public/vendor/rest/openapi.json +++ b/public/vendor/rest/openapi.json @@ -1,2752 +1 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "coconut", - "summary": "COlleCtion of Open NatUral producTs", - "description": "A comprehensive platform facilitating natural product research by providing data, tools, and services for deposition, curation, and reuse.", - "contact": { - "name": "coconut", - "url": "https:\/\/coconut.naturalproducts.net\/", - "email": "info.coconut@uni-jena.de" - }, - "license": { - "name": "MIT", - "identifier": "MIT" - }, - "version": "2.0.0", - "termsOfService": "https:\/\/coconut.naturalproducts.net\/terms" - }, - "paths": { - "\/api\/molecules": { - "get": { - "tags": [ - "Molecules" - ], - "summary": "Get the resource detail", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "actions": [], - "instructions": [], - "scout_instructions": [], - "fields": [ - "standard_inchi", - "standard_inchi_key", - "canonical_smiles", - "sugar_free_smiles", - "identifier", - "name", - "cas", - "iupac_name", - "murko_framework", - "structural_comments", - "name_trust_level", - "annotation_level", - "variants_count", - "status", - "active", - "has_variants", - "has_stereo", - "is_tautomer", - "is_parent", - "is_placeholder" - ], - "scout_fields": [], - "limits": [ - 10, - 25, - 50 - ], - "scopes": [], - "relations": [ - { - "resource": "App\\Rest\\Resources\\PropertiesResource", - "relation": "properties", - "constraints": { - "required_on_creation": false, - "prohibited_on_creation": false, - "required_on_update": false, - "prohibited_on_update": false - }, - "name": "HasOne" - } - ], - "rules": { - "all": [], - "create": [], - "update": [] - } - } - } - } - } - } - }, - "description": "Get every detail about the resource according to the current user connected", - "security": [ - { - "sanctum": [] - } - ] - }, - "delete": { - "tags": [ - "Molecules" - ], - "summary": "Perform a destroy request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": [], - "meta": [] - } - } - } - } - }, - "description": "Delete database records using primary key", - "requestBody": { - "content": { - "application\/json": { - "example": { - "resources": [ - 1, - 5, - 6 - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/molecules\/search": { - "post": { - "tags": [ - "Molecules" - ], - "summary": "Perform a search request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": [], - "meta": [] - } - } - } - } - }, - "description": "Crunch the Api's data with multiple attributes", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "scopes": [], - "filters": [ - { - "field": "standard_inchi", - "operator": "=", - "value": "" - }, - { - "field": "standard_inchi_key", - "operator": "=", - "value": "" - }, - { - "field": "canonical_smiles", - "operator": "=", - "value": "" - }, - { - "field": "sugar_free_smiles", - "operator": "=", - "value": "" - }, - { - "field": "identifier", - "operator": "=", - "value": "" - }, - { - "field": "name", - "operator": "=", - "value": "" - }, - { - "field": "cas", - "operator": "=", - "value": "" - }, - { - "field": "iupac_name", - "operator": "=", - "value": "" - }, - { - "field": "murko_framework", - "operator": "=", - "value": "" - }, - { - "field": "structural_comments", - "operator": "=", - "value": "" - }, - { - "field": "name_trust_level", - "operator": "=", - "value": "" - }, - { - "field": "annotation_level", - "operator": "=", - "value": "" - }, - { - "field": "variants_count", - "operator": "=", - "value": "" - }, - { - "field": "status", - "operator": "=", - "value": "" - }, - { - "field": "active", - "operator": "=", - "value": "" - }, - { - "field": "has_variants", - "operator": "=", - "value": "" - }, - { - "field": "has_stereo", - "operator": "=", - "value": "" - }, - { - "field": "is_tautomer", - "operator": "=", - "value": "" - }, - { - "field": "is_parent", - "operator": "=", - "value": "" - }, - { - "field": "is_placeholder", - "operator": "=", - "value": "" - } - ], - "sorts": [ - { - "field": "standard_inchi", - "direction": "desc" - }, - { - "field": "standard_inchi_key", - "direction": "desc" - }, - { - "field": "canonical_smiles", - "direction": "desc" - }, - { - "field": "sugar_free_smiles", - "direction": "desc" - }, - { - "field": "identifier", - "direction": "desc" - }, - { - "field": "name", - "direction": "desc" - }, - { - "field": "cas", - "direction": "desc" - }, - { - "field": "iupac_name", - "direction": "desc" - }, - { - "field": "murko_framework", - "direction": "desc" - }, - { - "field": "structural_comments", - "direction": "desc" - }, - { - "field": "name_trust_level", - "direction": "desc" - }, - { - "field": "annotation_level", - "direction": "desc" - }, - { - "field": "variants_count", - "direction": "desc" - }, - { - "field": "status", - "direction": "desc" - }, - { - "field": "active", - "direction": "desc" - }, - { - "field": "has_variants", - "direction": "desc" - }, - { - "field": "has_stereo", - "direction": "desc" - }, - { - "field": "is_tautomer", - "direction": "desc" - }, - { - "field": "is_parent", - "direction": "desc" - }, - { - "field": "is_placeholder", - "direction": "desc" - } - ], - "selects": [ - { - "field": "standard_inchi" - }, - { - "field": "standard_inchi_key" - }, - { - "field": "canonical_smiles" - }, - { - "field": "sugar_free_smiles" - }, - { - "field": "identifier" - }, - { - "field": "name" - }, - { - "field": "cas" - }, - { - "field": "iupac_name" - }, - { - "field": "murko_framework" - }, - { - "field": "structural_comments" - }, - { - "field": "name_trust_level" - }, - { - "field": "annotation_level" - }, - { - "field": "variants_count" - }, - { - "field": "status" - }, - { - "field": "active" - }, - { - "field": "has_variants" - }, - { - "field": "has_stereo" - }, - { - "field": "is_tautomer" - }, - { - "field": "is_parent" - }, - { - "field": "is_placeholder" - } - ], - "includes": [ - { - "relation": "properties" - } - ], - "aggregates": [], - "instructions": [], - "gates": [ - "create", - "update", - "delete" - ], - "page": 1, - "limit": 10 - } - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/molecules\/mutate": { - "post": { - "tags": [ - "Molecules" - ], - "summary": "Perform a mutate request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "created": [ - 1 - ], - "updated": [ - 2, - 3 - ] - } - } - } - } - }, - "description": "Create \/ Modify the database data with multiple options", - "requestBody": { - "content": { - "application\/json": { - "example": { - "mutate": [ - { - "operation": "create", - "attributes": { - "standard_inchi": "", - "standard_inchi_key": "", - "canonical_smiles": "", - "sugar_free_smiles": "", - "identifier": "", - "name": "", - "cas": "", - "iupac_name": "", - "murko_framework": "", - "structural_comments": "", - "name_trust_level": "", - "annotation_level": "", - "variants_count": "", - "status": "", - "active": "", - "has_variants": "", - "has_stereo": "", - "is_tautomer": "", - "is_parent": "", - "is_placeholder": "" - }, - "relations": { - "properties": { - "operation": "update", - "key": 1 - } - } - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/molecules\/actions\/{action}": { - "parameters": { - "0": { - "name": "action", - "in": "path", - "description": "The action uriKey", - "required": true, - "schema": { - "type": "string" - } - }, - "security": [ - { - "sanctum": [] - } - ] - }, - "post": { - "tags": [ - "Molecules" - ], - "summary": "Perform an action request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "impacted": 2 - } - } - } - } - } - }, - "description": "Launch actions", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "filters": [ - { - "field": "has_received_welcome_notification", - "value": false - } - ] - }, - "fields": [ - { - "name": "expires_at", - "value": "2023-04-29" - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/collections": { - "get": { - "tags": [ - "Collections" - ], - "summary": "Get the resource detail", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "actions": [], - "instructions": [], - "scout_instructions": [], - "fields": [ - "title", - "description", - "identifier", - "url" - ], - "scout_fields": [], - "limits": [ - 10, - 25, - 50 - ], - "scopes": [], - "relations": [], - "rules": { - "all": [], - "create": [], - "update": [] - } - } - } - } - } - } - }, - "description": "Get every detail about the resource according to the current user connected", - "security": [ - { - "sanctum": [] - } - ] - }, - "delete": { - "tags": [ - "Collections" - ], - "summary": "Perform a destroy request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "title": "Quod adipisci autem.", - "description": "Explicabo aut amet et non. Sed vitae sit eveniet pariatur laboriosam. Minus est ut doloremque ullam et iure.", - "url": "http:\/\/homenick.org\/rerum-enim-exercitationem-dolores-qui.html", - "identifier": null - }, - "meta": [] - } - } - } - } - }, - "description": "Delete database records using primary key", - "requestBody": { - "content": { - "application\/json": { - "example": { - "resources": [ - 1, - 5, - 6 - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/collections\/search": { - "post": { - "tags": [ - "Collections" - ], - "summary": "Perform a search request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "title": "Quasi debitis debitis reiciendis debitis.", - "description": "Dolores ea dolorem perspiciatis ut. Minus aut odio doloribus est consequatur. Deserunt autem rem soluta molestiae magnam sint quia.", - "url": "https:\/\/thiel.com\/quidem-enim-nisi-officia-harum-itaque-sed.html", - "identifier": null - }, - "meta": [] - } - } - } - } - }, - "description": "Crunch the Api's data with multiple attributes", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "scopes": [], - "filters": [ - { - "field": "title", - "operator": "=", - "value": "" - }, - { - "field": "description", - "operator": "=", - "value": "" - }, - { - "field": "identifier", - "operator": "=", - "value": "" - }, - { - "field": "url", - "operator": "=", - "value": "" - } - ], - "sorts": [ - { - "field": "title", - "direction": "desc" - }, - { - "field": "description", - "direction": "desc" - }, - { - "field": "identifier", - "direction": "desc" - }, - { - "field": "url", - "direction": "desc" - } - ], - "selects": [ - { - "field": "title" - }, - { - "field": "description" - }, - { - "field": "identifier" - }, - { - "field": "url" - } - ], - "includes": [], - "aggregates": [], - "instructions": [], - "gates": [ - "create", - "update", - "delete" - ], - "page": 1, - "limit": 10 - } - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/collections\/mutate": { - "post": { - "tags": [ - "Collections" - ], - "summary": "Perform a mutate request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "created": [ - 1 - ], - "updated": [ - 2, - 3 - ] - } - } - } - } - }, - "description": "Create \/ Modify the database data with multiple options", - "requestBody": { - "content": { - "application\/json": { - "example": { - "mutate": [ - { - "operation": "create", - "attributes": { - "title": "", - "description": "", - "identifier": "", - "url": "" - }, - "relations": [] - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/collections\/actions\/{action}": { - "parameters": { - "0": { - "name": "action", - "in": "path", - "description": "The action uriKey", - "required": true, - "schema": { - "type": "string" - } - }, - "security": [ - { - "sanctum": [] - } - ] - }, - "post": { - "tags": [ - "Collections" - ], - "summary": "Perform an action request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "impacted": 2 - } - } - } - } - } - }, - "description": "Launch actions", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "filters": [ - { - "field": "has_received_welcome_notification", - "value": false - } - ] - }, - "fields": [ - { - "name": "expires_at", - "value": "2023-04-29" - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/citations": { - "get": { - "tags": [ - "Citations" - ], - "summary": "Get the resource detail", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "actions": [], - "instructions": [], - "scout_instructions": [], - "fields": [ - "doi", - "title", - "authors", - "citation_text" - ], - "scout_fields": [], - "limits": [ - 10, - 25, - 50 - ], - "scopes": [], - "relations": [], - "rules": { - "all": [], - "create": [], - "update": [] - } - } - } - } - } - } - }, - "description": "Get every detail about the resource according to the current user connected", - "security": [ - { - "sanctum": [] - } - ] - }, - "delete": { - "tags": [ - "Citations" - ], - "summary": "Perform a destroy request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "doi": "10.1016\/j.bioorg.2024.107699~20", - "title": "The potential of marine natural Products: Recent Advances in the discovery of Anti-Tuberculosis agents.", - "authors": "Peng X, Zeng Z, Hassan S, Xue Y.", - "citation_text": "" - }, - "meta": [] - } - } - } - } - }, - "description": "Delete database records using primary key", - "requestBody": { - "content": { - "application\/json": { - "example": { - "resources": [ - 1, - 5, - 6 - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/citations\/search": { - "post": { - "tags": [ - "Citations" - ], - "summary": "Perform a search request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "doi": "10.1021\/acsorginorgau.3c00040~38", - "title": "Natural Product Synthesis: The Endless Quest for Unreachable Perfection.", - "authors": "Fay N, Kouklovsky C, de la Torre A.", - "citation_text": "" - }, - "meta": [] - } - } - } - } - }, - "description": "Crunch the Api's data with multiple attributes", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "scopes": [], - "filters": [ - { - "field": "doi", - "operator": "=", - "value": "" - }, - { - "field": "title", - "operator": "=", - "value": "" - }, - { - "field": "authors", - "operator": "=", - "value": "" - }, - { - "field": "citation_text", - "operator": "=", - "value": "" - } - ], - "sorts": [ - { - "field": "doi", - "direction": "desc" - }, - { - "field": "title", - "direction": "desc" - }, - { - "field": "authors", - "direction": "desc" - }, - { - "field": "citation_text", - "direction": "desc" - } - ], - "selects": [ - { - "field": "doi" - }, - { - "field": "title" - }, - { - "field": "authors" - }, - { - "field": "citation_text" - } - ], - "includes": [], - "aggregates": [], - "instructions": [], - "gates": [ - "create", - "update", - "delete" - ], - "page": 1, - "limit": 10 - } - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/citations\/mutate": { - "post": { - "tags": [ - "Citations" - ], - "summary": "Perform a mutate request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "created": [ - 1 - ], - "updated": [ - 2, - 3 - ] - } - } - } - } - }, - "description": "Create \/ Modify the database data with multiple options", - "requestBody": { - "content": { - "application\/json": { - "example": { - "mutate": [ - { - "operation": "create", - "attributes": { - "doi": "", - "title": "", - "authors": "", - "citation_text": "" - }, - "relations": [] - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/citations\/actions\/{action}": { - "parameters": { - "0": { - "name": "action", - "in": "path", - "description": "The action uriKey", - "required": true, - "schema": { - "type": "string" - } - }, - "security": [ - { - "sanctum": [] - } - ] - }, - "post": { - "tags": [ - "Citations" - ], - "summary": "Perform an action request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "impacted": 2 - } - } - } - } - } - }, - "description": "Launch actions", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "filters": [ - { - "field": "has_received_welcome_notification", - "value": false - } - ] - }, - "fields": [ - { - "name": "expires_at", - "value": "2023-04-29" - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/organisms": { - "get": { - "tags": [ - "Organisms" - ], - "summary": "Get the resource detail", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "actions": [], - "instructions": [], - "scout_instructions": [], - "fields": [ - "name", - "iri", - "rank", - "molecule_count" - ], - "scout_fields": [], - "limits": [ - 10, - 25, - 50 - ], - "scopes": [], - "relations": [], - "rules": { - "all": [], - "create": [], - "update": [] - } - } - } - } - } - } - }, - "description": "Get every detail about the resource according to the current user connected", - "security": [ - { - "sanctum": [] - } - ] - }, - "delete": { - "tags": [ - "Organisms" - ], - "summary": "Perform a destroy request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": [], - "meta": [] - } - } - } - } - }, - "description": "Delete database records using primary key", - "requestBody": { - "content": { - "application\/json": { - "example": { - "resources": [ - 1, - 5, - 6 - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/organisms\/search": { - "post": { - "tags": [ - "Organisms" - ], - "summary": "Perform a search request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": [], - "meta": [] - } - } - } - } - }, - "description": "Crunch the Api's data with multiple attributes", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "scopes": [], - "filters": [ - { - "field": "name", - "operator": "=", - "value": "" - }, - { - "field": "iri", - "operator": "=", - "value": "" - }, - { - "field": "rank", - "operator": "=", - "value": "" - }, - { - "field": "molecule_count", - "operator": "=", - "value": "" - } - ], - "sorts": [ - { - "field": "name", - "direction": "desc" - }, - { - "field": "iri", - "direction": "desc" - }, - { - "field": "rank", - "direction": "desc" - }, - { - "field": "molecule_count", - "direction": "desc" - } - ], - "selects": [ - { - "field": "name" - }, - { - "field": "iri" - }, - { - "field": "rank" - }, - { - "field": "molecule_count" - } - ], - "includes": [], - "aggregates": [], - "instructions": [], - "gates": [ - "create", - "update", - "delete" - ], - "page": 1, - "limit": 10 - } - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/organisms\/mutate": { - "post": { - "tags": [ - "Organisms" - ], - "summary": "Perform a mutate request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "created": [ - 1 - ], - "updated": [ - 2, - 3 - ] - } - } - } - } - }, - "description": "Create \/ Modify the database data with multiple options", - "requestBody": { - "content": { - "application\/json": { - "example": { - "mutate": [ - { - "operation": "create", - "attributes": { - "name": "", - "iri": "", - "rank": "", - "molecule_count": "" - }, - "relations": [] - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/organisms\/actions\/{action}": { - "parameters": { - "0": { - "name": "action", - "in": "path", - "description": "The action uriKey", - "required": true, - "schema": { - "type": "string" - } - }, - "security": [ - { - "sanctum": [] - } - ] - }, - "post": { - "tags": [ - "Organisms" - ], - "summary": "Perform an action request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "impacted": 2 - } - } - } - } - } - }, - "description": "Launch actions", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "filters": [ - { - "field": "has_received_welcome_notification", - "value": false - } - ] - }, - "fields": [ - { - "name": "expires_at", - "value": "2023-04-29" - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/users": { - "get": { - "tags": [ - "Users" - ], - "summary": "Get the resource detail", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "actions": [], - "instructions": [], - "scout_instructions": [], - "fields": [ - "name", - "email" - ], - "scout_fields": [], - "limits": [ - 10, - 25, - 50 - ], - "scopes": [], - "relations": [], - "rules": { - "all": [], - "create": [], - "update": [] - } - } - } - } - } - } - }, - "description": "Get every detail about the resource according to the current user connected", - "security": [ - { - "sanctum": [] - } - ] - }, - "delete": { - "tags": [ - "Users" - ], - "summary": "Perform a destroy request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "name": "Dulce Wehner", - "email": "elwin.donnelly@example.org" - }, - "meta": [] - } - } - } - } - }, - "description": "Delete database records using primary key", - "requestBody": { - "content": { - "application\/json": { - "example": { - "resources": [ - 1, - 5, - 6 - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/users\/search": { - "post": { - "tags": [ - "Users" - ], - "summary": "Perform a search request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "name": "Eldora Effertz", - "email": "kali.blick@example.com" - }, - "meta": [] - } - } - } - } - }, - "description": "Crunch the Api's data with multiple attributes", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "scopes": [], - "filters": [ - { - "field": "name", - "operator": "=", - "value": "" - }, - { - "field": "email", - "operator": "=", - "value": "" - } - ], - "sorts": [ - { - "field": "name", - "direction": "desc" - }, - { - "field": "email", - "direction": "desc" - } - ], - "selects": [ - { - "field": "name" - }, - { - "field": "email" - } - ], - "includes": [], - "aggregates": [], - "instructions": [], - "gates": [ - "create", - "update", - "delete" - ], - "page": 1, - "limit": 10 - } - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/users\/mutate": { - "post": { - "tags": [ - "Users" - ], - "summary": "Perform a mutate request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "created": [ - 1 - ], - "updated": [ - 2, - 3 - ] - } - } - } - } - }, - "description": "Create \/ Modify the database data with multiple options", - "requestBody": { - "content": { - "application\/json": { - "example": { - "mutate": [ - { - "operation": "create", - "attributes": { - "name": "", - "email": "" - }, - "relations": [] - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/users\/actions\/{action}": { - "parameters": { - "0": { - "name": "action", - "in": "path", - "description": "The action uriKey", - "required": true, - "schema": { - "type": "string" - } - }, - "security": [ - { - "sanctum": [] - } - ] - }, - "post": { - "tags": [ - "Users" - ], - "summary": "Perform an action request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "impacted": 2 - } - } - } - } - } - }, - "description": "Launch actions", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "filters": [ - { - "field": "has_received_welcome_notification", - "value": false - } - ] - }, - "fields": [ - { - "name": "expires_at", - "value": "2023-04-29" - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/properties": { - "get": { - "tags": [ - "Properties" - ], - "summary": "Get the resource detail", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "actions": [], - "instructions": [], - "scout_instructions": [], - "fields": [ - "total_atom_count", - "heavy_atom_count", - "molecular_weight", - "exact_molecular_weight", - "molecular_formula", - "alogp", - "topological_polar_surface_area", - "rotatable_bond_count", - "hydrogen_bond_acceptors", - "hydrogen_bond_donors", - "hydrogen_bond_acceptors_lipinski", - "hydrogen_bond_donors_lipinski", - "lipinski_rule_of_five_violations", - "aromatic_rings_count", - "qed_drug_likeliness", - "formal_charge", - "fractioncsp3", - "number_of_minimal_rings", - "van_der_walls_volume", - "contains_sugar", - "contains_ring_sugars", - "contains_linear_sugars", - "murcko_framework", - "np_likeness", - "chemical_class", - "chemical_sub_class", - "chemical_super_class", - "direct_parent_classification", - "np_classifier_pathway", - "np_classifier_superclass", - "np_classifier_class", - "np_classifier_is_glycoside" - ], - "scout_fields": [], - "limits": [ - 10, - 25, - 50 - ], - "scopes": [], - "relations": [ - { - "resource": "App\\Rest\\Resources\\MoleculeResource", - "relation": "molecule", - "constraints": { - "required_on_creation": false, - "prohibited_on_creation": false, - "required_on_update": false, - "prohibited_on_update": false - }, - "name": "HasOne" - } - ], - "rules": { - "all": [], - "create": [], - "update": [] - } - } - } - } - } - } - }, - "description": "Get every detail about the resource according to the current user connected", - "security": [ - { - "sanctum": [] - } - ] - }, - "delete": { - "tags": [ - "Properties" - ], - "summary": "Perform a destroy request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": [], - "meta": [] - } - } - } - } - }, - "description": "Delete database records using primary key", - "requestBody": { - "content": { - "application\/json": { - "example": { - "resources": [ - 1, - 5, - 6 - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/properties\/search": { - "post": { - "tags": [ - "Properties" - ], - "summary": "Perform a search request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": [], - "meta": [] - } - } - } - } - }, - "description": "Crunch the Api's data with multiple attributes", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "scopes": [], - "filters": [ - { - "field": "total_atom_count", - "operator": "=", - "value": "" - }, - { - "field": "heavy_atom_count", - "operator": "=", - "value": "" - }, - { - "field": "molecular_weight", - "operator": "=", - "value": "" - }, - { - "field": "exact_molecular_weight", - "operator": "=", - "value": "" - }, - { - "field": "molecular_formula", - "operator": "=", - "value": "" - }, - { - "field": "alogp", - "operator": "=", - "value": "" - }, - { - "field": "topological_polar_surface_area", - "operator": "=", - "value": "" - }, - { - "field": "rotatable_bond_count", - "operator": "=", - "value": "" - }, - { - "field": "hydrogen_bond_acceptors", - "operator": "=", - "value": "" - }, - { - "field": "hydrogen_bond_donors", - "operator": "=", - "value": "" - }, - { - "field": "hydrogen_bond_acceptors_lipinski", - "operator": "=", - "value": "" - }, - { - "field": "hydrogen_bond_donors_lipinski", - "operator": "=", - "value": "" - }, - { - "field": "lipinski_rule_of_five_violations", - "operator": "=", - "value": "" - }, - { - "field": "aromatic_rings_count", - "operator": "=", - "value": "" - }, - { - "field": "qed_drug_likeliness", - "operator": "=", - "value": "" - }, - { - "field": "formal_charge", - "operator": "=", - "value": "" - }, - { - "field": "fractioncsp3", - "operator": "=", - "value": "" - }, - { - "field": "number_of_minimal_rings", - "operator": "=", - "value": "" - }, - { - "field": "van_der_walls_volume", - "operator": "=", - "value": "" - }, - { - "field": "contains_sugar", - "operator": "=", - "value": "" - }, - { - "field": "contains_ring_sugars", - "operator": "=", - "value": "" - }, - { - "field": "contains_linear_sugars", - "operator": "=", - "value": "" - }, - { - "field": "murcko_framework", - "operator": "=", - "value": "" - }, - { - "field": "np_likeness", - "operator": "=", - "value": "" - }, - { - "field": "chemical_class", - "operator": "=", - "value": "" - }, - { - "field": "chemical_sub_class", - "operator": "=", - "value": "" - }, - { - "field": "chemical_super_class", - "operator": "=", - "value": "" - }, - { - "field": "direct_parent_classification", - "operator": "=", - "value": "" - }, - { - "field": "np_classifier_pathway", - "operator": "=", - "value": "" - }, - { - "field": "np_classifier_superclass", - "operator": "=", - "value": "" - }, - { - "field": "np_classifier_class", - "operator": "=", - "value": "" - }, - { - "field": "np_classifier_is_glycoside", - "operator": "=", - "value": "" - } - ], - "sorts": [ - { - "field": "total_atom_count", - "direction": "desc" - }, - { - "field": "heavy_atom_count", - "direction": "desc" - }, - { - "field": "molecular_weight", - "direction": "desc" - }, - { - "field": "exact_molecular_weight", - "direction": "desc" - }, - { - "field": "molecular_formula", - "direction": "desc" - }, - { - "field": "alogp", - "direction": "desc" - }, - { - "field": "topological_polar_surface_area", - "direction": "desc" - }, - { - "field": "rotatable_bond_count", - "direction": "desc" - }, - { - "field": "hydrogen_bond_acceptors", - "direction": "desc" - }, - { - "field": "hydrogen_bond_donors", - "direction": "desc" - }, - { - "field": "hydrogen_bond_acceptors_lipinski", - "direction": "desc" - }, - { - "field": "hydrogen_bond_donors_lipinski", - "direction": "desc" - }, - { - "field": "lipinski_rule_of_five_violations", - "direction": "desc" - }, - { - "field": "aromatic_rings_count", - "direction": "desc" - }, - { - "field": "qed_drug_likeliness", - "direction": "desc" - }, - { - "field": "formal_charge", - "direction": "desc" - }, - { - "field": "fractioncsp3", - "direction": "desc" - }, - { - "field": "number_of_minimal_rings", - "direction": "desc" - }, - { - "field": "van_der_walls_volume", - "direction": "desc" - }, - { - "field": "contains_sugar", - "direction": "desc" - }, - { - "field": "contains_ring_sugars", - "direction": "desc" - }, - { - "field": "contains_linear_sugars", - "direction": "desc" - }, - { - "field": "murcko_framework", - "direction": "desc" - }, - { - "field": "np_likeness", - "direction": "desc" - }, - { - "field": "chemical_class", - "direction": "desc" - }, - { - "field": "chemical_sub_class", - "direction": "desc" - }, - { - "field": "chemical_super_class", - "direction": "desc" - }, - { - "field": "direct_parent_classification", - "direction": "desc" - }, - { - "field": "np_classifier_pathway", - "direction": "desc" - }, - { - "field": "np_classifier_superclass", - "direction": "desc" - }, - { - "field": "np_classifier_class", - "direction": "desc" - }, - { - "field": "np_classifier_is_glycoside", - "direction": "desc" - } - ], - "selects": [ - { - "field": "total_atom_count" - }, - { - "field": "heavy_atom_count" - }, - { - "field": "molecular_weight" - }, - { - "field": "exact_molecular_weight" - }, - { - "field": "molecular_formula" - }, - { - "field": "alogp" - }, - { - "field": "topological_polar_surface_area" - }, - { - "field": "rotatable_bond_count" - }, - { - "field": "hydrogen_bond_acceptors" - }, - { - "field": "hydrogen_bond_donors" - }, - { - "field": "hydrogen_bond_acceptors_lipinski" - }, - { - "field": "hydrogen_bond_donors_lipinski" - }, - { - "field": "lipinski_rule_of_five_violations" - }, - { - "field": "aromatic_rings_count" - }, - { - "field": "qed_drug_likeliness" - }, - { - "field": "formal_charge" - }, - { - "field": "fractioncsp3" - }, - { - "field": "number_of_minimal_rings" - }, - { - "field": "van_der_walls_volume" - }, - { - "field": "contains_sugar" - }, - { - "field": "contains_ring_sugars" - }, - { - "field": "contains_linear_sugars" - }, - { - "field": "murcko_framework" - }, - { - "field": "np_likeness" - }, - { - "field": "chemical_class" - }, - { - "field": "chemical_sub_class" - }, - { - "field": "chemical_super_class" - }, - { - "field": "direct_parent_classification" - }, - { - "field": "np_classifier_pathway" - }, - { - "field": "np_classifier_superclass" - }, - { - "field": "np_classifier_class" - }, - { - "field": "np_classifier_is_glycoside" - } - ], - "includes": [ - { - "relation": "molecule" - } - ], - "aggregates": [], - "instructions": [], - "gates": [ - "create", - "update", - "delete" - ], - "page": 1, - "limit": 10 - } - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/properties\/mutate": { - "post": { - "tags": [ - "Properties" - ], - "summary": "Perform a mutate request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "created": [ - 1 - ], - "updated": [ - 2, - 3 - ] - } - } - } - } - }, - "description": "Create \/ Modify the database data with multiple options", - "requestBody": { - "content": { - "application\/json": { - "example": { - "mutate": [ - { - "operation": "create", - "attributes": { - "total_atom_count": "", - "heavy_atom_count": "", - "molecular_weight": "", - "exact_molecular_weight": "", - "molecular_formula": "", - "alogp": "", - "topological_polar_surface_area": "", - "rotatable_bond_count": "", - "hydrogen_bond_acceptors": "", - "hydrogen_bond_donors": "", - "hydrogen_bond_acceptors_lipinski": "", - "hydrogen_bond_donors_lipinski": "", - "lipinski_rule_of_five_violations": "", - "aromatic_rings_count": "", - "qed_drug_likeliness": "", - "formal_charge": "", - "fractioncsp3": "", - "number_of_minimal_rings": "", - "van_der_walls_volume": "", - "contains_sugar": "", - "contains_ring_sugars": "", - "contains_linear_sugars": "", - "murcko_framework": "", - "np_likeness": "", - "chemical_class": "", - "chemical_sub_class": "", - "chemical_super_class": "", - "direct_parent_classification": "", - "np_classifier_pathway": "", - "np_classifier_superclass": "", - "np_classifier_class": "", - "np_classifier_is_glycoside": "" - }, - "relations": { - "molecule": { - "operation": "update", - "key": 1 - } - } - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/properties\/actions\/{action}": { - "parameters": { - "0": { - "name": "action", - "in": "path", - "description": "The action uriKey", - "required": true, - "schema": { - "type": "string" - } - }, - "security": [ - { - "sanctum": [] - } - ] - }, - "post": { - "tags": [ - "Properties" - ], - "summary": "Perform an action request", - "responses": { - "default": { - "description": "", - "content": { - "application\/json": { - "example": { - "data": { - "impacted": 2 - } - } - } - } - } - }, - "description": "Launch actions", - "requestBody": { - "content": { - "application\/json": { - "example": { - "search": { - "filters": [ - { - "field": "has_received_welcome_notification", - "value": false - } - ] - }, - "fields": [ - { - "name": "expires_at", - "value": "2023-04-29" - } - ] - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/auth\/login": { - "post": { - "tags": [ - "Authentication" - ], - "summary": "Login endpoint", - "responses": { - "default": { - "description": "Login successful", - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "access_token": { - "type": "string" - }, - "token_type": { - "type": "string" - } - } - } - } - } - } - }, - "requestBody": { - "content": { - "application\/json": { - "example": { - "email": "john@example.com", - "password": "password" - } - } - } - } - } - }, - "\/api\/auth\/logout": { - "get": { - "tags": [ - "Authentication" - ], - "summary": "Logout endpoint", - "responses": { - "default": { - "description": "Logout successful", - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "logout": { - "type": "string" - } - } - } - } - } - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - }, - "\/api\/auth\/register": { - "post": { - "tags": [ - "Authentication" - ], - "summary": "Register endpoint", - "responses": { - "default": { - "description": "Successfully created user", - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - }, - "message": { - "type": "string" - }, - "token": { - "type": "string" - } - } - } - } - } - } - }, - "requestBody": { - "content": { - "application\/json": { - "example": { - "first_name": "John", - "last_name": "Doe", - "username": "JDoe", - "affiliation": "JD", - "email": "john@example.com", - "password": "password", - "password_confirmation": "password" - } - } - } - } - } - }, - "\/api\/search": { - "parameters": { - "0": { - "name": "query", - "in": "query", - "description": "Search query string", - "required": false, - "schema": { - "type": "string" - } - }, - "1": { - "name": "sort", - "in": "query", - "description": "Sorting option", - "required": false, - "schema": { - "type": "string" - } - }, - "2": { - "name": "type", - "in": "query", - "description": "Type filter", - "required": false, - "schema": { - "type": "string" - } - }, - "3": { - "name": "tagType", - "in": "query", - "description": "Tag type filter", - "required": false, - "schema": { - "type": "string" - } - }, - "4": { - "name": "page", - "in": "query", - "description": "Page number for pagination", - "required": false, - "schema": { - "type": "integer" - } - }, - "5": { - "name": "limit", - "in": "query", - "description": "Number of results per page (default: 24)", - "required": false, - "schema": { - "type": "integer" - } - }, - "6": { - "name": "offset", - "in": "query", - "description": "Offset for pagination", - "required": false, - "schema": { - "type": "integer" - } - }, - "security": [ - { - "sanctum": [] - } - ] - }, - "get": { - "tags": [ - "Search" - ], - "summary": "Search endpoints", - "responses": { - "default": { - "description": "Search based on various query parameters", - "content": { - "application\/json": { - "schema": { - "type": "object", - "properties": { - "data": [] - } - } - } - } - }, - "\"401\"": { - "description": "Unauthenticated" - } - }, - "security": [ - { - "sanctum": [] - } - ] - } - } - }, - "servers": [ - { - "url": "\/", - "description": "The current server" - } - ], - "security": [], - "components": { - "securitySchemes": { - "sanctum": { - "scheme": "Bearer", - "in": "header", - "description": "Enter token in format (Bearer \\)", - "type": "apiKey", - "name": "Authorization" - } - } - } -} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"COCONUT","summary":"COlleCtion of Open NatUral producTs","description":"A comprehensive platform facilitating natural product research by providing data, tools, and services for deposition, curation, and reuse.","contact":{"name":"COCONUT","url":"https:\/\/coconut.naturalproducts.net\/","email":"info.coconut@uni-jena.de"},"license":{"name":"MIT","identifier":"MIT"},"version":"2.0.0","termsOfService":"https:\/\/coconut.naturalproducts.net\/terms"},"paths":{"\/api\/molecules":{"get":{"tags":["Molecules"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["standard_inchi","standard_inchi_key","canonical_smiles","sugar_free_smiles","identifier","name","cas","iupac_name","murko_framework","structural_comments","name_trust_level","annotation_level","variants_count","status","active","has_variants","has_stereo","is_tautomer","is_parent","is_placeholder"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[{"resource":"App\\Rest\\Resources\\PropertiesResource","relation":"properties","constraints":{"required_on_creation":false,"prohibited_on_creation":false,"required_on_update":false,"prohibited_on_update":false},"name":"HasOne"}],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Molecules"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/molecules\/search":{"post":{"tags":["Molecules"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"standard_inchi","operator":"=","value":""},{"field":"standard_inchi_key","operator":"=","value":""},{"field":"canonical_smiles","operator":"=","value":""},{"field":"sugar_free_smiles","operator":"=","value":""},{"field":"identifier","operator":"=","value":""},{"field":"name","operator":"=","value":""},{"field":"cas","operator":"=","value":""},{"field":"iupac_name","operator":"=","value":""},{"field":"murko_framework","operator":"=","value":""},{"field":"structural_comments","operator":"=","value":""},{"field":"name_trust_level","operator":"=","value":""},{"field":"annotation_level","operator":"=","value":""},{"field":"variants_count","operator":"=","value":""},{"field":"status","operator":"=","value":""},{"field":"active","operator":"=","value":""},{"field":"has_variants","operator":"=","value":""},{"field":"has_stereo","operator":"=","value":""},{"field":"is_tautomer","operator":"=","value":""},{"field":"is_parent","operator":"=","value":""},{"field":"is_placeholder","operator":"=","value":""}],"sorts":[{"field":"standard_inchi","direction":"desc"},{"field":"standard_inchi_key","direction":"desc"},{"field":"canonical_smiles","direction":"desc"},{"field":"sugar_free_smiles","direction":"desc"},{"field":"identifier","direction":"desc"},{"field":"name","direction":"desc"},{"field":"cas","direction":"desc"},{"field":"iupac_name","direction":"desc"},{"field":"murko_framework","direction":"desc"},{"field":"structural_comments","direction":"desc"},{"field":"name_trust_level","direction":"desc"},{"field":"annotation_level","direction":"desc"},{"field":"variants_count","direction":"desc"},{"field":"status","direction":"desc"},{"field":"active","direction":"desc"},{"field":"has_variants","direction":"desc"},{"field":"has_stereo","direction":"desc"},{"field":"is_tautomer","direction":"desc"},{"field":"is_parent","direction":"desc"},{"field":"is_placeholder","direction":"desc"}],"selects":[{"field":"standard_inchi"},{"field":"standard_inchi_key"},{"field":"canonical_smiles"},{"field":"sugar_free_smiles"},{"field":"identifier"},{"field":"name"},{"field":"cas"},{"field":"iupac_name"},{"field":"murko_framework"},{"field":"structural_comments"},{"field":"name_trust_level"},{"field":"annotation_level"},{"field":"variants_count"},{"field":"status"},{"field":"active"},{"field":"has_variants"},{"field":"has_stereo"},{"field":"is_tautomer"},{"field":"is_parent"},{"field":"is_placeholder"}],"includes":[{"relation":"properties"}],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/molecules\/mutate":{"post":{"tags":["Molecules"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"standard_inchi":"","standard_inchi_key":"","canonical_smiles":"","sugar_free_smiles":"","identifier":"","name":"","cas":"","iupac_name":"","murko_framework":"","structural_comments":"","name_trust_level":"","annotation_level":"","variants_count":"","status":"","active":"","has_variants":"","has_stereo":"","is_tautomer":"","is_parent":"","is_placeholder":""},"relations":{"properties":{"operation":"update","key":1}}}]}}}}}},"\/api\/molecules\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Molecules"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/collections":{"get":{"tags":["Collections"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["title","description","identifier","url"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Collections"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"title":"Nihil quasi ut ipsum.","description":"Et et quod at iure. Eius rerum doloribus corporis dolorem facilis. Corrupti eos enim enim incidunt nam commodi. Rerum enim quo inventore aut est.","url":"http:\/\/www.barton.net\/","identifier":"Quo consequatur odit vel unde voluptas et."},"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/collections\/search":{"post":{"tags":["Collections"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"title":"Est illum consequatur.","description":"Aut doloremque impedit perspiciatis adipisci qui maxime. Veniam et inventore in ut. Quasi aliquid adipisci et quaerat.","url":"https:\/\/www.williamson.com\/voluptas-quae-autem-quo-dolorem-natus-a","identifier":"Delectus iste facere quos sapiente iste nisi qui."},"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"title","operator":"=","value":""},{"field":"description","operator":"=","value":""},{"field":"identifier","operator":"=","value":""},{"field":"url","operator":"=","value":""}],"sorts":[{"field":"title","direction":"desc"},{"field":"description","direction":"desc"},{"field":"identifier","direction":"desc"},{"field":"url","direction":"desc"}],"selects":[{"field":"title"},{"field":"description"},{"field":"identifier"},{"field":"url"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/collections\/mutate":{"post":{"tags":["Collections"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"title":"","description":"","identifier":"","url":""},"relations":[]}]}}}}}},"\/api\/collections\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Collections"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/citations":{"get":{"tags":["Citations"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["doi","title","authors","citation_text"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Citations"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"doi":"10.1039\/c5sc00360a~34","title":"Chemical assay-guided natural product isolation via<\/i> solid-supported chemodosimetric fluorescent probe.","authors":"Jeon H, Lim C, Lee JM, Kim S.","citation_text":""},"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/citations\/search":{"post":{"tags":["Citations"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"doi":"10.1016\/j.ejogrb.2024.09.028~4","title":"An illustrated review on herbal medicine used for the treatment of female infertility.","authors":"Masjedi M, Izadi Y, Montahaei T, Mohammadi R, Ali Helforoush M, Rohani Rad K.","citation_text":""},"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"doi","operator":"=","value":""},{"field":"title","operator":"=","value":""},{"field":"authors","operator":"=","value":""},{"field":"citation_text","operator":"=","value":""}],"sorts":[{"field":"doi","direction":"desc"},{"field":"title","direction":"desc"},{"field":"authors","direction":"desc"},{"field":"citation_text","direction":"desc"}],"selects":[{"field":"doi"},{"field":"title"},{"field":"authors"},{"field":"citation_text"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/citations\/mutate":{"post":{"tags":["Citations"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"doi":"","title":"","authors":"","citation_text":""},"relations":[]}]}}}}}},"\/api\/citations\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Citations"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/organisms":{"get":{"tags":["Organisms"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["name","iri","rank","molecule_count"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Organisms"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/organisms\/search":{"post":{"tags":["Organisms"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"name","operator":"=","value":""},{"field":"iri","operator":"=","value":""},{"field":"rank","operator":"=","value":""},{"field":"molecule_count","operator":"=","value":""}],"sorts":[{"field":"name","direction":"desc"},{"field":"iri","direction":"desc"},{"field":"rank","direction":"desc"},{"field":"molecule_count","direction":"desc"}],"selects":[{"field":"name"},{"field":"iri"},{"field":"rank"},{"field":"molecule_count"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/organisms\/mutate":{"post":{"tags":["Organisms"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"name":"","iri":"","rank":"","molecule_count":""},"relations":[]}]}}}}}},"\/api\/organisms\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Organisms"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/users":{"get":{"tags":["Users"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["name","email"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Users"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"name":"Jalen Schaden","email":"helen.gerhold@example.org"},"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/users\/search":{"post":{"tags":["Users"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"name":"Otho Mertz","email":"lferry@example.com"},"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"name","operator":"=","value":""},{"field":"email","operator":"=","value":""}],"sorts":[{"field":"name","direction":"desc"},{"field":"email","direction":"desc"}],"selects":[{"field":"name"},{"field":"email"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/users\/mutate":{"post":{"tags":["Users"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"name":"","email":""},"relations":[]}]}}}}}},"\/api\/users\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Users"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/properties":{"get":{"tags":["Properties"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["total_atom_count","heavy_atom_count","molecular_weight","exact_molecular_weight","molecular_formula","alogp","topological_polar_surface_area","rotatable_bond_count","hydrogen_bond_acceptors","hydrogen_bond_donors","hydrogen_bond_acceptors_lipinski","hydrogen_bond_donors_lipinski","lipinski_rule_of_five_violations","aromatic_rings_count","qed_drug_likeliness","formal_charge","fractioncsp3","number_of_minimal_rings","van_der_walls_volume","contains_sugar","contains_ring_sugars","contains_linear_sugars","murcko_framework","np_likeness","chemical_class","chemical_sub_class","chemical_super_class","direct_parent_classification","np_classifier_pathway","np_classifier_superclass","np_classifier_class","np_classifier_is_glycoside"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[{"resource":"App\\Rest\\Resources\\MoleculeResource","relation":"molecule","constraints":{"required_on_creation":false,"prohibited_on_creation":false,"required_on_update":false,"prohibited_on_update":false},"name":"HasOne"}],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Properties"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/properties\/search":{"post":{"tags":["Properties"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"total_atom_count","operator":"=","value":""},{"field":"heavy_atom_count","operator":"=","value":""},{"field":"molecular_weight","operator":"=","value":""},{"field":"exact_molecular_weight","operator":"=","value":""},{"field":"molecular_formula","operator":"=","value":""},{"field":"alogp","operator":"=","value":""},{"field":"topological_polar_surface_area","operator":"=","value":""},{"field":"rotatable_bond_count","operator":"=","value":""},{"field":"hydrogen_bond_acceptors","operator":"=","value":""},{"field":"hydrogen_bond_donors","operator":"=","value":""},{"field":"hydrogen_bond_acceptors_lipinski","operator":"=","value":""},{"field":"hydrogen_bond_donors_lipinski","operator":"=","value":""},{"field":"lipinski_rule_of_five_violations","operator":"=","value":""},{"field":"aromatic_rings_count","operator":"=","value":""},{"field":"qed_drug_likeliness","operator":"=","value":""},{"field":"formal_charge","operator":"=","value":""},{"field":"fractioncsp3","operator":"=","value":""},{"field":"number_of_minimal_rings","operator":"=","value":""},{"field":"van_der_walls_volume","operator":"=","value":""},{"field":"contains_sugar","operator":"=","value":""},{"field":"contains_ring_sugars","operator":"=","value":""},{"field":"contains_linear_sugars","operator":"=","value":""},{"field":"murcko_framework","operator":"=","value":""},{"field":"np_likeness","operator":"=","value":""},{"field":"chemical_class","operator":"=","value":""},{"field":"chemical_sub_class","operator":"=","value":""},{"field":"chemical_super_class","operator":"=","value":""},{"field":"direct_parent_classification","operator":"=","value":""},{"field":"np_classifier_pathway","operator":"=","value":""},{"field":"np_classifier_superclass","operator":"=","value":""},{"field":"np_classifier_class","operator":"=","value":""},{"field":"np_classifier_is_glycoside","operator":"=","value":""}],"sorts":[{"field":"total_atom_count","direction":"desc"},{"field":"heavy_atom_count","direction":"desc"},{"field":"molecular_weight","direction":"desc"},{"field":"exact_molecular_weight","direction":"desc"},{"field":"molecular_formula","direction":"desc"},{"field":"alogp","direction":"desc"},{"field":"topological_polar_surface_area","direction":"desc"},{"field":"rotatable_bond_count","direction":"desc"},{"field":"hydrogen_bond_acceptors","direction":"desc"},{"field":"hydrogen_bond_donors","direction":"desc"},{"field":"hydrogen_bond_acceptors_lipinski","direction":"desc"},{"field":"hydrogen_bond_donors_lipinski","direction":"desc"},{"field":"lipinski_rule_of_five_violations","direction":"desc"},{"field":"aromatic_rings_count","direction":"desc"},{"field":"qed_drug_likeliness","direction":"desc"},{"field":"formal_charge","direction":"desc"},{"field":"fractioncsp3","direction":"desc"},{"field":"number_of_minimal_rings","direction":"desc"},{"field":"van_der_walls_volume","direction":"desc"},{"field":"contains_sugar","direction":"desc"},{"field":"contains_ring_sugars","direction":"desc"},{"field":"contains_linear_sugars","direction":"desc"},{"field":"murcko_framework","direction":"desc"},{"field":"np_likeness","direction":"desc"},{"field":"chemical_class","direction":"desc"},{"field":"chemical_sub_class","direction":"desc"},{"field":"chemical_super_class","direction":"desc"},{"field":"direct_parent_classification","direction":"desc"},{"field":"np_classifier_pathway","direction":"desc"},{"field":"np_classifier_superclass","direction":"desc"},{"field":"np_classifier_class","direction":"desc"},{"field":"np_classifier_is_glycoside","direction":"desc"}],"selects":[{"field":"total_atom_count"},{"field":"heavy_atom_count"},{"field":"molecular_weight"},{"field":"exact_molecular_weight"},{"field":"molecular_formula"},{"field":"alogp"},{"field":"topological_polar_surface_area"},{"field":"rotatable_bond_count"},{"field":"hydrogen_bond_acceptors"},{"field":"hydrogen_bond_donors"},{"field":"hydrogen_bond_acceptors_lipinski"},{"field":"hydrogen_bond_donors_lipinski"},{"field":"lipinski_rule_of_five_violations"},{"field":"aromatic_rings_count"},{"field":"qed_drug_likeliness"},{"field":"formal_charge"},{"field":"fractioncsp3"},{"field":"number_of_minimal_rings"},{"field":"van_der_walls_volume"},{"field":"contains_sugar"},{"field":"contains_ring_sugars"},{"field":"contains_linear_sugars"},{"field":"murcko_framework"},{"field":"np_likeness"},{"field":"chemical_class"},{"field":"chemical_sub_class"},{"field":"chemical_super_class"},{"field":"direct_parent_classification"},{"field":"np_classifier_pathway"},{"field":"np_classifier_superclass"},{"field":"np_classifier_class"},{"field":"np_classifier_is_glycoside"}],"includes":[{"relation":"molecule"}],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/properties\/mutate":{"post":{"tags":["Properties"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"total_atom_count":"","heavy_atom_count":"","molecular_weight":"","exact_molecular_weight":"","molecular_formula":"","alogp":"","topological_polar_surface_area":"","rotatable_bond_count":"","hydrogen_bond_acceptors":"","hydrogen_bond_donors":"","hydrogen_bond_acceptors_lipinski":"","hydrogen_bond_donors_lipinski":"","lipinski_rule_of_five_violations":"","aromatic_rings_count":"","qed_drug_likeliness":"","formal_charge":"","fractioncsp3":"","number_of_minimal_rings":"","van_der_walls_volume":"","contains_sugar":"","contains_ring_sugars":"","contains_linear_sugars":"","murcko_framework":"","np_likeness":"","chemical_class":"","chemical_sub_class":"","chemical_super_class":"","direct_parent_classification":"","np_classifier_pathway":"","np_classifier_superclass":"","np_classifier_class":"","np_classifier_is_glycoside":""},"relations":{"molecule":{"operation":"update","key":1}}}]}}}}}},"\/api\/properties\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Properties"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/auth\/login":{"post":{"tags":["Authentication"],"summary":"Login endpoint","responses":{"default":{"description":"Login successful","content":{"application\/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"}}}}}}},"requestBody":{"content":{"application\/json":{"example":{"email":"john@example.com","password":"password"}}}}}},"\/api\/auth\/logout":{"get":{"tags":["Authentication"],"summary":"Logout endpoint","responses":{"default":{"description":"Logout successful","content":{"application\/json":{"schema":{"type":"object","properties":{"logout":{"type":"string"}}}}}}}}},"\/api\/auth\/register":{"post":{"tags":["Authentication"],"summary":"Register endpoint","responses":{"default":{"description":"Successfully created user","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"token":{"type":"string"}}}}}}},"requestBody":{"content":{"application\/json":{"example":{"first_name":"John","last_name":"Doe","username":"JDoe","affiliation":"JD","email":"john@example.com","password":"password","password_confirmation":"password"}}}}}},"\/api\/search":{"parameters":[{"name":"query","in":"query","description":"Search query string","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"Sorting option","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Type filter","required":false,"schema":{"type":"string"}},{"name":"tagType","in":"query","description":"Tag type filter","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Number of results per page","required":false,"schema":{"type":"integer"}},{"name":"offset","in":"query","description":"Offset for pagination","required":false,"schema":{"type":"integer"}}],"post":{"tags":["Advanced Search"],"summary":"Advanced Molecule Search","responses":{"default":{"description":"Example queries:\\n1. Range query: \/search?type=filters&q=tac:4..6\\n2. Multiple conditions: \/search?type=filters&q=tac:4..6 mw:100..200\\n3. Boolean query: \/search?type=filters&q=cs:true\\n4. Database query: \/search?type=filters&q=ds:pubchem|chembl\\n5. Complex query: \/search?type=filters&q=tac:4..6 cs:true OR mw:100..200","content":{"application\/json":{"example":{"data":[{"identifier":"CNP0000001","name":"Example Molecule","molecular_formula":"C4H10","total_atom_count":5,"annotation_level":3}],"current_page":1,"total":100,"per_page":24}}}},"\"500\"":{"description":"Server Error","content":{"application\/json":{"example":{"message":"An error occurred during the search operation."}}}}},"description":"Advanced search using filters. Support the following filters:\n\nMolecular Properties:\n- tac: Total Atom Count (range: 1 to 1071)\n- hac: Heavy Atom Count (range: 0 to 551)\n- mw: Molecular Weight (range: 5.01 to 7860.71)\n- emw: Exact Molecular Weight (range: 1.00728 to 7855.66038)\n- mrc: Number of Minimal Rings (range: 0 to 51)\n- vdwv: Van der Walls Volume (range: 10.14 to 5177.31)\n- fc: Formal Charge (range: -8 to 7)\n\nChemical Properties:\n- alogp: ALogP (range: -82.67 to 67.03)\n- topopsa: Topological Polar Surface Area (range: 0.00 to 3453.72)\n- fcsp3: Fraction CSP3 (range: 0.00 to 1.00)\n- np: NP Likeness (range: -3.53 to 4.12)\n- qed: QED Drug Likeliness (range: 0.00 to 0.95)\n\nStructural Features:\n- rbc: Rotatable Bond Count (range: 0 to 224)\n- arc: Aromatic Rings Count (range: 0 to 31)\n- hba: Hydrogen Bond Acceptors (range: 0 to 191)\n- hbd: Hydrogen Bond Donors (range: 0 to 116)\n\nLipinski Parameters:\n- lhba: Lipinski H-Bond Acceptors (range: 0 to 191)\n- lhbd: Lipinski H-Bond Donors (range: 0 to 116)\n- lro5v: Lipinski Rule of 5 Violations (range: 0 to 4)\n\nSugar-Related Properties:\n- cs: Contains Sugar (true\/false)\n- crs: Contains Ring Sugars (true\/false)\n- cls: Contains Linear Sugars (true\/false)\n\nClassifications:\n- class: Chemical Class (e.g., 1,2-diaryl-2-propen-1-ols)\n- subclass: Chemical Sub Class (e.g., 1,1'-azonaphthalenes)\n- superclass: Chemical Super Class (e.g., Acetylides)\n- parent: Direct Parent Classification (e.g., 1,1'-azonaphthalenes)\n\nNatural Product Classifications:\n- np_pathway: NP Classifier Pathway (e.g., Amino acids and Peptides)\n- np_superclass: NP Classifier Superclass (e.g., Aminosugars and aminoglycosides)\n- np_class: NP Classifier Class (e.g., 2-arylbenzofurans)\n- np_glycoside: NP Classifier Is Glycoside (true\/false)\n\nUsage Examples:\n1. Range query: type=filters&q=tac:4..6\n2. Boolean query: type=filters&q=cs:true\n3. Classification query: type=filters&q=class:1,2-diaryl-2-propen-1-ols\n4. Multiple conditions: type=filters&q=tac:4..6 mw:100..200\n5. Complex query: type=filters&q=tac:4..6 cs:true OR mw:100..200","requestBody":{"content":{"application\/json":{"example":{"type":"filters","query":"tac:4..6","limit":20,"sort":"desc","page":1,"offset":0}}}}}}},"servers":[{"url":"\/","description":"The current server"}],"security":[],"components":{"securitySchemes":{"sanctum":{"scheme":"Bearer","in":"header","flows":[],"description":"Enter token in format (Bearer \\)","type":"apiKey","name":"Authorization","openIdConnectUrl":""}}}} \ No newline at end of file diff --git a/routes/api.php b/routes/api.php index 5d2922e3..da41633b 100644 --- a/routes/api.php +++ b/routes/api.php @@ -36,7 +36,7 @@ }); }); -Route::get('search', [\App\Http\Controllers\API\SearchController::class, 'search'])->name('api.search'); +Route::post('search', [\App\Http\Controllers\API\SearchController::class, 'search'])->name('api.search'); Route::middleware(['auth:sanctum', 'verified'])->group(function () { Rest::resource('molecules', \App\Rest\Controllers\MoleculesController::class); From 3a57e6037f2f7d91b2424c1c6cd5e41de8419979 Mon Sep 17 00:00:00 2001 From: Sagar Date: Sun, 19 Jan 2025 21:52:04 +0100 Subject: [PATCH 3/4] fix: replaced query with get to fix empty parameters --- app/Http/Controllers/API/SearchController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/API/SearchController.php b/app/Http/Controllers/API/SearchController.php index 8034d6d5..9e0a096e 100644 --- a/app/Http/Controllers/API/SearchController.php +++ b/app/Http/Controllers/API/SearchController.php @@ -13,12 +13,12 @@ public function search(Request $request, SearchMolecule $search) { $query = $request->get('query'); - $sort = $request->query('sort'); + $sort = $request->get('sort'); $type = $request->get('type') ? $request->get('type') : null; $tagType = $request->get('tagType') ? $request->get('tagType') : null; - $page = $request->query('page'); + $page = $request->get('page'); - $limit = $request->query('limit'); + $limit = $request->get('limit'); $limit = $limit ? $limit : 24; $results = []; From 4783c8237bc4a6123a53237434ca9dfdf797fad3 Mon Sep 17 00:00:00 2001 From: Sagar Date: Mon, 20 Jan 2025 15:50:28 +0100 Subject: [PATCH 4/4] fix: advanced search based on citations, organisms and collections is now available. --- app/Actions/Coconut/SearchMolecule.php | 17 +- app/Livewire/Search.php | 3 - .../RestDocumentationServiceProvider.php | 157 ++++++++++++------ public/vendor/rest/openapi.json | 2 +- 4 files changed, 112 insertions(+), 67 deletions(-) diff --git a/app/Actions/Coconut/SearchMolecule.php b/app/Actions/Coconut/SearchMolecule.php index 697b63be..e7f374c1 100644 --- a/app/Actions/Coconut/SearchMolecule.php +++ b/app/Actions/Coconut/SearchMolecule.php @@ -78,7 +78,7 @@ public function query($query, $size, $type, $sort, $tagType, $page) } } - return [$results, $this->collection, $this->organisms]; + return [$results, $this->collection, $this->organisms, $this->citations]; } catch (QueryException $exception) { return $this->handleException($exception); @@ -202,7 +202,7 @@ private function buildTagsStatement($offset) $query_organisms = array_map('strtolower', array_map('trim', explode(',', $this->query))); $this->organisms = Organism::where(function ($query) use ($query_organisms) { foreach ($query_organisms as $name) { - $query->orWhereRaw('LOWER(name) LIKE ?', ['%'.strtolower($name).'%']); + $query->orWhereRaw('name ILIKE ?', ['%'.$name.'%']); } })->get(); $organismIds = $this->organisms->pluck('id'); @@ -211,13 +211,14 @@ private function buildTagsStatement($offset) $query->whereIn('organism_id', $organismIds); })->where('active', true)->where('is_parent', false)->orderBy('annotation_level', 'DESC')->paginate($this->size); } elseif ($this->tagType == 'citations') { - $this->citations = array_map('strtolower', array_map('trim', explode(',', $this->query))); - $citationIds = Citation::where(function ($query) { - foreach ($this->citations as $name) { - $query->orWhereRaw('LOWER(doi) LIKE ?', ['%'.strtolower($name).'%']) - ->orWhereRaw('LOWER(title) LIKE ?', ['%'.strtolower($name).'%']); + $query_citations = array_map('strtolower', array_map('trim', explode(',', $this->query))); + $this->citations = Citation::where(function ($query) use ($query_citations) { + foreach ($query_citations as $name) { + $query->orWhereRaw('doi ILIKE ?', ['%'.$name.'%']) + ->orWhereRaw('title ILIKE ?', ['%'.$name.'%']); } - })->pluck('id'); + })->get(); + $citationIds = $this->citations->pluck('id'); return Molecule::whereHas('citations', function ($query) use ($citationIds) { $query->whereIn('citation_id', $citationIds); diff --git a/app/Livewire/Search.php b/app/Livewire/Search.php index d5a1bf5c..4ff35796 100644 --- a/app/Livewire/Search.php +++ b/app/Livewire/Search.php @@ -98,9 +98,6 @@ public function render(SearchMolecule $search) $this->collection = $results[1]; $this->organisms = $results[2]; - $this->collection = $results[1]; - $this->organisms = $results[2]; - return view('livewire.search', [ 'molecules' => $results[0], ]); diff --git a/app/Providers/RestDocumentationServiceProvider.php b/app/Providers/RestDocumentationServiceProvider.php index 9b010e70..d2320564 100644 --- a/app/Providers/RestDocumentationServiceProvider.php +++ b/app/Providers/RestDocumentationServiceProvider.php @@ -166,50 +166,98 @@ public function boot() ->withPost( (new Operation) ->withSummary('Advanced Molecule Search') - ->withDescription("Advanced search using filters. Support the following filters:\n\n". - "Molecular Properties:\n". - "- tac: Total Atom Count (range: 1 to 1071)\n". - "- hac: Heavy Atom Count (range: 0 to 551)\n". - "- mw: Molecular Weight (range: 5.01 to 7860.71)\n". - "- emw: Exact Molecular Weight (range: 1.00728 to 7855.66038)\n". - "- mrc: Number of Minimal Rings (range: 0 to 51)\n". - "- vdwv: Van der Walls Volume (range: 10.14 to 5177.31)\n". - "- fc: Formal Charge (range: -8 to 7)\n". - "\nChemical Properties:\n". - "- alogp: ALogP (range: -82.67 to 67.03)\n". - "- topopsa: Topological Polar Surface Area (range: 0.00 to 3453.72)\n". - "- fcsp3: Fraction CSP3 (range: 0.00 to 1.00)\n". - "- np: NP Likeness (range: -3.53 to 4.12)\n". - "- qed: QED Drug Likeliness (range: 0.00 to 0.95)\n". - "\nStructural Features:\n". - "- rbc: Rotatable Bond Count (range: 0 to 224)\n". - "- arc: Aromatic Rings Count (range: 0 to 31)\n". - "- hba: Hydrogen Bond Acceptors (range: 0 to 191)\n". - "- hbd: Hydrogen Bond Donors (range: 0 to 116)\n". - "\nLipinski Parameters:\n". - "- lhba: Lipinski H-Bond Acceptors (range: 0 to 191)\n". - "- lhbd: Lipinski H-Bond Donors (range: 0 to 116)\n". - "- lro5v: Lipinski Rule of 5 Violations (range: 0 to 4)\n". - "\nSugar-Related Properties:\n". - "- cs: Contains Sugar (true/false)\n". - "- crs: Contains Ring Sugars (true/false)\n". - "- cls: Contains Linear Sugars (true/false)\n". - "\nClassifications:\n". - "- class: Chemical Class (e.g., 1,2-diaryl-2-propen-1-ols)\n". - "- subclass: Chemical Sub Class (e.g., 1,1'-azonaphthalenes)\n". - "- superclass: Chemical Super Class (e.g., Acetylides)\n". - "- parent: Direct Parent Classification (e.g., 1,1'-azonaphthalenes)\n". - "\nNatural Product Classifications:\n". - "- np_pathway: NP Classifier Pathway (e.g., Amino acids and Peptides)\n". - "- np_superclass: NP Classifier Superclass (e.g., Aminosugars and aminoglycosides)\n". - "- np_class: NP Classifier Class (e.g., 2-arylbenzofurans)\n". - "- np_glycoside: NP Classifier Is Glycoside (true/false)\n". - "\nUsage Examples:\n". - "1. Range query: type=filters&q=tac:4..6\n". - "2. Boolean query: type=filters&q=cs:true\n". - "3. Classification query: type=filters&q=class:1,2-diaryl-2-propen-1-ols\n". - "4. Multiple conditions: type=filters&q=tac:4..6 mw:100..200\n". - '5. Complex query: type=filters&q=tac:4..6 cs:true OR mw:100..200') + ->withDescription( + "# Advanced Molecule Search\n\n". + "Advanced search supports searching for molecules based on complex criteria.\n\n". + + "## 1. Tag-Based Search (type=tags)\n". + "Search molecules based on the following tag types:\n\n". + "* **dataSource**: Search by collection title\n". + " - Example: `type=tags, tagType=dataSource, query=collection_name`\n\n". + "* **organisms**: Search by organism names (comma-separated)\n". + " - Example: `type=tags, tagType=organisms, query=organism_name1,organism_name2`\n\n". + "* **citations**: Search by DOI or title (comma-separated)\n". + " - Example: `type=tags, tagType=citations, query=doi1,doi2,title1,title2`\n\n". + + "## 2. Filter-Based Search (type=filters)\n\n". + "### Molecular Properties\n". + "* `tac`: Total Atom Count (1-1071)\n". + "* `hac`: Heavy Atom Count (0-551)\n". + "* `mw`: Molecular Weight (5.01-7860.71)\n". + "* `emw`: Exact Molecular Weight (1.00728-7855.66038)\n". + "* `mrc`: Number of Minimal Rings (0-51)\n". + "* `vdwv`: Van der Walls Volume (10.14-5177.31)\n". + "* `fc`: Formal Charge (-8 to 7)\n\n". + + "### Chemical Properties\n". + "* `alogp`: ALogP (-82.67 to 67.03)\n". + "* `topopsa`: Topological Polar Surface Area (0.00-3453.72)\n". + "* `fcsp3`: Fraction CSP3 (0.00-1.00)\n". + "* `np`: NP Likeness (-3.53 to 4.12)\n". + "* `qed`: QED Drug Likeliness (0.00-0.95)\n\n". + + "### Structural Features\n". + "* `rbc`: Rotatable Bond Count (0-224)\n". + "* `arc`: Aromatic Rings Count (0-31)\n". + "* `hba`: Hydrogen Bond Acceptors (0-191)\n". + "* `hbd`: Hydrogen Bond Donors (0-116)\n\n". + + "### Lipinski Parameters\n". + "* `lhba`: Lipinski H-Bond Acceptors (0-191)\n". + "* `lhbd`: Lipinski H-Bond Donors (0-116)\n". + "* `lro5v`: Lipinski Rule of 5 Violations (0-4)\n\n". + + "### Sugar-Related Properties\n". + "* `cs`: Contains Sugar (true/false)\n". + "* `crs`: Contains Ring Sugars (true/false)\n". + "* `cls`: Contains Linear Sugars (true/false)\n\n". + + "### Classyfire Classifications\n". + "* `class`: Chemical Class\n". + " - Example: 1,2-diaryl-2-propen-1-ols\n". + "* `subclass`: Chemical Sub Class\n". + " - Example: 1,1'-azonaphthalenes\n". + "* `superclass`: Chemical Super Class\n". + " - Example: Acetylides\n". + "* `parent`: Direct Parent Classification\n". + " - Example: 1,1'-azonaphthalenes\n\n". + + "### Natural Product Classifications\n". + "* `np_pathway`: NP Classifier Pathway\n". + " - Example: Amino acids and Peptides\n". + "* `np_superclass`: NP Classifier Superclass\n". + " - Example: Aminosugars and aminoglycosides\n". + "* `np_class`: NP Classifier Class\n". + " - Example: 2-arylbenzofurans\n". + "* `np_glycoside`: NP Classifier Is Glycoside (true/false)\n\n". + + "### Filter Query Examples\n". + "* Range query:\n". + " ```\n". + " type=filters&q=tac:4..6\n". + " ```\n". + "* Boolean query:\n". + " ```\n". + " type=filters&q=cs:true\n". + " ```\n". + "* Classification query:\n". + " ```\n". + " type=filters&q=class:1,2-diaryl-2-propen-1-ols\n". + " ```\n". + "* Multiple conditions:\n". + " ```\n". + " type=filters&q=tac:4..6 mw:100..200\n". + " ```\n". + "* Complex query with OR:\n". + " ```\n". + " type=filters&q=tac:4..6 cs:true OR mw:100..200\n". + " ```\n\n". + + "## 3. Basic Search (type not specified)\n". + "Search molecules by name, SMILES, InChI, or InChI Key.\n\n". + "* Simply provide the search term in the query parameter\n". + "* Example: `query=caffeine`\n" + ) ->withTags(['Advanced Search']) ->withRequestBody( (new RequestBody) @@ -219,6 +267,7 @@ public function boot() (new Example) ->withValue([ 'type' => 'filters', + 'tagType' => '', 'query' => 'tac:4..6', 'limit' => 20, 'sort' => 'desc', @@ -242,11 +291,15 @@ public function boot() ->withValue([ 'data' => [ [ - 'identifier' => 'CNP0000001', - 'name' => 'Example Molecule', - 'molecular_formula' => 'C4H10', - 'total_atom_count' => 5, - 'annotation_level' => 3, + 'identifier' => 'CNP0228556.0', + 'canonical_smiles' => 'CN1C(=O)C2=C(N=CN2C)N(C)C1=O', + 'annotation_level' => 5, + 'name' => 'caffeine', + 'iupac_name' => '1,3,7-trimethylpurine-2,6-dione', + 'organism_count' => 135, + 'citation_count' => 12, + 'geo_count' => 3, + 'collection_count' => 31, ], ], 'current_page' => 1, @@ -257,12 +310,6 @@ public function boot() ) ->generate(), ]) - ->withDescription('Example queries:\n'. - '1. Range query: /search?type=filters&q=tac:4..6\n'. - '2. Multiple conditions: /search?type=filters&q=tac:4..6 mw:100..200\n'. - '3. Boolean query: /search?type=filters&q=cs:true\n'. - '4. Database query: /search?type=filters&q=ds:pubchem|chembl\n'. - '5. Complex query: /search?type=filters&q=tac:4..6 cs:true OR mw:100..200') ) ->withOthers([ json_encode('500') => (new Response) diff --git a/public/vendor/rest/openapi.json b/public/vendor/rest/openapi.json index a639fa3b..50fab74e 100644 --- a/public/vendor/rest/openapi.json +++ b/public/vendor/rest/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"COCONUT","summary":"COlleCtion of Open NatUral producTs","description":"A comprehensive platform facilitating natural product research by providing data, tools, and services for deposition, curation, and reuse.","contact":{"name":"COCONUT","url":"https:\/\/coconut.naturalproducts.net\/","email":"info.coconut@uni-jena.de"},"license":{"name":"MIT","identifier":"MIT"},"version":"2.0.0","termsOfService":"https:\/\/coconut.naturalproducts.net\/terms"},"paths":{"\/api\/molecules":{"get":{"tags":["Molecules"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["standard_inchi","standard_inchi_key","canonical_smiles","sugar_free_smiles","identifier","name","cas","iupac_name","murko_framework","structural_comments","name_trust_level","annotation_level","variants_count","status","active","has_variants","has_stereo","is_tautomer","is_parent","is_placeholder"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[{"resource":"App\\Rest\\Resources\\PropertiesResource","relation":"properties","constraints":{"required_on_creation":false,"prohibited_on_creation":false,"required_on_update":false,"prohibited_on_update":false},"name":"HasOne"}],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Molecules"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/molecules\/search":{"post":{"tags":["Molecules"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"standard_inchi","operator":"=","value":""},{"field":"standard_inchi_key","operator":"=","value":""},{"field":"canonical_smiles","operator":"=","value":""},{"field":"sugar_free_smiles","operator":"=","value":""},{"field":"identifier","operator":"=","value":""},{"field":"name","operator":"=","value":""},{"field":"cas","operator":"=","value":""},{"field":"iupac_name","operator":"=","value":""},{"field":"murko_framework","operator":"=","value":""},{"field":"structural_comments","operator":"=","value":""},{"field":"name_trust_level","operator":"=","value":""},{"field":"annotation_level","operator":"=","value":""},{"field":"variants_count","operator":"=","value":""},{"field":"status","operator":"=","value":""},{"field":"active","operator":"=","value":""},{"field":"has_variants","operator":"=","value":""},{"field":"has_stereo","operator":"=","value":""},{"field":"is_tautomer","operator":"=","value":""},{"field":"is_parent","operator":"=","value":""},{"field":"is_placeholder","operator":"=","value":""}],"sorts":[{"field":"standard_inchi","direction":"desc"},{"field":"standard_inchi_key","direction":"desc"},{"field":"canonical_smiles","direction":"desc"},{"field":"sugar_free_smiles","direction":"desc"},{"field":"identifier","direction":"desc"},{"field":"name","direction":"desc"},{"field":"cas","direction":"desc"},{"field":"iupac_name","direction":"desc"},{"field":"murko_framework","direction":"desc"},{"field":"structural_comments","direction":"desc"},{"field":"name_trust_level","direction":"desc"},{"field":"annotation_level","direction":"desc"},{"field":"variants_count","direction":"desc"},{"field":"status","direction":"desc"},{"field":"active","direction":"desc"},{"field":"has_variants","direction":"desc"},{"field":"has_stereo","direction":"desc"},{"field":"is_tautomer","direction":"desc"},{"field":"is_parent","direction":"desc"},{"field":"is_placeholder","direction":"desc"}],"selects":[{"field":"standard_inchi"},{"field":"standard_inchi_key"},{"field":"canonical_smiles"},{"field":"sugar_free_smiles"},{"field":"identifier"},{"field":"name"},{"field":"cas"},{"field":"iupac_name"},{"field":"murko_framework"},{"field":"structural_comments"},{"field":"name_trust_level"},{"field":"annotation_level"},{"field":"variants_count"},{"field":"status"},{"field":"active"},{"field":"has_variants"},{"field":"has_stereo"},{"field":"is_tautomer"},{"field":"is_parent"},{"field":"is_placeholder"}],"includes":[{"relation":"properties"}],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/molecules\/mutate":{"post":{"tags":["Molecules"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"standard_inchi":"","standard_inchi_key":"","canonical_smiles":"","sugar_free_smiles":"","identifier":"","name":"","cas":"","iupac_name":"","murko_framework":"","structural_comments":"","name_trust_level":"","annotation_level":"","variants_count":"","status":"","active":"","has_variants":"","has_stereo":"","is_tautomer":"","is_parent":"","is_placeholder":""},"relations":{"properties":{"operation":"update","key":1}}}]}}}}}},"\/api\/molecules\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Molecules"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/collections":{"get":{"tags":["Collections"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["title","description","identifier","url"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Collections"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"title":"Nihil quasi ut ipsum.","description":"Et et quod at iure. Eius rerum doloribus corporis dolorem facilis. Corrupti eos enim enim incidunt nam commodi. Rerum enim quo inventore aut est.","url":"http:\/\/www.barton.net\/","identifier":"Quo consequatur odit vel unde voluptas et."},"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/collections\/search":{"post":{"tags":["Collections"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"title":"Est illum consequatur.","description":"Aut doloremque impedit perspiciatis adipisci qui maxime. Veniam et inventore in ut. Quasi aliquid adipisci et quaerat.","url":"https:\/\/www.williamson.com\/voluptas-quae-autem-quo-dolorem-natus-a","identifier":"Delectus iste facere quos sapiente iste nisi qui."},"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"title","operator":"=","value":""},{"field":"description","operator":"=","value":""},{"field":"identifier","operator":"=","value":""},{"field":"url","operator":"=","value":""}],"sorts":[{"field":"title","direction":"desc"},{"field":"description","direction":"desc"},{"field":"identifier","direction":"desc"},{"field":"url","direction":"desc"}],"selects":[{"field":"title"},{"field":"description"},{"field":"identifier"},{"field":"url"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/collections\/mutate":{"post":{"tags":["Collections"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"title":"","description":"","identifier":"","url":""},"relations":[]}]}}}}}},"\/api\/collections\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Collections"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/citations":{"get":{"tags":["Citations"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["doi","title","authors","citation_text"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Citations"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"doi":"10.1039\/c5sc00360a~34","title":"Chemical assay-guided natural product isolation via<\/i> solid-supported chemodosimetric fluorescent probe.","authors":"Jeon H, Lim C, Lee JM, Kim S.","citation_text":""},"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/citations\/search":{"post":{"tags":["Citations"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"doi":"10.1016\/j.ejogrb.2024.09.028~4","title":"An illustrated review on herbal medicine used for the treatment of female infertility.","authors":"Masjedi M, Izadi Y, Montahaei T, Mohammadi R, Ali Helforoush M, Rohani Rad K.","citation_text":""},"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"doi","operator":"=","value":""},{"field":"title","operator":"=","value":""},{"field":"authors","operator":"=","value":""},{"field":"citation_text","operator":"=","value":""}],"sorts":[{"field":"doi","direction":"desc"},{"field":"title","direction":"desc"},{"field":"authors","direction":"desc"},{"field":"citation_text","direction":"desc"}],"selects":[{"field":"doi"},{"field":"title"},{"field":"authors"},{"field":"citation_text"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/citations\/mutate":{"post":{"tags":["Citations"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"doi":"","title":"","authors":"","citation_text":""},"relations":[]}]}}}}}},"\/api\/citations\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Citations"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/organisms":{"get":{"tags":["Organisms"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["name","iri","rank","molecule_count"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Organisms"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/organisms\/search":{"post":{"tags":["Organisms"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"name","operator":"=","value":""},{"field":"iri","operator":"=","value":""},{"field":"rank","operator":"=","value":""},{"field":"molecule_count","operator":"=","value":""}],"sorts":[{"field":"name","direction":"desc"},{"field":"iri","direction":"desc"},{"field":"rank","direction":"desc"},{"field":"molecule_count","direction":"desc"}],"selects":[{"field":"name"},{"field":"iri"},{"field":"rank"},{"field":"molecule_count"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/organisms\/mutate":{"post":{"tags":["Organisms"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"name":"","iri":"","rank":"","molecule_count":""},"relations":[]}]}}}}}},"\/api\/organisms\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Organisms"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/users":{"get":{"tags":["Users"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["name","email"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Users"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"name":"Jalen Schaden","email":"helen.gerhold@example.org"},"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/users\/search":{"post":{"tags":["Users"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"name":"Otho Mertz","email":"lferry@example.com"},"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"name","operator":"=","value":""},{"field":"email","operator":"=","value":""}],"sorts":[{"field":"name","direction":"desc"},{"field":"email","direction":"desc"}],"selects":[{"field":"name"},{"field":"email"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/users\/mutate":{"post":{"tags":["Users"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"name":"","email":""},"relations":[]}]}}}}}},"\/api\/users\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Users"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/properties":{"get":{"tags":["Properties"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["total_atom_count","heavy_atom_count","molecular_weight","exact_molecular_weight","molecular_formula","alogp","topological_polar_surface_area","rotatable_bond_count","hydrogen_bond_acceptors","hydrogen_bond_donors","hydrogen_bond_acceptors_lipinski","hydrogen_bond_donors_lipinski","lipinski_rule_of_five_violations","aromatic_rings_count","qed_drug_likeliness","formal_charge","fractioncsp3","number_of_minimal_rings","van_der_walls_volume","contains_sugar","contains_ring_sugars","contains_linear_sugars","murcko_framework","np_likeness","chemical_class","chemical_sub_class","chemical_super_class","direct_parent_classification","np_classifier_pathway","np_classifier_superclass","np_classifier_class","np_classifier_is_glycoside"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[{"resource":"App\\Rest\\Resources\\MoleculeResource","relation":"molecule","constraints":{"required_on_creation":false,"prohibited_on_creation":false,"required_on_update":false,"prohibited_on_update":false},"name":"HasOne"}],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Properties"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/properties\/search":{"post":{"tags":["Properties"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"total_atom_count","operator":"=","value":""},{"field":"heavy_atom_count","operator":"=","value":""},{"field":"molecular_weight","operator":"=","value":""},{"field":"exact_molecular_weight","operator":"=","value":""},{"field":"molecular_formula","operator":"=","value":""},{"field":"alogp","operator":"=","value":""},{"field":"topological_polar_surface_area","operator":"=","value":""},{"field":"rotatable_bond_count","operator":"=","value":""},{"field":"hydrogen_bond_acceptors","operator":"=","value":""},{"field":"hydrogen_bond_donors","operator":"=","value":""},{"field":"hydrogen_bond_acceptors_lipinski","operator":"=","value":""},{"field":"hydrogen_bond_donors_lipinski","operator":"=","value":""},{"field":"lipinski_rule_of_five_violations","operator":"=","value":""},{"field":"aromatic_rings_count","operator":"=","value":""},{"field":"qed_drug_likeliness","operator":"=","value":""},{"field":"formal_charge","operator":"=","value":""},{"field":"fractioncsp3","operator":"=","value":""},{"field":"number_of_minimal_rings","operator":"=","value":""},{"field":"van_der_walls_volume","operator":"=","value":""},{"field":"contains_sugar","operator":"=","value":""},{"field":"contains_ring_sugars","operator":"=","value":""},{"field":"contains_linear_sugars","operator":"=","value":""},{"field":"murcko_framework","operator":"=","value":""},{"field":"np_likeness","operator":"=","value":""},{"field":"chemical_class","operator":"=","value":""},{"field":"chemical_sub_class","operator":"=","value":""},{"field":"chemical_super_class","operator":"=","value":""},{"field":"direct_parent_classification","operator":"=","value":""},{"field":"np_classifier_pathway","operator":"=","value":""},{"field":"np_classifier_superclass","operator":"=","value":""},{"field":"np_classifier_class","operator":"=","value":""},{"field":"np_classifier_is_glycoside","operator":"=","value":""}],"sorts":[{"field":"total_atom_count","direction":"desc"},{"field":"heavy_atom_count","direction":"desc"},{"field":"molecular_weight","direction":"desc"},{"field":"exact_molecular_weight","direction":"desc"},{"field":"molecular_formula","direction":"desc"},{"field":"alogp","direction":"desc"},{"field":"topological_polar_surface_area","direction":"desc"},{"field":"rotatable_bond_count","direction":"desc"},{"field":"hydrogen_bond_acceptors","direction":"desc"},{"field":"hydrogen_bond_donors","direction":"desc"},{"field":"hydrogen_bond_acceptors_lipinski","direction":"desc"},{"field":"hydrogen_bond_donors_lipinski","direction":"desc"},{"field":"lipinski_rule_of_five_violations","direction":"desc"},{"field":"aromatic_rings_count","direction":"desc"},{"field":"qed_drug_likeliness","direction":"desc"},{"field":"formal_charge","direction":"desc"},{"field":"fractioncsp3","direction":"desc"},{"field":"number_of_minimal_rings","direction":"desc"},{"field":"van_der_walls_volume","direction":"desc"},{"field":"contains_sugar","direction":"desc"},{"field":"contains_ring_sugars","direction":"desc"},{"field":"contains_linear_sugars","direction":"desc"},{"field":"murcko_framework","direction":"desc"},{"field":"np_likeness","direction":"desc"},{"field":"chemical_class","direction":"desc"},{"field":"chemical_sub_class","direction":"desc"},{"field":"chemical_super_class","direction":"desc"},{"field":"direct_parent_classification","direction":"desc"},{"field":"np_classifier_pathway","direction":"desc"},{"field":"np_classifier_superclass","direction":"desc"},{"field":"np_classifier_class","direction":"desc"},{"field":"np_classifier_is_glycoside","direction":"desc"}],"selects":[{"field":"total_atom_count"},{"field":"heavy_atom_count"},{"field":"molecular_weight"},{"field":"exact_molecular_weight"},{"field":"molecular_formula"},{"field":"alogp"},{"field":"topological_polar_surface_area"},{"field":"rotatable_bond_count"},{"field":"hydrogen_bond_acceptors"},{"field":"hydrogen_bond_donors"},{"field":"hydrogen_bond_acceptors_lipinski"},{"field":"hydrogen_bond_donors_lipinski"},{"field":"lipinski_rule_of_five_violations"},{"field":"aromatic_rings_count"},{"field":"qed_drug_likeliness"},{"field":"formal_charge"},{"field":"fractioncsp3"},{"field":"number_of_minimal_rings"},{"field":"van_der_walls_volume"},{"field":"contains_sugar"},{"field":"contains_ring_sugars"},{"field":"contains_linear_sugars"},{"field":"murcko_framework"},{"field":"np_likeness"},{"field":"chemical_class"},{"field":"chemical_sub_class"},{"field":"chemical_super_class"},{"field":"direct_parent_classification"},{"field":"np_classifier_pathway"},{"field":"np_classifier_superclass"},{"field":"np_classifier_class"},{"field":"np_classifier_is_glycoside"}],"includes":[{"relation":"molecule"}],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/properties\/mutate":{"post":{"tags":["Properties"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"total_atom_count":"","heavy_atom_count":"","molecular_weight":"","exact_molecular_weight":"","molecular_formula":"","alogp":"","topological_polar_surface_area":"","rotatable_bond_count":"","hydrogen_bond_acceptors":"","hydrogen_bond_donors":"","hydrogen_bond_acceptors_lipinski":"","hydrogen_bond_donors_lipinski":"","lipinski_rule_of_five_violations":"","aromatic_rings_count":"","qed_drug_likeliness":"","formal_charge":"","fractioncsp3":"","number_of_minimal_rings":"","van_der_walls_volume":"","contains_sugar":"","contains_ring_sugars":"","contains_linear_sugars":"","murcko_framework":"","np_likeness":"","chemical_class":"","chemical_sub_class":"","chemical_super_class":"","direct_parent_classification":"","np_classifier_pathway":"","np_classifier_superclass":"","np_classifier_class":"","np_classifier_is_glycoside":""},"relations":{"molecule":{"operation":"update","key":1}}}]}}}}}},"\/api\/properties\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Properties"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/auth\/login":{"post":{"tags":["Authentication"],"summary":"Login endpoint","responses":{"default":{"description":"Login successful","content":{"application\/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"}}}}}}},"requestBody":{"content":{"application\/json":{"example":{"email":"john@example.com","password":"password"}}}}}},"\/api\/auth\/logout":{"get":{"tags":["Authentication"],"summary":"Logout endpoint","responses":{"default":{"description":"Logout successful","content":{"application\/json":{"schema":{"type":"object","properties":{"logout":{"type":"string"}}}}}}}}},"\/api\/auth\/register":{"post":{"tags":["Authentication"],"summary":"Register endpoint","responses":{"default":{"description":"Successfully created user","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"token":{"type":"string"}}}}}}},"requestBody":{"content":{"application\/json":{"example":{"first_name":"John","last_name":"Doe","username":"JDoe","affiliation":"JD","email":"john@example.com","password":"password","password_confirmation":"password"}}}}}},"\/api\/search":{"parameters":[{"name":"query","in":"query","description":"Search query string","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"Sorting option","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Type filter","required":false,"schema":{"type":"string"}},{"name":"tagType","in":"query","description":"Tag type filter","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Number of results per page","required":false,"schema":{"type":"integer"}},{"name":"offset","in":"query","description":"Offset for pagination","required":false,"schema":{"type":"integer"}}],"post":{"tags":["Advanced Search"],"summary":"Advanced Molecule Search","responses":{"default":{"description":"Example queries:\\n1. Range query: \/search?type=filters&q=tac:4..6\\n2. Multiple conditions: \/search?type=filters&q=tac:4..6 mw:100..200\\n3. Boolean query: \/search?type=filters&q=cs:true\\n4. Database query: \/search?type=filters&q=ds:pubchem|chembl\\n5. Complex query: \/search?type=filters&q=tac:4..6 cs:true OR mw:100..200","content":{"application\/json":{"example":{"data":[{"identifier":"CNP0000001","name":"Example Molecule","molecular_formula":"C4H10","total_atom_count":5,"annotation_level":3}],"current_page":1,"total":100,"per_page":24}}}},"\"500\"":{"description":"Server Error","content":{"application\/json":{"example":{"message":"An error occurred during the search operation."}}}}},"description":"Advanced search using filters. Support the following filters:\n\nMolecular Properties:\n- tac: Total Atom Count (range: 1 to 1071)\n- hac: Heavy Atom Count (range: 0 to 551)\n- mw: Molecular Weight (range: 5.01 to 7860.71)\n- emw: Exact Molecular Weight (range: 1.00728 to 7855.66038)\n- mrc: Number of Minimal Rings (range: 0 to 51)\n- vdwv: Van der Walls Volume (range: 10.14 to 5177.31)\n- fc: Formal Charge (range: -8 to 7)\n\nChemical Properties:\n- alogp: ALogP (range: -82.67 to 67.03)\n- topopsa: Topological Polar Surface Area (range: 0.00 to 3453.72)\n- fcsp3: Fraction CSP3 (range: 0.00 to 1.00)\n- np: NP Likeness (range: -3.53 to 4.12)\n- qed: QED Drug Likeliness (range: 0.00 to 0.95)\n\nStructural Features:\n- rbc: Rotatable Bond Count (range: 0 to 224)\n- arc: Aromatic Rings Count (range: 0 to 31)\n- hba: Hydrogen Bond Acceptors (range: 0 to 191)\n- hbd: Hydrogen Bond Donors (range: 0 to 116)\n\nLipinski Parameters:\n- lhba: Lipinski H-Bond Acceptors (range: 0 to 191)\n- lhbd: Lipinski H-Bond Donors (range: 0 to 116)\n- lro5v: Lipinski Rule of 5 Violations (range: 0 to 4)\n\nSugar-Related Properties:\n- cs: Contains Sugar (true\/false)\n- crs: Contains Ring Sugars (true\/false)\n- cls: Contains Linear Sugars (true\/false)\n\nClassifications:\n- class: Chemical Class (e.g., 1,2-diaryl-2-propen-1-ols)\n- subclass: Chemical Sub Class (e.g., 1,1'-azonaphthalenes)\n- superclass: Chemical Super Class (e.g., Acetylides)\n- parent: Direct Parent Classification (e.g., 1,1'-azonaphthalenes)\n\nNatural Product Classifications:\n- np_pathway: NP Classifier Pathway (e.g., Amino acids and Peptides)\n- np_superclass: NP Classifier Superclass (e.g., Aminosugars and aminoglycosides)\n- np_class: NP Classifier Class (e.g., 2-arylbenzofurans)\n- np_glycoside: NP Classifier Is Glycoside (true\/false)\n\nUsage Examples:\n1. Range query: type=filters&q=tac:4..6\n2. Boolean query: type=filters&q=cs:true\n3. Classification query: type=filters&q=class:1,2-diaryl-2-propen-1-ols\n4. Multiple conditions: type=filters&q=tac:4..6 mw:100..200\n5. Complex query: type=filters&q=tac:4..6 cs:true OR mw:100..200","requestBody":{"content":{"application\/json":{"example":{"type":"filters","query":"tac:4..6","limit":20,"sort":"desc","page":1,"offset":0}}}}}}},"servers":[{"url":"\/","description":"The current server"}],"security":[],"components":{"securitySchemes":{"sanctum":{"scheme":"Bearer","in":"header","flows":[],"description":"Enter token in format (Bearer \\)","type":"apiKey","name":"Authorization","openIdConnectUrl":""}}}} \ No newline at end of file +{"openapi":"3.1.0","info":{"title":"COCONUT","summary":"COlleCtion of Open NatUral producTs","description":"A comprehensive platform facilitating natural product research by providing data, tools, and services for deposition, curation, and reuse.","contact":{"name":"COCONUT","url":"https:\/\/coconut.naturalproducts.net\/","email":"info.coconut@uni-jena.de"},"license":{"name":"MIT","identifier":"MIT"},"version":"2.0.0","termsOfService":"https:\/\/coconut.naturalproducts.net\/terms"},"paths":{"\/api\/molecules":{"get":{"tags":["Molecules"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["standard_inchi","standard_inchi_key","canonical_smiles","sugar_free_smiles","identifier","name","cas","iupac_name","murko_framework","structural_comments","name_trust_level","annotation_level","variants_count","status","active","has_variants","has_stereo","is_tautomer","is_parent","is_placeholder"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[{"resource":"App\\Rest\\Resources\\PropertiesResource","relation":"properties","constraints":{"required_on_creation":false,"prohibited_on_creation":false,"required_on_update":false,"prohibited_on_update":false},"name":"HasOne"}],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Molecules"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/molecules\/search":{"post":{"tags":["Molecules"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"standard_inchi","operator":"=","value":""},{"field":"standard_inchi_key","operator":"=","value":""},{"field":"canonical_smiles","operator":"=","value":""},{"field":"sugar_free_smiles","operator":"=","value":""},{"field":"identifier","operator":"=","value":""},{"field":"name","operator":"=","value":""},{"field":"cas","operator":"=","value":""},{"field":"iupac_name","operator":"=","value":""},{"field":"murko_framework","operator":"=","value":""},{"field":"structural_comments","operator":"=","value":""},{"field":"name_trust_level","operator":"=","value":""},{"field":"annotation_level","operator":"=","value":""},{"field":"variants_count","operator":"=","value":""},{"field":"status","operator":"=","value":""},{"field":"active","operator":"=","value":""},{"field":"has_variants","operator":"=","value":""},{"field":"has_stereo","operator":"=","value":""},{"field":"is_tautomer","operator":"=","value":""},{"field":"is_parent","operator":"=","value":""},{"field":"is_placeholder","operator":"=","value":""}],"sorts":[{"field":"standard_inchi","direction":"desc"},{"field":"standard_inchi_key","direction":"desc"},{"field":"canonical_smiles","direction":"desc"},{"field":"sugar_free_smiles","direction":"desc"},{"field":"identifier","direction":"desc"},{"field":"name","direction":"desc"},{"field":"cas","direction":"desc"},{"field":"iupac_name","direction":"desc"},{"field":"murko_framework","direction":"desc"},{"field":"structural_comments","direction":"desc"},{"field":"name_trust_level","direction":"desc"},{"field":"annotation_level","direction":"desc"},{"field":"variants_count","direction":"desc"},{"field":"status","direction":"desc"},{"field":"active","direction":"desc"},{"field":"has_variants","direction":"desc"},{"field":"has_stereo","direction":"desc"},{"field":"is_tautomer","direction":"desc"},{"field":"is_parent","direction":"desc"},{"field":"is_placeholder","direction":"desc"}],"selects":[{"field":"standard_inchi"},{"field":"standard_inchi_key"},{"field":"canonical_smiles"},{"field":"sugar_free_smiles"},{"field":"identifier"},{"field":"name"},{"field":"cas"},{"field":"iupac_name"},{"field":"murko_framework"},{"field":"structural_comments"},{"field":"name_trust_level"},{"field":"annotation_level"},{"field":"variants_count"},{"field":"status"},{"field":"active"},{"field":"has_variants"},{"field":"has_stereo"},{"field":"is_tautomer"},{"field":"is_parent"},{"field":"is_placeholder"}],"includes":[{"relation":"properties"}],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/molecules\/mutate":{"post":{"tags":["Molecules"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"standard_inchi":"","standard_inchi_key":"","canonical_smiles":"","sugar_free_smiles":"","identifier":"","name":"","cas":"","iupac_name":"","murko_framework":"","structural_comments":"","name_trust_level":"","annotation_level":"","variants_count":"","status":"","active":"","has_variants":"","has_stereo":"","is_tautomer":"","is_parent":"","is_placeholder":""},"relations":{"properties":{"operation":"update","key":1}}}]}}}}}},"\/api\/molecules\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Molecules"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/collections":{"get":{"tags":["Collections"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["title","description","identifier","url"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Collections"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"title":"Et laborum voluptatem adipisci et qui.","description":"Odio asperiores eos ea officia et vitae sed. Itaque beatae libero quos delectus amet. Similique vel culpa a assumenda porro et. Sed quis eum voluptatem quidem.","url":"http:\/\/www.wiegand.com\/dolore-dolor-id-minus","identifier":null},"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/collections\/search":{"post":{"tags":["Collections"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"title":"Qui molestiae id quaerat itaque.","description":"Nemo cum debitis ut rerum qui. Dignissimos soluta distinctio rerum vel voluptatem est.","url":"http:\/\/www.lubowitz.net\/","identifier":null},"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"title","operator":"=","value":""},{"field":"description","operator":"=","value":""},{"field":"identifier","operator":"=","value":""},{"field":"url","operator":"=","value":""}],"sorts":[{"field":"title","direction":"desc"},{"field":"description","direction":"desc"},{"field":"identifier","direction":"desc"},{"field":"url","direction":"desc"}],"selects":[{"field":"title"},{"field":"description"},{"field":"identifier"},{"field":"url"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/collections\/mutate":{"post":{"tags":["Collections"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"title":"","description":"","identifier":"","url":""},"relations":[]}]}}}}}},"\/api\/collections\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Collections"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/citations":{"get":{"tags":["Citations"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["doi","title","authors","citation_text"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Citations"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"doi":"10.21203\/rs.3.rs-5291992\/v1~51","title":"Integration of Traditional Medicine Services into Public Health Centers in Indonesia: A Qualitative Study","authors":"Yuniarsih SM, Padmawati RS, Madyaningrum E, Widhow SS, Mahendradhata Y.","citation_text":""},"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/citations\/search":{"post":{"tags":["Citations"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"doi":"10.2174\/0118715265320593241007095952~25","title":"Herbal Medicine for the Management of Wounds: A Systematic Review of Clinical Studies.","authors":"Ahmed LA, Hussain A, Barbhuiya PA, Zaman S, Laskar AM, Pathak MP, Dutta PP, Sen S.","citation_text":""},"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"doi","operator":"=","value":""},{"field":"title","operator":"=","value":""},{"field":"authors","operator":"=","value":""},{"field":"citation_text","operator":"=","value":""}],"sorts":[{"field":"doi","direction":"desc"},{"field":"title","direction":"desc"},{"field":"authors","direction":"desc"},{"field":"citation_text","direction":"desc"}],"selects":[{"field":"doi"},{"field":"title"},{"field":"authors"},{"field":"citation_text"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/citations\/mutate":{"post":{"tags":["Citations"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"doi":"","title":"","authors":"","citation_text":""},"relations":[]}]}}}}}},"\/api\/citations\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Citations"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/organisms":{"get":{"tags":["Organisms"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["name","iri","rank","molecule_count"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Organisms"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/organisms\/search":{"post":{"tags":["Organisms"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"name","operator":"=","value":""},{"field":"iri","operator":"=","value":""},{"field":"rank","operator":"=","value":""},{"field":"molecule_count","operator":"=","value":""}],"sorts":[{"field":"name","direction":"desc"},{"field":"iri","direction":"desc"},{"field":"rank","direction":"desc"},{"field":"molecule_count","direction":"desc"}],"selects":[{"field":"name"},{"field":"iri"},{"field":"rank"},{"field":"molecule_count"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/organisms\/mutate":{"post":{"tags":["Organisms"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"name":"","iri":"","rank":"","molecule_count":""},"relations":[]}]}}}}}},"\/api\/organisms\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Organisms"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/users":{"get":{"tags":["Users"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["name","email"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Users"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"name":"Owen Hoppe","email":"heidenreich.roderick@example.net"},"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/users\/search":{"post":{"tags":["Users"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"name":"Therese Paucek PhD","email":"minerva.schuppe@example.org"},"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"name","operator":"=","value":""},{"field":"email","operator":"=","value":""}],"sorts":[{"field":"name","direction":"desc"},{"field":"email","direction":"desc"}],"selects":[{"field":"name"},{"field":"email"}],"includes":[],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/users\/mutate":{"post":{"tags":["Users"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"name":"","email":""},"relations":[]}]}}}}}},"\/api\/users\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Users"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/properties":{"get":{"tags":["Properties"],"summary":"Get the resource detail","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"actions":[],"instructions":[],"scout_instructions":[],"fields":["total_atom_count","heavy_atom_count","molecular_weight","exact_molecular_weight","molecular_formula","alogp","topological_polar_surface_area","rotatable_bond_count","hydrogen_bond_acceptors","hydrogen_bond_donors","hydrogen_bond_acceptors_lipinski","hydrogen_bond_donors_lipinski","lipinski_rule_of_five_violations","aromatic_rings_count","qed_drug_likeliness","formal_charge","fractioncsp3","number_of_minimal_rings","van_der_walls_volume","contains_sugar","contains_ring_sugars","contains_linear_sugars","murcko_framework","np_likeness","chemical_class","chemical_sub_class","chemical_super_class","direct_parent_classification","np_classifier_pathway","np_classifier_superclass","np_classifier_class","np_classifier_is_glycoside"],"scout_fields":[],"limits":[10,25,50],"scopes":[],"relations":[{"resource":"App\\Rest\\Resources\\MoleculeResource","relation":"molecule","constraints":{"required_on_creation":false,"prohibited_on_creation":false,"required_on_update":false,"prohibited_on_update":false},"name":"HasOne"}],"rules":{"all":[],"create":[],"update":[]}}}}}}},"description":"Get every detail about the resource according to the current user connected"},"delete":{"tags":["Properties"],"summary":"Perform a destroy request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Delete database records using primary key","requestBody":{"content":{"application\/json":{"example":{"resources":[1,5,6]}}}}}},"\/api\/properties\/search":{"post":{"tags":["Properties"],"summary":"Perform a search request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":[],"meta":[]}}}}},"description":"Crunch the Api's data with multiple attributes","requestBody":{"content":{"application\/json":{"example":{"search":{"scopes":[],"filters":[{"field":"total_atom_count","operator":"=","value":""},{"field":"heavy_atom_count","operator":"=","value":""},{"field":"molecular_weight","operator":"=","value":""},{"field":"exact_molecular_weight","operator":"=","value":""},{"field":"molecular_formula","operator":"=","value":""},{"field":"alogp","operator":"=","value":""},{"field":"topological_polar_surface_area","operator":"=","value":""},{"field":"rotatable_bond_count","operator":"=","value":""},{"field":"hydrogen_bond_acceptors","operator":"=","value":""},{"field":"hydrogen_bond_donors","operator":"=","value":""},{"field":"hydrogen_bond_acceptors_lipinski","operator":"=","value":""},{"field":"hydrogen_bond_donors_lipinski","operator":"=","value":""},{"field":"lipinski_rule_of_five_violations","operator":"=","value":""},{"field":"aromatic_rings_count","operator":"=","value":""},{"field":"qed_drug_likeliness","operator":"=","value":""},{"field":"formal_charge","operator":"=","value":""},{"field":"fractioncsp3","operator":"=","value":""},{"field":"number_of_minimal_rings","operator":"=","value":""},{"field":"van_der_walls_volume","operator":"=","value":""},{"field":"contains_sugar","operator":"=","value":""},{"field":"contains_ring_sugars","operator":"=","value":""},{"field":"contains_linear_sugars","operator":"=","value":""},{"field":"murcko_framework","operator":"=","value":""},{"field":"np_likeness","operator":"=","value":""},{"field":"chemical_class","operator":"=","value":""},{"field":"chemical_sub_class","operator":"=","value":""},{"field":"chemical_super_class","operator":"=","value":""},{"field":"direct_parent_classification","operator":"=","value":""},{"field":"np_classifier_pathway","operator":"=","value":""},{"field":"np_classifier_superclass","operator":"=","value":""},{"field":"np_classifier_class","operator":"=","value":""},{"field":"np_classifier_is_glycoside","operator":"=","value":""}],"sorts":[{"field":"total_atom_count","direction":"desc"},{"field":"heavy_atom_count","direction":"desc"},{"field":"molecular_weight","direction":"desc"},{"field":"exact_molecular_weight","direction":"desc"},{"field":"molecular_formula","direction":"desc"},{"field":"alogp","direction":"desc"},{"field":"topological_polar_surface_area","direction":"desc"},{"field":"rotatable_bond_count","direction":"desc"},{"field":"hydrogen_bond_acceptors","direction":"desc"},{"field":"hydrogen_bond_donors","direction":"desc"},{"field":"hydrogen_bond_acceptors_lipinski","direction":"desc"},{"field":"hydrogen_bond_donors_lipinski","direction":"desc"},{"field":"lipinski_rule_of_five_violations","direction":"desc"},{"field":"aromatic_rings_count","direction":"desc"},{"field":"qed_drug_likeliness","direction":"desc"},{"field":"formal_charge","direction":"desc"},{"field":"fractioncsp3","direction":"desc"},{"field":"number_of_minimal_rings","direction":"desc"},{"field":"van_der_walls_volume","direction":"desc"},{"field":"contains_sugar","direction":"desc"},{"field":"contains_ring_sugars","direction":"desc"},{"field":"contains_linear_sugars","direction":"desc"},{"field":"murcko_framework","direction":"desc"},{"field":"np_likeness","direction":"desc"},{"field":"chemical_class","direction":"desc"},{"field":"chemical_sub_class","direction":"desc"},{"field":"chemical_super_class","direction":"desc"},{"field":"direct_parent_classification","direction":"desc"},{"field":"np_classifier_pathway","direction":"desc"},{"field":"np_classifier_superclass","direction":"desc"},{"field":"np_classifier_class","direction":"desc"},{"field":"np_classifier_is_glycoside","direction":"desc"}],"selects":[{"field":"total_atom_count"},{"field":"heavy_atom_count"},{"field":"molecular_weight"},{"field":"exact_molecular_weight"},{"field":"molecular_formula"},{"field":"alogp"},{"field":"topological_polar_surface_area"},{"field":"rotatable_bond_count"},{"field":"hydrogen_bond_acceptors"},{"field":"hydrogen_bond_donors"},{"field":"hydrogen_bond_acceptors_lipinski"},{"field":"hydrogen_bond_donors_lipinski"},{"field":"lipinski_rule_of_five_violations"},{"field":"aromatic_rings_count"},{"field":"qed_drug_likeliness"},{"field":"formal_charge"},{"field":"fractioncsp3"},{"field":"number_of_minimal_rings"},{"field":"van_der_walls_volume"},{"field":"contains_sugar"},{"field":"contains_ring_sugars"},{"field":"contains_linear_sugars"},{"field":"murcko_framework"},{"field":"np_likeness"},{"field":"chemical_class"},{"field":"chemical_sub_class"},{"field":"chemical_super_class"},{"field":"direct_parent_classification"},{"field":"np_classifier_pathway"},{"field":"np_classifier_superclass"},{"field":"np_classifier_class"},{"field":"np_classifier_is_glycoside"}],"includes":[{"relation":"molecule"}],"aggregates":[],"instructions":[],"gates":["create","update","delete"],"page":1,"limit":10}}}}}}},"\/api\/properties\/mutate":{"post":{"tags":["Properties"],"summary":"Perform a mutate request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"created":[1],"updated":[2,3]}}}}},"description":"Create \/ Modify the database data with multiple options","requestBody":{"content":{"application\/json":{"example":{"mutate":[{"operation":"create","attributes":{"total_atom_count":"","heavy_atom_count":"","molecular_weight":"","exact_molecular_weight":"","molecular_formula":"","alogp":"","topological_polar_surface_area":"","rotatable_bond_count":"","hydrogen_bond_acceptors":"","hydrogen_bond_donors":"","hydrogen_bond_acceptors_lipinski":"","hydrogen_bond_donors_lipinski":"","lipinski_rule_of_five_violations":"","aromatic_rings_count":"","qed_drug_likeliness":"","formal_charge":"","fractioncsp3":"","number_of_minimal_rings":"","van_der_walls_volume":"","contains_sugar":"","contains_ring_sugars":"","contains_linear_sugars":"","murcko_framework":"","np_likeness":"","chemical_class":"","chemical_sub_class":"","chemical_super_class":"","direct_parent_classification":"","np_classifier_pathway":"","np_classifier_superclass":"","np_classifier_class":"","np_classifier_is_glycoside":""},"relations":{"molecule":{"operation":"update","key":1}}}]}}}}}},"\/api\/properties\/actions\/{action}":{"parameters":[{"name":"action","in":"path","description":"The action uriKey","required":true,"schema":{"type":"string"}}],"post":{"tags":["Properties"],"summary":"Perform an action request","responses":{"default":{"description":"","content":{"application\/json":{"example":{"data":{"impacted":2}}}}}},"description":"Launch actions","requestBody":{"content":{"application\/json":{"example":{"search":{"filters":[{"field":"has_received_welcome_notification","value":false}]},"fields":[{"name":"expires_at","value":"2023-04-29"}]}}}}}},"\/api\/auth\/login":{"post":{"tags":["Authentication"],"summary":"Login endpoint","responses":{"default":{"description":"Login successful","content":{"application\/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"}}}}}}},"requestBody":{"content":{"application\/json":{"example":{"email":"john@example.com","password":"password"}}}}}},"\/api\/auth\/logout":{"get":{"tags":["Authentication"],"summary":"Logout endpoint","responses":{"default":{"description":"Logout successful","content":{"application\/json":{"schema":{"type":"object","properties":{"logout":{"type":"string"}}}}}}}}},"\/api\/auth\/register":{"post":{"tags":["Authentication"],"summary":"Register endpoint","responses":{"default":{"description":"Successfully created user","content":{"application\/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"token":{"type":"string"}}}}}}},"requestBody":{"content":{"application\/json":{"example":{"first_name":"John","last_name":"Doe","username":"JDoe","affiliation":"JD","email":"john@example.com","password":"password","password_confirmation":"password"}}}}}},"\/api\/search":{"parameters":[{"name":"query","in":"query","description":"Search query string","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"Sorting option","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Type filter","required":false,"schema":{"type":"string"}},{"name":"tagType","in":"query","description":"Tag type filter","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Number of results per page","required":false,"schema":{"type":"integer"}},{"name":"offset","in":"query","description":"Offset for pagination","required":false,"schema":{"type":"integer"}}],"post":{"tags":["Advanced Search"],"summary":"Advanced Molecule Search","responses":{"default":{"description":"Successful operation","content":{"application\/json":{"example":{"data":[{"identifier":"CNP0228556.0","canonical_smiles":"CN1C(=O)C2=C(N=CN2C)N(C)C1=O","annotation_level":5,"name":"caffeine","iupac_name":"1,3,7-trimethylpurine-2,6-dione","organism_count":135,"citation_count":12,"geo_count":3,"collection_count":31}],"current_page":1,"total":100,"per_page":24}}}},"\"500\"":{"description":"Server Error","content":{"application\/json":{"example":{"message":"An error occurred during the search operation."}}}}},"description":"# Advanced Molecule Search\n\nAdvanced search supports searching for molecules based on complex criteria.\n\n## 1. Tag-Based Search (type=tags)\nSearch molecules based on the following tag types:\n\n* **dataSource**: Search by collection title\n - Example: `type=tags, tagType=dataSource, query=collection_name`\n\n* **organisms**: Search by organism names (comma-separated)\n - Example: `type=tags, tagType=organisms, query=organism_name1,organism_name2`\n\n* **citations**: Search by DOI or title (comma-separated)\n - Example: `type=tags, tagType=citations, query=doi1,doi2,title1,title2`\n\n## 2. Filter-Based Search (type=filters)\n\n### Molecular Properties\n* `tac`: Total Atom Count (1-1071)\n* `hac`: Heavy Atom Count (0-551)\n* `mw`: Molecular Weight (5.01-7860.71)\n* `emw`: Exact Molecular Weight (1.00728-7855.66038)\n* `mrc`: Number of Minimal Rings (0-51)\n* `vdwv`: Van der Walls Volume (10.14-5177.31)\n* `fc`: Formal Charge (-8 to 7)\n\n### Chemical Properties\n* `alogp`: ALogP (-82.67 to 67.03)\n* `topopsa`: Topological Polar Surface Area (0.00-3453.72)\n* `fcsp3`: Fraction CSP3 (0.00-1.00)\n* `np`: NP Likeness (-3.53 to 4.12)\n* `qed`: QED Drug Likeliness (0.00-0.95)\n\n### Structural Features\n* `rbc`: Rotatable Bond Count (0-224)\n* `arc`: Aromatic Rings Count (0-31)\n* `hba`: Hydrogen Bond Acceptors (0-191)\n* `hbd`: Hydrogen Bond Donors (0-116)\n\n### Lipinski Parameters\n* `lhba`: Lipinski H-Bond Acceptors (0-191)\n* `lhbd`: Lipinski H-Bond Donors (0-116)\n* `lro5v`: Lipinski Rule of 5 Violations (0-4)\n\n### Sugar-Related Properties\n* `cs`: Contains Sugar (true\/false)\n* `crs`: Contains Ring Sugars (true\/false)\n* `cls`: Contains Linear Sugars (true\/false)\n\n### Classyfire Classifications\n* `class`: Chemical Class\n - Example: 1,2-diaryl-2-propen-1-ols\n* `subclass`: Chemical Sub Class\n - Example: 1,1'-azonaphthalenes\n* `superclass`: Chemical Super Class\n - Example: Acetylides\n* `parent`: Direct Parent Classification\n - Example: 1,1'-azonaphthalenes\n\n### Natural Product Classifications\n* `np_pathway`: NP Classifier Pathway\n - Example: Amino acids and Peptides\n* `np_superclass`: NP Classifier Superclass\n - Example: Aminosugars and aminoglycosides\n* `np_class`: NP Classifier Class\n - Example: 2-arylbenzofurans\n* `np_glycoside`: NP Classifier Is Glycoside (true\/false)\n\n### Filter Query Examples\n* Range query:\n ```\n type=filters&q=tac:4..6\n ```\n* Boolean query:\n ```\n type=filters&q=cs:true\n ```\n* Classification query:\n ```\n type=filters&q=class:1,2-diaryl-2-propen-1-ols\n ```\n* Multiple conditions:\n ```\n type=filters&q=tac:4..6 mw:100..200\n ```\n* Complex query with OR:\n ```\n type=filters&q=tac:4..6 cs:true OR mw:100..200\n ```\n\n## 3. Basic Search (type not specified)\nSearch molecules by name, SMILES, InChI, or InChI Key.\n\n* Simply provide the search term in the query parameter\n* Example: `query=caffeine`\n","requestBody":{"content":{"application\/json":{"example":{"type":"filters","tagType":"","query":"tac:4..6","limit":20,"sort":"desc","page":1,"offset":0}}}}}}},"servers":[{"url":"\/","description":"The current server"}],"security":[],"components":{"securitySchemes":{"sanctum":{"scheme":"Bearer","in":"header","flows":[],"description":"Enter token in format (Bearer \\)","type":"apiKey","name":"Authorization","openIdConnectUrl":""}}}} \ No newline at end of file