### Install COCONUT Application Chart Source: https://steinbeck-lab.github.io/coconut/local-instance.html Install the COCONUT application using Helm. Ensure you have generated an application key and provided it in the `.Values.appProperties.key` property before installation. ```bash helm install my-coconut-app repo-helm-charts/coconut-app ``` -------------------------------- ### Start PostgreSQL Docker Container Source: https://steinbeck-lab.github.io/coconut/data.html Use this command to start a PostgreSQL Docker container for the COCONUT database. Ensure Docker is installed. ```bash docker run --name coconut-postgres -e POSTGRES_PASSWORD=yourpassword -e POSTGRES_USER=coconut -e POSTGRES_DB=coconut -p 5432:5432 -d postgres:15 ``` -------------------------------- ### Start Laravel Horizon for Local Development Source: https://steinbeck-lab.github.io/coconut/collection-submission.html To process queued compounds during local development, start the Laravel Horizon service. ```bash sail artisan horizon ``` -------------------------------- ### Install JS Dependencies with NPM Source: https://steinbeck-lab.github.io/coconut/installation.html Install the JavaScript dependencies for the project using NPM. ```bash npm install ``` -------------------------------- ### Install PHP Dependencies with Composer Source: https://steinbeck-lab.github.io/coconut/installation.html Install the required PHP dependencies for the project using Composer. ```bash composer install ``` -------------------------------- ### Copy Environment File Source: https://steinbeck-lab.github.io/coconut/installation.html Copy the example environment file to create the actual environment file for configuration. ```bash cp .env.example .env ``` -------------------------------- ### Start Docker Containers with Sail Source: https://steinbeck-lab.github.io/coconut/installation.html Run the Sail command to start the Docker containers in detached mode. ```bash ./vendor/bin/sail up -d ``` -------------------------------- ### Get Organisms Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Get the details of organisms where the molecules are reported to be found in. ```APIDOC ## GET /api/organisms ### Description Get the details of organisms where the molecules are reported to be found in. ### Method GET ### Endpoint /api/organisms ``` -------------------------------- ### Run Vite Local Development Server Source: https://steinbeck-lab.github.io/coconut/installation.html Start the Vite local development server for front-end assets. This command is used for development purposes. ```bash npm run dev ``` ```bash yarn dev ``` -------------------------------- ### Basic Example for Searching Reports Source: https://steinbeck-lab.github.io/coconut/api-documentation.html This JSON payload demonstrates how to filter, sort, and paginate search results for reports. ```json { "search": { "filters": [ { "field": "title", "operator": "like", "value": "%molecule%" } ], "sorts": [ { "field": "title", "direction": "desc" } ], "page": 1, "limit": 10 } } ``` -------------------------------- ### Get Citations Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Get details about the citations connected to various resources on COCONUT. ```APIDOC ## GET /api/citations ### Description Get details about the citations connected to various resources on COCONUT. ### Method GET ### Endpoint /api/citations ``` -------------------------------- ### Get Molecules Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Retrieves all details about available molecules. ```APIDOC ## GET /api/molecules ### Description Retrieves all details about available molecules. ### Method GET ### Endpoint /api/molecules ``` -------------------------------- ### Clone COCONUT Repository Source: https://steinbeck-lab.github.io/coconut/installation.html Clone the COCONUT project repository from Github. This is the first step in the installation process. ```bash git clone https://github.com/Steinbeck-Lab/coconut.git ``` -------------------------------- ### Get Properties Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Exclusively search for molecule properties. ```APIDOC ## GET /api/properties ### Description Exclusively search for molecule properties. ### Method GET ### Endpoint /api/properties ``` -------------------------------- ### Get Collections Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Retrieves details about the collections hosted on COCONUT. ```APIDOC ## GET /api/collections ### Description Retrieves details about the collections hosted on COCONUT. ### Method GET ### Endpoint /api/collections ``` -------------------------------- ### Get Molecules Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Retrieve all details about a specific molecule. ```http GET /api/molecules ``` -------------------------------- ### Get Collections Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Retrieve details about the collections hosted on COCONUT. ```http GET /api/collections ``` -------------------------------- ### Get Citations API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Retrieve details about citations connected to various resources on COCONUT. ```http GET /api/citations ``` -------------------------------- ### Get Properties API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Exclusively search for molecule properties. ```http GET /api/properties ``` -------------------------------- ### Get Organisms API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Retrieve details of organisms where molecules are reported to be found. ```http GET /api/organisms ``` -------------------------------- ### Seed the Database (Optional) Source: https://steinbeck-lab.github.io/coconut/installation.html Run the database seeders to populate the database with initial data, if available. ```bash ./vendor/bin/sail artisan db:seed ``` -------------------------------- ### Run Database Migrations Source: https://steinbeck-lab.github.io/coconut/installation.html Execute the database migrations to create the necessary tables for the application. ```bash ./vendor/bin/sail artisan migrate ``` -------------------------------- ### Navigate to Project Directory Source: https://steinbeck-lab.github.io/coconut/installation.html Change the current directory to the cloned COCONUT project folder. ```bash cd coconut ``` -------------------------------- ### Register Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Registers a new user with the provided details. ```APIDOC ## POST /api/auth/register ### Description Registers a new user with the provided details. ### Method POST ### Endpoint /api/auth/register ### Request Body #### application/json - **first_name** (string) - Required - **last_name** (string) - Required - **username** (string) - Required - **affiliation** (string) - Required - **email** (string) - Required - **password** (string) - Required - **password_confirmation** (string) - Required ### Request Example ```json { "first_name": "John", "last_name": "Doe", "username": "JDoe", "affiliation": "JD", "email": "john@example.com", "password": "password", "password_confirmation": "password" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the registration was successful. - **message** (string) - A message describing the result of the registration. - **token** (string) - The authentication token for the newly registered user. #### Response Example ```json { "success": true, "message": "string", "token": "string" } ``` ``` -------------------------------- ### Access Application Source: https://steinbeck-lab.github.io/coconut/installation.html Access the Laravel application in your browser. Ensure Docker containers are running. ```bash http://localhost ``` -------------------------------- ### Add Helm Repository Source: https://steinbeck-lab.github.io/coconut/local-instance.html Add the Helm repository containing COCONUT charts to your Helm client. Run `helm repo update` if the repo was previously added. ```bash helm repo add repo-helm-charts https://nfdi4chem.github.io/repo-helm-charts/ ``` -------------------------------- ### Load PostgreSQL Dump with Docker Source: https://steinbeck-lab.github.io/coconut/data.html Load a text format SQL dump into the running COCONUT PostgreSQL Docker container. Replace '/path/to/coconut_dump.sql' with the actual path to your dump file. ```bash docker exec -i coconut-postgres psql -U coconut -d coconut < /path/to/coconut_dump.sql ``` -------------------------------- ### Register Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Use this endpoint to register a new user. Requires all user details including password confirmation. ```http POST /api/auth/register ``` ```json { "first_name": "John", "last_name": "Doe", "username": "JDoe", "affiliation": "JD", "email": "john@example.com", "password": "password", "password_confirmation": "password" } ``` ```json { "success": true, "message": "string", "token": "string" } ``` -------------------------------- ### Create Report Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Create a new report. ```APIDOC ## POST /api/reports ### Description Create a new report. ### Method POST ### Endpoint /api/reports ### Parameters #### Request Body (The request body schema for creating a report is not detailed in the source.) ``` -------------------------------- ### Generate Application Key Source: https://steinbeck-lab.github.io/coconut/installation.html Generate the application key using the Sail artisan command. This is necessary for secure session handling and encryption. ```bash ./vendor/bin/sail artisan key:generate ``` -------------------------------- ### SQL Query for Download Count Source: https://steinbeck-lab.github.io/coconut/data.html This SQL query calculates the molecule count for downloads, including active molecules and parent molecules without variants. It joins the molecules, collection_molecule, and collections tables. ```sql SELECT count(*) FROM molecules m JOIN collection_molecule cm ON m.id = cm.molecule_id JOIN collections c ON cm.collection_id = c.id WHERE c.title = 'Australian natural products' AND m.active=true AND (m.is_parent=false OR (m.is_parent=true AND has_variants=false)); ``` -------------------------------- ### Molecule Actions Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Launches specific actions related to molecules. ```APIDOC ## POST /api/molecules/actions/{action} ### Description Launches specific actions related to molecules. ### Method POST ### Endpoint /api/molecules/actions/{action} ### Parameters #### Path Parameters - **action** (string) - Required - The action to perform on the molecule. ``` -------------------------------- ### Verify PostgreSQL Data Load with Docker Source: https://steinbeck-lab.github.io/coconut/data.html Execute a SQL query within the COCONUT PostgreSQL Docker container to verify that data has been loaded correctly. This command counts the number of molecules. ```bash docker exec -it coconut-postgres psql -U coconut -d coconut -c "SELECT count(*) FROM molecules;" ``` -------------------------------- ### Login Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Authenticates a user and returns an access token. The token is of Bearer type and must be included in the request headers. ```APIDOC ## POST /api/auth/login ### Description Authenticates a user and returns an access token. ### Method POST ### Endpoint /api/auth/login ### Request Body #### application/json - **email** (string) - Required - **password** (string) - Required ### Request Example ```json { "email": "john@example.com", "password": "password" } ``` ### Response #### Success Response (200) - **access_token** (string) - The authentication token. - **token_type** (string) - The type of the token (e.g., Bearer). #### Response Example ```json { "access_token": "string", "token_type": "string" } ``` ``` -------------------------------- ### Create Report API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Use this endpoint to create a new report. It accepts JSON content. ```http POST /api/reports ``` -------------------------------- ### Molecule Actions Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Launch specific actions related to molecules. The action is specified as a path parameter. ```http POST /api/molecules/actions/{action} ``` -------------------------------- ### Uninstall COCONUT Application Chart Source: https://steinbeck-lab.github.io/coconut/local-instance.html Remove the COCONUT application deployed via Helm. ```bash helm delete my-coconut-app ``` -------------------------------- ### Login Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Use this endpoint to authenticate and obtain an access token. The token is of Bearer type and must be included in request headers. ```http POST /api/auth/login ``` ```json { "email": "john@example.com", "password": "password" } ``` ```json { "access_token": "string", "token_type": "string" } ``` -------------------------------- ### Create Report Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Allows users to create a new report entry in the COCONUT system. This operation requires specific attributes for the molecule being reported. ```APIDOC ## Create Report ### Description Allows users to create a new report entry in the COCONUT system. This operation requires specific attributes for the molecule being reported. ### Method POST ### Endpoint /api/reports ### Parameters #### Request Body - **mutate** (array) - Required - An array containing mutation operations. - **operation** (string) - Required - Must be "create". - **attributes** (object) - Required - Attributes of the new report. - **title** (string) - Required - The title of the report. - **evidence** (string) - Required - Evidence supporting the report. - **comment** (string) - Optional - Additional comments. - **suggested_changes** (object) - Optional - Suggested changes or new data. - **new_molecule_data** (object) - Required if suggested_changes is present. - **canonical_smiles** (string) - Required - The canonical SMILES string of the molecule. - **reference_id** (string) - Optional - An identifier for the reference. - **name** (string) - Optional - The name of the molecule. - **link** (string) - Optional - A URL link to more information. - **mol_filename** (string) - Optional - The filename for the molecule structure. - **structural_comments** (string) - Optional - Comments about the structure. - **references** (array) - Optional - An array of references. - **doi** (string) - Required - The Digital Object Identifier for the reference. - **organisms** (array) - Optional - Organisms associated with the reference. - **name** (string) - Required - The name of the organism. - **parts** (array) - Optional - Parts of the organism used. - **locations** (array) - Optional - Geographical locations. - **name** (string) - Required - The name of the location. - **ecosystems** (array) - Optional - Ecosystems of the location. ### Request Example ```json { "mutate": [ { "operation": "create", "attributes": { "title": "Isolation of Berberine from Berberis vulgaris", "evidence": "The compound was isolated from the root bark extract using column chromatography and structure confirmed by NMR and MS analysis.", "comment": "This alkaloid has shown significant antimicrobial activity against gram-positive bacteria.", "suggested_changes": { "new_molecule_data": { "canonical_smiles": "COc1ccc2cc3[n+](cc2c1OC)CCc1cc2c(cc1-3)OCO2", "reference_id": "ID if it has one", "name": "Berberine", "link": "https://pubchem.ncbi.nlm.nih.gov/compound/2353", "mol_filename": "berberine.mol", "structural_comments": "Quaternary isoquinoline alkaloid with a tetracyclic skeleton", "references": [ { "doi": "10.1021/np50123a002", "organisms": [ { "name": "Berberis vulgaris", "parts": ["root", "bark", "rhizome"], "locations": [ { "name": "Eastern Europe", "ecosystems": ["temperate forest", "woodland"] }, { "name": "Western Asia", "ecosystems": ["mountain slopes", "rocky terrain"] } ] }, { "name": "Hydrastis canadensis", "parts": ["rhizome", "roots"], "locations": [ { "name": "Eastern North America", "ecosystems": ["deciduous forest", "shaded woodland"] } ] } ] }, { "doi": "10.1016/j.jep.2019.112124", "organisms": [ { "name": "Coptis chinensis", "parts": ["rhizome", "roots"], "locations": [ { "name": "Southern China", "ecosystems": ["mountain forests", "hillsides"] }, { "name": "Eastern Asia", "ecosystems": ["humid forest", "river valleys"] } ] }, { "name": "Phellodendron amurense", "parts": ["bark", "stem"], "locations": [{ "name": "Northeast Asia", "ecosystems": ["deciduous forest", "mixed forest"] }] } ] } ] } } }, "relations": [] } ] } ``` ``` -------------------------------- ### Search Molecules Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Search for molecules using various attributes from the 'molecules' and 'properties' tables. Fields from the 'properties' table require a 'properties.' prefix. ```http POST /api/molecules/search ``` ```json { "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": "" } ] } } ``` -------------------------------- ### Create New Molecule Report Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Use this endpoint to create a new molecule report. Ensure all required fields like title, canonical_smiles, and doi are provided. Only one molecule can be submitted per request. ```json { "mutate": [ { "operation": "create", "attributes": { "title": "Isolation of Berberine from Berberis vulgaris", "evidence": "The compound was isolated from the root bark extract using column chromatography and structure confirmed by NMR and MS analysis.", "comment": "This alkaloid has shown significant antimicrobial activity against gram-positive bacteria.", "suggested_changes": { "new_molecule_data": { "canonical_smiles": "COc1ccc2cc3[n+](cc2c1OC)CCc1cc2c(cc1-3)OCO2", "reference_id": "ID if it has one", "name": "Berberine", "link": "https://pubchem.ncbi.nlm.nih.gov/compound/2353", "mol_filename": "berberine.mol", "structural_comments": "Quaternary isoquinoline alkaloid with a tetracyclic skeleton", "references": [ { "doi": "10.1021/np50123a002", "organisms": [ { "name": "Berberis vulgaris", "parts": ["root", "bark", "rhizome"], "locations": [ { "name": "Eastern Europe", "ecosystems": ["temperate forest", "woodland"] }, { "name": "Western Asia", "ecosystems": ["mountain slopes", "rocky terrain"] } ] }, { "name": "Hydrastis canadensis", "parts": ["rhizome", "roots"], "locations": [ { "name": "Eastern North America", "ecosystems": ["deciduous forest", "shaded woodland"] } ] } ] }, { "doi": "10.1016/j.jep.2019.112124", "organisms": [ { "name": "Coptis chinensis", "parts": ["rhizome", "roots"], "locations": [ { "name": "Southern China", "ecosystems": ["mountain forests", "hillsides"] }, { "name": "Eastern Asia", "ecosystems": ["humid forest", "river valleys"] } ] }, { "name": "Phellodendron amurense", "parts": ["bark", "stem"], "locations": [{ "name": "Northeast Asia", "ecosystems": ["deciduous forest", "mixed forest"] }] } ] } ] } } }, "relations": [] } ] } ``` -------------------------------- ### SQL Query for Search Count Source: https://steinbeck-lab.github.io/coconut/data.html This SQL query calculates the molecule count as displayed on search pages, considering active molecules that are not parents. ```sql SELECT count(*) FROM molecules WHERE id IN ( SELECT DISTINCT molecule_id FROM entries WHERE collection_id=55); ``` -------------------------------- ### Search Properties Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Search properties based on various attributes. ```APIDOC ## POST /api/properties/search ### Description Search properties based on various attributes. ### Method POST ### Endpoint /api/properties/search ### Parameters #### Request Body - **total_atom_count** (integer) - Optional - The total number of atoms. - **heavy_atom_count** (integer) - Optional - The number of heavy atoms. - **molecular_weight** (number) - Optional - The molecular weight. - **exact_molecular_weight** (number) - Optional - The exact molecular weight. - **molecular_formula** (string) - Optional - The molecular formula. - **alogp** (number) - Optional - The calculated logP value. - **topological_polar_surface_area** (number) - Optional - The topological polar surface area. - **rotatable_bond_count** (integer) - Optional - The number of rotatable bonds. - **hydrogen_bond_acceptors** (integer) - Optional - The number of hydrogen bond acceptors. - **hydrogen_bond_donors** (integer) - Optional - The number of hydrogen bond donors. - **hydrogen_bond_acceptors_lipinski** (integer) - Optional - The number of hydrogen bond acceptors according to Lipinski's rule. - **hydrogen_bond_donors_lipinski** (integer) - Optional - The number of hydrogen bond donors according to Lipinski's rule. - **lipinski_rule_of_five_violations** (integer) - Optional - The number of Lipinski's rule of five violations. - **aromatic_rings_count** (integer) - Optional - The number of aromatic rings. - **qed_drug_likeliness** (number) - Optional - The Quantitative Estimate of Drug-likeness score. - **formal_charge** (integer) - Optional - The formal charge of the molecule. - **fractioncsp3** (number) - Optional - The fraction of sp3 hybridized carbons. - **number_of_minimal_rings** (integer) - Optional - The number of minimal rings. - **van_der_walls_volume** (number) - Optional - The van der Waals volume. ``` -------------------------------- ### Search Collections Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Search Collections using various attributes like title, description, identifier, and URL. ```APIDOC ## POST /api/collections/search ### Description Search Collections using various attributes. ### Method POST ### Endpoint /api/collections/search ### Parameters #### Request Body - **title** (string) - Optional - The title of the collection. - **description** (string) - Optional - The description of the collection. - **identifier** (string) - Optional - The identifier of the collection. - **url** (string) - Optional - The URL of the collection. ``` -------------------------------- ### Logout Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Logs out the currently authenticated user. ```APIDOC ## GET /api/auth/logout ### Description Logs out the currently authenticated user. ### Method GET ### Endpoint /api/auth/logout ### Response #### Success Response (200) - **logout** (string) - A message indicating the logout status. #### Response Example ```json { "logout": "string" } ``` ``` -------------------------------- ### Search Organisms Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Search Organisms using various attributes like name, IRI, rank, and molecule count. ```APIDOC ## POST /api/organisms/search ### Description Search Organisms using various attributes. ### Method POST ### Endpoint /api/organisms/search ### Parameters #### Request Body - **name** (string) - Optional - The name of the organism. - **iri** (string) - Optional - The Internationalized Resource Identifier. - **rank** (string) - Optional - The taxonomic rank. - **molecule_count** (integer) - Optional - The number of molecules associated with the organism. ``` -------------------------------- ### Search Molecules Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Searches for molecules using various attributes from the 'molecules' and 'properties' tables. Searchable fields include InChI, SMILES, CAS, molecular weight, and more. ```APIDOC ## POST /api/molecules/search ### Description Searches for molecules using various attributes from the 'molecules' and 'properties' tables. ### Method POST ### Endpoint /api/molecules/search ### Request Body #### application/json - **search** (object) - Required - **scopes** (array) - Optional. An array of scopes for the search. - **filters** (array) - Required. An array of filter objects. - **field** (string) - Required. The field to filter on (e.g., 'standard_inchi', 'properties.molecular_weight'). - **operator** (string) - Required. The comparison operator (e.g., '=', '>', '<'). - **value** (any) - Required. The value to compare against. ### Request Example ```json { "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": "" } ] } } ``` ``` -------------------------------- ### Search Collections API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Use this endpoint to search for collections using attributes like title, description, identifier, and URL. ```http POST /api/collections/search ``` -------------------------------- ### Search Reports Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Search for reports with various filtering, sorting, and pagination options. ```APIDOC ## POST /api/reports/search ### Description Search for reports with various filtering, sorting, and pagination options. ### Method POST ### Endpoint /api/reports/search ### Parameters #### Request Body - **search** (object) - Required - Object containing search criteria. - **filters** (array) - Optional - Array of filter objects. - **field** (string) - Required - The field to filter on. - **operator** (string) - Required - The comparison operator (e.g., 'like'). - **value** (string) - Required - The value to filter by. - **sorts** (array) - Optional - Array of sort objects. - **field** (string) - Required - The field to sort by. - **direction** (string) - Required - The sort direction ('asc' or 'desc'). - **page** (integer) - Optional - The page number for pagination. - **limit** (integer) - Optional - The number of results per page. ``` -------------------------------- ### Search Organisms API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Search for organisms using attributes like name, IRI, rank, and molecule count. ```http POST /api/organisms/search ``` -------------------------------- ### Search Properties API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Search for properties based on various attributes including atom counts, molecular weight, and drug-likeness scores. ```http POST /api/properties/search ``` -------------------------------- ### Search Citations API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Search for citations using attributes such as DOI, title, and authors. ```http POST /api/citations/search ``` -------------------------------- ### Search Citations Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Search Citations using various attributes like DOI, title, authors, and citation text. ```APIDOC ## POST /api/citations/search ### Description Search Citations using various attributes. ### Method POST ### Endpoint /api/citations/search ### Parameters #### Request Body - **doi** (string) - Optional - The Digital Object Identifier. - **title** (string) - Optional - The title of the citation. - **authors** (string) - Optional - The authors of the citation. - **citation_text** (string) - Optional - The text of the citation. ``` -------------------------------- ### Logout Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Use this endpoint to log out from the API. No request body is required. ```http GET /api/auth/logout ``` ```json { "logout": "string" } ``` -------------------------------- ### Search Reports API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Search for reports with filtering, sorting, and pagination options. ```http POST /api/reports/search ``` -------------------------------- ### Update Existing Report Source: https://steinbeck-lab.github.io/coconut/api-documentation.html This endpoint allows for updating an existing report using its ID. Note that this operation requires special access privileges and is typically performed by the Scientific Advisory Board. ```json { "mutate": [ { "operation": "update", "key": 43, "attributes": {"title": "new name"} } ] } ``` -------------------------------- ### Mutate Organisms API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html This endpoint is for updating organism details. It requires special access privileges and is not available to general users. ```http POST /api/organisms/mutate ``` -------------------------------- ### Delete Reports Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Use this endpoint to permanently delete one or more reports by providing their IDs in a list. This action is restricted and requires special access privileges. ```json { "resources": [ 42, 43 ] } ``` -------------------------------- ### Mutate Collections API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html This endpoint is for updating collection details. It requires special access privileges and is not available to general users. ```http POST /api/collections/mutate ``` -------------------------------- ### Mutate Properties API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html This endpoint is for updating molecule properties. It requires special access privileges and is not available to general users. ```http POST /api/properties/mutate ``` -------------------------------- ### Mutate Citations API Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html This endpoint is for updating citation details. It requires special access privileges and is not available to general users. ```http POST /api/citations/mutate ``` -------------------------------- ### Mutate Molecules Endpoint Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Update molecule properties. This endpoint requires special access privileges and is restricted to authorized users. ```http POST /api/molecules/mutate ``` ```json { "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": "" } } ] } ``` -------------------------------- ### Mutate Molecules Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Updates molecule properties. This endpoint is restricted and requires special access privileges. ```APIDOC ## POST /api/molecules/mutate ### Description Updates molecule properties. This operation is restricted and requires special access privileges. ### Method POST ### Endpoint /api/molecules/mutate ### Request Body #### application/json - **mutate** (array) - Required. An array of mutation operations. - **operation** (string) - Required. The type of operation (e.g., 'create'). - **attributes** (object) - Required. The attributes to mutate. ### Request Example ```json { "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": "" } } ] } ``` ``` -------------------------------- ### Update Report Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Updates an existing report identified by its ID. This operation is restricted and requires special access privileges. ```APIDOC ## Update Report ### Description Updates an existing report identified by its ID. This operation is restricted and requires special access privileges. ### Method PATCH ### Endpoint /api/reports/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the report to update. #### Request Body - **mutate** (array) - Required - An array containing mutation operations. - **operation** (string) - Required - Must be "update". - **key** (integer) - Required - The key (ID) of the report to update. - **attributes** (object) - Required - The attributes to update. - **title** (string) - Optional - The new title for the report. ### Request Example ```json { "mutate": [ { "operation": "update", "key": 43, "attributes": {"title": "new name"} } ] } ``` ``` -------------------------------- ### Delete Report Source: https://steinbeck-lab.github.io/coconut/api-documentation.html Permanently deletes one or more reports identified by their IDs. This operation is restricted and requires special access privileges. ```APIDOC ## Delete Report ### Description Permanently deletes one or more reports identified by their IDs. This operation is restricted and requires special access privileges. ### Method DELETE ### Endpoint /api/reports ### Parameters #### Request Body - **resources** (array) - Required - An array of report IDs to delete. - (integer) - Required - The ID of a report to delete. ### Request Example ```json { "resources": [ 42, 43 ] } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.