diff --git a/docs/api-tools.md b/docs/api-tools.md index 812acef..a90accf 100644 --- a/docs/api-tools.md +++ b/docs/api-tools.md @@ -32,4 +32,4 @@ Choose the tool that best fits your workflow: - **For Python users**: Begin with the [Python API tool](/api-tools/python-api-tool/) - **For exploration**: Try the [Web API tool](/api-tools/web-api-tool/) in your browser -All tools use the same underlying [API endpoints](/api/) and support consistent authentication and query patterns. +All tools use the same underlying [API endpoints](/api/) and support consistent authentication and query patterns. Authentication uses Personal Access Tokens obtained via a browser-based device authorization flow — your password is never sent to a script. See the [API documentation](/api/) for full details on token management. diff --git a/docs/api-tools/matlab-api-tool.md b/docs/api-tools/matlab-api-tool.md index 567c31d..7502f77 100644 --- a/docs/api-tools/matlab-api-tool.md +++ b/docs/api-tools/matlab-api-tool.md @@ -17,50 +17,91 @@ nav_order: 1 The BrainSTEM MATLAB API tool (`brainstem_matlab_api_tools`) provides a thin wrapper around the REST endpoints documented in the [STEM API reference]({{ "/api/stem/" | absolute_url }}). This page mirrors the structure of those docs while expanding on hands-on usage. Every snippet below has been tested against the public API; replace placeholders (for example, IDs) with values available to your account. -Helper functions such as `get_token`, `load_model`, `load_project`, `load_session`, and `save_model` streamline typical MATLAB workflows while mapping their arguments directly onto the underlying HTTP parameters. +The `BrainstemClient` class is the recommended entry point. It holds the authentication token and base URL for all subsequent calls, and supports both interactive browser-based login and direct token injection for scripts and HPC workflows. > **Repository & tutorial:** Source code and examples live in [brainstem-org/brainstem_matlab_api_tools](https://github.com/brainstem-org/brainstem_matlab_api_tools). The repository includes the `brainstem_api_tutorial.m` script that mirrors this guide with runnable sections. ## Installation -Clone the MATLAB helper package and add it to your MATLAB path: +Clone the MATLAB helper package and add the root folder to your MATLAB path: ```matlab git clone https://github.com/brainstem-org/brainstem_matlab_api_tools.git -addpath(genpath('brainstem_matlab_api_tools')) +addpath('/path/to/brainstem_matlab_api_tools') ``` +Only the root folder needs to be added. MATLAB automatically discovers the `+brainstem` package folder and the `BrainstemClient` class. Do not add `+brainstem/` itself to the path. + ## Authentication -Run `get_token` once to create and store an authentication token. Subsequent API calls reuse the cached credentials. +BrainSTEM enforces two-factor authentication (2FA). To ensure 2FA is always respected, authentication uses a **browser-based device authorization flow** — your password is never sent to a script. + +### Recommended: Personal Access Token (scripts, HPC, automation) + +Create a token at [brainstem.org/private/users/tokens/](https://www.brainstem.org/private/users/tokens/). Tokens are valid for 1 year (sliding, auto-refresh). ```matlab -get_token +% Option A: environment variable (set once per shell/session) +setenv('BRAINSTEM_TOKEN', '') +client = BrainstemClient(); % picks it up automatically + +% Option B: pass directly +client = BrainstemClient('token', ''); ``` -Tokens expire periodically; re-run `get_token` if you see HTTP 401 responses. +### Interactive login (device flow, desktop MATLAB) + +When neither argument is supplied and the `BRAINSTEM_TOKEN` environment variable is not set, `BrainstemClient` opens a browser window automatically. If you are already logged in to BrainSTEM, simply click **Approve** in the browser. The token is cached and reused in future sessions. + +```matlab +client = BrainstemClient(); % opens browser login page +``` + +If the browser cannot be opened (headless environment), MATLAB prints a short code and URL to enter on any other device. + +Re-run `BrainstemClient()` or call `brainstem.get_token()` directly if you see HTTP 401 responses. ## Loading data -`load_model` mirrors the REST endpoints documented under [STEM API]({{ "/api/stem/" | absolute_url }}). All arguments map directly onto their HTTP counterparts, and the helper infers the correct `app` when you omit it. +`client.load` retrieves records from any BrainSTEM endpoint. All arguments map directly onto their HTTP counterparts. + +```matlab +out = client.load('session'); +disp(numel(out.sessions)) +``` + +Load a single record by UUID: ```matlab -sessions = load_model('model', 'session'); -disp(numel(sessions.sessions)) +out = client.load('session', 'id', ''); ``` -Convenience wrappers include the correct `app` and default `include` lists for common models: +Auto-paginate to retrieve all records across multiple pages: + +```matlab +out = client.load('session', 'load_all', true); +``` -- `load_project`: includes `sessions`, `subjects`, `collections`, `cohorts` -- `load_subject`: includes `procedures`, `subjectlogs` -- `load_session`: includes `dataacquisition`, `behaviors`, `manipulations`, `epochs` +### Convenience loaders -They expose a small set of shorthand arguments (for example, `name`, `projects`, `tags`) that expand into the appropriate filter entries internally. +Convenience loaders include the correct `app` and default `include` lists for common models: + +| Method | Default includes | Named filter kwargs | +|--------|-----------------|---------------------| +| `load_project` | sessions, subjects, collections, cohorts | `name`, `id`, `tags` | +| `load_subject` | procedures, subjectlogs | `name`, `id`, `sex`, `strain`, `tags` | +| `load_session` | dataacquisition, behaviors, manipulations, epochs | `name`, `id`, `projects`, `tags` | +| `load_collection` | sessions | `name`, `id`, `tags` | +| `load_cohort` | subjects | `name`, `id`, `tags` | +| `load_behavior` | — | `session`, `id`, `tags` | +| `load_dataacquisition` | — | `session`, `id`, `tags` | +| `load_manipulation` | — | `session`, `id`, `tags` | +| `load_procedure` | — | `subject`, `id`, `tags` | ```matlab -project = load_project('name', 'Allen Institute: Visual Coding – Neuropixels'); -subject = load_subject('name', 'Mouse'); -session = load_session('name', 'Example Session'); +project = client.load_project('name', 'Allen Institute: Visual Coding – Neuropixels'); +subject = client.load_subject('name', 'Mouse'); +session = client.load_session('name', 'Example Session'); ``` ## Filtering @@ -68,8 +109,7 @@ session = load_session('name', 'Example Session'); Filters accept cell arrays of key–value pairs. The modifier syntax (`.icontains`, `.iexact`, etc.) matches the API documentation. ```matlab -filtered = load_model( - 'model', 'project', ... +filtered = client.load('project', ... 'filter', {'name.icontains', 'Allen'}); disp(numel(filtered.projects)) @@ -78,19 +118,18 @@ disp(numel(filtered.projects)) Multiple filter conditions can be specified as pairs in the same cell array: ```matlab -filtered = load_model( - 'model', 'session', ... +filtered = client.load('session', ... 'filter', {'name.icontains', 'Rat', 'description.icontains', 'demo'}); ``` -The convenience functions also support multiple filter conditions through their shorthand parameters: +The convenience loaders also support shorthand filter parameters: ```matlab % Filter projects by name and tags -project = load_project('name', 'Allen', 'tags', '1'); +project = client.load_project('name', 'Allen', 'tags', '1'); % Filter subjects by name and sex -subject = load_subject('name', 'Mouse', 'sex', 'M'); +subject = client.load_subject('name', 'Mouse', 'sex', 'M'); ``` ## Sorting @@ -98,18 +137,15 @@ subject = load_subject('name', 'Mouse', 'sex', 'M'); Pass a cell array of field names in `sort`. Prefix with `-` for descending order. ```matlab -descending_sessions = load_model( - 'model', 'session', ... - 'sort', {'-start_time'}); +descending_sessions = client.load('session', 'sort', {'-start_time'}); ``` ## Including related records -Request related models (for example, `projects`, `datastorage`, `dataacquisition`) in a single call by supplying `include`. Each entry automatically expands to `.*`, mirroring the REST include syntax. +Request related models in a single call by supplying `include`. Each entry automatically expands to `.*`, mirroring the REST include syntax. ```matlab -with_related = load_model( - 'model', 'session', ... +with_related = client.load('session', ... 'include', {'projects', 'datastorage', 'dataacquisition'}); project_names = arrayfun(@(p) p.name, with_related.projects, 'UniformOutput', false); @@ -117,7 +153,7 @@ project_names = arrayfun(@(p) p.name, with_related.projects, 'UniformOutput', fa ## Creating records -Use `save_model` with the required fields from the STEM API reference. The example below assumes you have contributor access to the project ID provided. Note that `tags` is a required field and can be set to an empty array if no tags are needed. +Use `client.save` with the required fields from the STEM API reference. The example below assumes you have contributor access to the project ID provided. Note that `tags` is a required field and can be set to an empty array if no tags are needed. ```matlab payload = struct(); @@ -126,32 +162,35 @@ payload.description = 'Created via MATLAB API tool'; payload.projects = {'your-project-uuid'}; payload.tags = []; -created = save_model('model', 'session', 'data', payload); +created = client.save(payload, 'session'); session_id = created.session.id; ``` ## Updating records -Update existing records by placing the record ID inside the payload struct. `save_model` detects the `id` field, switches to `PUT`, and replaces the stored record with the data you supply. Remember to include the `tags` field even when updating. +Pass a struct with an `id` field and any fields to change. Use `'method', 'patch'` for a partial update (only the supplied fields are modified). ```matlab -update_data = struct( +update_data = struct( ... 'id', 'your-session-uuid', ... 'description', 'Updated via MATLAB API tool', ... 'tags', []); -updated = save_model( - 'model', 'session', ... - 'data', update_data); +updated = client.save(update_data, 'session', 'method', 'patch'); +``` + +## Deleting records + +```matlab +client.delete('your-session-uuid', 'session'); ``` ## Troubleshooting -- **401 Unauthorized**: Regenerate your token with `get_token`. +- **401 Unauthorized**: Regenerate your token with `brainstem.get_token()` or create a new Personal Access Token at [brainstem.org/private/users/tokens/](https://www.brainstem.org/private/users/tokens/). - **403 Forbidden**: Check that your user or group has the required permissions listed in the STEM API documentation. - **404 Not Found**: Confirm the record exists in the selected portal (public/private). - **Validation errors (400)**: Ensure your payload matches the field definitions in the API reference. Remember that `tags` is a required field for sessions (can be an empty array). -- **Delete operations**: The MATLAB helpers focus on read and write actions. Use the Python client or direct REST calls if you need to delete records. The repository ships with `brainstem_api_tutorial.m`, a tutorial script demonstrating common workflows. diff --git a/docs/api-tools/python-api-tool.md b/docs/api-tools/python-api-tool.md index 9e064f1..fe37cd6 100644 --- a/docs/api-tools/python-api-tool.md +++ b/docs/api-tools/python-api-tool.md @@ -17,7 +17,7 @@ nav_order: 2 The BrainSTEM Python API tool (`brainstem_python_api_tools`) provides a thin wrapper around the REST endpoints documented in the [STEM API reference]({{ "/api/stem/" | absolute_url }}). This page mirrors the structure of those docs while expanding on hands-on usage. Every snippet below has been tested against the public API; replace placeholders (for example, IDs) with values you can access in your own account. -> **Repository & notebooks:** Source code and examples live in [brainstem-org/brainstem_python_api_tools](https://github.com/brainstem-org/brainstem_python_api_tools). The repository includes the `brainstem_api_tutorial.ipynb` notebook that mirrors this guide with runnable cells. +> **Repository & notebooks:** Source code and examples live in [brainstem-org/brainstem_python_api_tools](https://github.com/brainstem-org/brainstem_python_api_tools). The repository includes the `brainstem_api_tutorial.ipynb` notebook and `brainstem_api_tutorial.py` script that mirror this guide with runnable cells. ## Installation @@ -33,37 +33,63 @@ git clone https://github.com/brainstem-org/brainstem_python_api_tools.git ## Authentication -Initializing `BrainstemClient` prompts for your BrainSTEM email and password unless you supply a saved token. Tokens are stored locally in the API tool cache and reused automatically. +BrainSTEM enforces two-factor authentication (2FA). To ensure 2FA is always respected, authentication uses a **browser-based device authorization flow** — your password is never sent to a script or CLI tool. + +### First run — browser flow (default) ```python from brainstem_api_tools import BrainstemClient -# Prompts for credentials the first time and caches a token +# Opens a browser window for secure login (2FA is enforced). +# The token is cached at ~/.config/brainstem/token and reused automatically. client = BrainstemClient() ``` +On the first run a browser window opens automatically. If you are already logged in to BrainSTEM, you only need to click **Approve**. The issued token is stored with owner-read-only permissions (`0600`) and reused on subsequent runs without another browser prompt. + +### Headless environments (no browser) + +For servers or Docker containers where no browser is available, pass `headless=True`. The CLI prints a short URL and user code instead of opening a browser: + ```python -# Use a saved token instead of prompting for credentials -token = "YOUR_TOKEN" -client = BrainstemClient(token=token) +client = BrainstemClient(headless=True) +# Prints: Open https://www.brainstem.org/account/authorize/ and enter: WXYZ-1234 +``` + +Navigate to that URL on any device, enter the code, and approve — the script receives the token automatically. + +### Pass a token directly + +If you have already created a Personal Access Token at [brainstem.org/private/users/tokens/](https://www.brainstem.org/private/users/tokens/), you can pass it directly and skip the browser flow entirely. Tokens are valid for 1 year (sliding, auto-refresh). -# Or load a token from a .env file (keep .env gitignored) -from dotenv import load_dotenv +```python +client = BrainstemClient(token="YOUR_PERSONAL_ACCESS_TOKEN") +``` + +For scripts and automation it is recommended to read the token from an environment variable rather than hardcoding it: + +```python import os from brainstem_api_tools import BrainstemClient -load_dotenv() -client = BrainstemClient(token=os.getenv("BRAINSTEM_API_TOKEN")) +client = BrainstemClient(token=os.environ["BRAINSTEM_TOKEN"]) +``` + +### Connect to a different server + +```python +# Local development instance +client = BrainstemClient(url="http://127.0.0.1:8000/") ``` -If you receive a `401 Unauthorized` response, run `BrainstemClient()` again to refresh the cached token or pass a newly generated token explicitly. +If you receive a `401 Unauthorized` response, re-authenticate by running `brainstem login` in the CLI (see [CLI](#command-line-interface)) or create a new token at [brainstem.org/private/users/tokens/](https://www.brainstem.org/private/users/tokens/). ## Quick start -Load projects using the private portal (default) or specify the public portal for open datasets. Response payloads follow the schema described in `docs/api/stem/project.md`. +Load records using the private portal (default) or specify the public portal for open datasets. Response payloads follow the schema described in the [STEM API reference]({{ "/api/stem/" | absolute_url }}). ```python -public_projects = client.load_model("project", portal="public").json() +public_projects = client.load("project", portal="public").json() projects = public_projects.get('projects', []) print(f"Loaded {len(projects)} public projects") @@ -74,7 +100,7 @@ if projects: Private data uses the default portal. Ensure the authenticated user has the necessary permissions, as outlined in the API docs. ```python -private_sessions = client.load_model("session").json() +private_sessions = client.load("session").json() sessions = private_sessions.get('sessions', []) if sessions: @@ -86,7 +112,7 @@ if sessions: Filters map directly onto the query parameters documented in the STEM API. Common case-insensitive modifiers include `.icontains`, `.iexact`, `.istartswith`, and `.iendswith`. ```python -filtered = client.load_model( +filtered = client.load( "project", portal="public", filters={"name.icontains": "visual"} @@ -98,7 +124,7 @@ print(f"Matches: {len(filtered)}") Multiple filters apply AND logic. ```python -filtered = client.load_model( +filtered = client.load( "project", portal="public", filters={ @@ -116,69 +142,99 @@ Provide field names in `sort`. Prefix a field with `-` for descending order, mir ```python # Sort projects alphabetically by name -alpha_projects = client.load_model( +alpha_projects = client.load( "project", portal="public", - sort=['name'] # Ascending alphabetical order + sort=['name'] ).json() -print("Alphabetically sorted projects:") -for i, project in enumerate(alpha_projects.get('projects', [])[:3]): - print(f"{i+1}. {project.get('name')}") - -# Sort projects reverse-alphabetically by name -reverse_alpha = client.load_model( +# Sort in descending order +reverse_alpha = client.load( "project", portal="public", - sort=['-name'] # Descending alphabetical order + sort=['-name'] ).json() +``` + +## Pagination + +Results are paged. Use `limit` and `offset` for manual pagination, or pass `load_all=True` to fetch every page automatically. + +```python +# Manual — second page of 20 +page2 = client.load("session", limit=20, offset=20).json() -print("Reverse alphabetically sorted projects:") -for i, project in enumerate(reverse_alpha.get('projects', [])[:3]): - print(f"{i+1}. {project.get('name')}") +# Auto-paginate — returns a merged dict with all records +all_sessions = client.load("session", load_all=True) +print(f"Total sessions: {len(all_sessions['sessions'])}") +``` + +## Convenience loaders + +Convenience loaders set sensible `include` defaults and expose named keyword arguments for the most common filters. + +| Method | Default includes | Named filter kwargs | +|--------|-----------------|---------------------| +| `load_project` | sessions, subjects, collections, cohorts | `name`, `tags` | +| `load_subject` | procedures, subjectlogs | `name`, `projects`, `sex`, `strain`, `tags` | +| `load_session` | dataacquisition, behaviors, manipulations, epochs | `name`, `projects`, `datastorage`, `tags` | +| `load_collection` | sessions | `name`, `tags` | +| `load_cohort` | subjects | `name`, `tags` | +| `load_behavior` | — | `session`, `tags` | +| `load_dataacquisition` | — | `session`, `tags` | +| `load_manipulation` | — | `session`, `tags` | +| `load_procedure` | — | `subject`, `tags` | + +```python +# Load all sessions whose name contains "Rat", with related data +sessions = client.load_session(name='Rat', load_all=True) + +# Load subjects by sex and project +subjects = client.load_subject(sex='M', projects='', load_all=True) + +# Load behaviors scoped to a session +behaviors = client.load_behavior(session='', load_all=True) + +# Convenience loaders also accept filters= and include= overrides +sessions = client.load_session( + name='Rat', + include=['projects'], + filters={'description.icontains': 'hippocampus'}, + load_all=True, +) ``` ## Creating records -Write operations require contributor permissions on the target project or resource. Use `save_model` with the required fields documented in the relevant API page (for example, `docs/api/stem/session.md`). +Write operations require contributor permissions on the target project. Use `save` with the required fields documented in the relevant API page. -**Important**: The `projects` field must be a list (array) of project IDs, not a single string. +**Important**: The `projects` field must be a list (array) of project UUIDs, not a single string. ```python payload = { "name": "Example Session", - "projects": ["your-project-uuid"], # Must be a list, not a string! + "projects": ["your-project-uuid"], "description": "Created via API tool" } -created = client.save_model("session", data=payload).json() +created = client.save("session", data=payload).json() if 'session' in created: session_id = created["session"]["id"] print(f"Created session with ID: {session_id}") else: - print(f"Error creating session: {created}") + print(f"Error: {created}") ``` ## Updating records -Fetch the target record, modify the fields you want to change, and resubmit the partial payload. +Pass the record UUID as `id` to perform a partial update (PATCH). Only the fields you supply are changed. ```python -# First load a session you have permission to modify -filtered_session = client.load_model( - 'session', - filters={'name.iexact': 'your session'} -).json() - -# Update the description -filtered_session['description'] = 'Updated via API' - -# Pass the whole filtered_session object to save_model -updated_session = client.save_model( - 'session', - id=filtered_session['sessions'][0]['id'], - data=filtered_session +updated = client.save( + 'session', + id='your-session-uuid', + data={'description': 'Updated via API'} ).json() print("Session updated successfully") @@ -186,18 +242,76 @@ print("Session updated successfully") ## Deleting records -Use `delete_model` with the record ID. A successful delete returns status code `204 No Content`. +Use `delete` with the record UUID. A successful delete returns status code `204 No Content`. ```python -response = client.delete_model("session", id="your-session-uuid") +response = client.delete("session", id="your-session-uuid") if response.status_code == 204: print("Session deleted") ``` +## Command-line interface + +After installation a `brainstem` command is available in your shell. + +### Authentication + +```bash +# Authenticate (opens browser) and cache token +brainstem login + +# Headless — prints URL + code instead of opening browser +brainstem login --headless + +# Connect to a local dev server +brainstem login --url http://127.0.0.1:8000/ + +# Remove cached token +brainstem logout +``` + +### Loading data + +```bash +# Load all sessions (private portal) +brainstem load session + +# Filter, sort and embed related data +brainstem load session --filters name.icontains=Rat --sort -name --include projects + +# Load a single record by UUID +brainstem load session --id + +# Manual pagination +brainstem load session --limit 20 --offset 20 + +# Public portal +brainstem load project --portal public +``` + +### Creating and updating records + +```bash +# Create a new session +brainstem save session --data '{"name":"New session","projects":[""]}' + +# Update an existing record (partial update) +brainstem save session --id --data '{"description":"updated"}' +``` + +### Deleting records + +```bash +brainstem delete session --id +``` + +All subcommands accept `--token`, `--headless`, and `--url` to override defaults. + ## Troubleshooting -- **401 Unauthorized**: Re-run `BrainstemClient()` to generate a fresh token or confirm credentials. +- **401 Unauthorized**: Run `brainstem login` or create a new Personal Access Token at [brainstem.org/private/users/tokens/](https://www.brainstem.org/private/users/tokens/). - **403 Forbidden**: Verify you have the necessary permissions (see the permission tables in the STEM API docs). +- **Token file location**: `~/.config/brainstem/token` — stored with `0600` permissions. Never commit this file to version control. - **404 Not Found**: Make sure the ID exists and is within the selected portal. - **Validation errors (400)**: Match the required fields and value formats listed in the model-specific documentation. diff --git a/docs/api.md b/docs/api.md index 16a4ffe..65f4c9e 100644 --- a/docs/api.md +++ b/docs/api.md @@ -17,29 +17,18 @@ The BrainSTEM API provides programmatic access to the complete data model, enabl ## API Token Management -BrainSTEM supports multiple token types for secure API access. Choose the authentication method that best fits your use case - from long-lived tokens for scripts to short-lived tokens for web applications. +BrainSTEM uses **Personal Access Tokens** for API authentication. Because BrainSTEM enforces two-factor authentication (2FA), tokens must be obtained through a browser-based flow — your password is never sent to a script or CLI tool. -### Token Types Overview -{: .no_toc} - -| Token Type | Duration | Renewal | Best For | -|------------|----------|---------|----------| -| **Personal Access Token** | 1 year (auto-refresh) | Automatic when used | Scripts, integrations, automation | -| **Access Token** | 1 hour (fixed expiry) | Refresh token required | Web applications, temporary access | -| **Refresh Token** | 30 days (fixed expiry) | Re-authenticate with credentials | Renewing access tokens | +| Token Type | Lifetime | How to obtain | Best for | +|------------|----------|---------------|----------| +| **Personal Access Token** | 1 year (sliding, auto-refresh) | Web UI form or CLI device auth flow | Scripts, integrations, CLI tools, automation | -### 1. Personal Access Tokens (Recommended) +### Option 1: Create a Token in the Web UI {: .no_toc} -Personal access tokens are sliding tokens that automatically refresh themselves and last for 1 year. They're perfect for scripts and integrations since they don't require manual renewal. - -**Creating Personal Access Tokens:** -1. Visit your [API Token Management page](https://www.brainstem.org/private/users/tokens/) -2. Enter a descriptive name (e.g., "My API Integration", "Data Export Script") -3. Click "Create Personal Access" -4. Save the token immediately - it's only shown once when created +Visit your [API Token Management page](https://www.brainstem.org/private/users/tokens/), enter a descriptive token name (e.g., "My API Integration", "Data Export Script"), and click **Create**. Copy the token immediately — it is only shown once. -**Using Personal Access Tokens:** +**Use your token in requests:** ```bash curl -H "Authorization: Bearer YOUR_PERSONAL_TOKEN" \ https://www.brainstem.org/api/private/stem/project/ @@ -48,80 +37,68 @@ curl -H "Authorization: Bearer YOUR_PERSONAL_TOKEN" \ {: .important } > Personal access tokens are shown only once when created. Save them immediately in a secure location. -### 2. Short-lived Access Tokens +### Option 2: CLI Device Authorization Flow {: .no_toc} -For temporary access or when you need fresh tokens regularly. These tokens expire after 1 hour (3600 seconds) and must be renewed using a refresh token which can be used for 30 days. +CLI tools (e.g. the BrainSTEM Python and MATLAB API tools) use a browser-based sign-in flow so that 2FA is always enforced. Your password is never sent to the CLI. -**Get Access + Refresh Token Pair:** -```bash -curl -X POST https://www.brainstem.org/api/auth/token/ \ - -H "Content-Type: application/json" \ - -d '{"email": "your-email", "password": "your-password"}' -``` +**Browser-redirect mode (default)** -**Response:** -```json -{ - "access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", - "refresh": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", - "token_type": "bearer", - "expires_in": 3600 -} -``` +The CLI opens a browser window automatically. If you are already logged in, just click **Approve**. -**Renew Access Token (before it expires):** -```bash -curl -X POST https://www.brainstem.org/api/auth/token/refresh/ \ - -H "Content-Type: application/json" \ - -d '{"refresh": "YOUR_REFRESH_TOKEN"}' ``` +# Step 1 — CLI initiates a device session +POST /api/auth/device/ +→ {"session_id": "...", "verification_uri_complete": "https://www.brainstem.org/account/authorize/?session=...", ...} -{: .important } -> When renewing the access token, a new refresh token will also be provided and the previous refresh token becomes invalid. +# Step 2 — CLI opens that URL in your browser; you approve (with 2FA if needed) -**Use Access Token:** -```bash -curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ - https://www.brainstem.org/api/private/stem/project/ +# Step 3 — CLI polls until approved +POST /api/auth/device/token/ body: {"device_code": "..."} +→ {"status": "authorization_pending"} ← keep polling every 5 s +→ {"status": "success", "token": "YOUR_PAT"} ← done ``` -### 3. Backward Compatible Method -{: .no_toc} +**Headless / no-browser mode** -Direct username/password authentication that returns a long-lived sliding token (equivalent to a Personal Access Token): +For servers or Docker environments where no browser is available, the CLI prints a short code instead: -```bash -curl -X POST https://www.brainstem.org/api/token/ \ - -H "Content-Type: application/json" \ - -d '{"username": "your-email", "password": "your-password"}' ``` +Open https://www.brainstem.org/account/authorize/ in a browser +and enter the code: WXYZ-1234 -**Response:** -```json -{ - "access": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", - "token_id": 1, - "message": "Token created successfully" -} +Waiting for authorization... ``` -{: .note } -> The created token will be listed in your Personal Access Token management page and can be deleted manually. +Navigate to that URL on any device, enter the code, and approve — the CLI receives the token automatically. + +**Poll response reference** + +All `POST /api/auth/device/token/` responses return HTTP 200. Check the JSON body: + +```json +{"status": "authorization_pending"} // keep polling (every 5 s) +{"status": "success", "token": "..."} // done — save the token +{"error": "access_denied"} // user clicked Deny — abort +{"error": "expired_token"} // 15-minute window elapsed — restart +{"error": "already_used"} // token already collected +``` ### Authentication in API Tools {: .no_toc} -The token acquisition process is built into the official API tools: -- **MATLAB and Python tools**: Automatically handle token requests and management -- **Web API tool**: Uses your regular credentials (email and password) for browser-based access + +The device authorization flow is built into the official API tools: +- **Python API tool**: `BrainstemClient()` opens a browser automatically; `BrainstemClient(headless=True)` for headless environments. See the [Python API tool docs](/api-tools/python-api-tool/). +- **MATLAB API tool**: `BrainstemClient()` opens a browser automatically; pass `'token', getenv('BRAINSTEM_TOKEN')` for scripts. See the [MATLAB API tool docs](/api-tools/matlab-api-tool/). +- **Web API tool**: Uses your existing browser session — no token required for basic exploration. ### Security Best Practices {: .no_toc} -- **Keep tokens secure**: Never share them in public repositories or logs -- **Save immediately**: Personal access tokens are shown only once when created -- **Monitor expiration**: Access tokens (1 hour) and refresh tokens (30 days) have fixed lifetimes -- **Clean up regularly**: Delete unused tokens and monitor usage in your [token management page](https://www.brainstem.org/private/users/tokens/) +- **Never send your password to scripts**: Use the device auth flow or create a token in the web UI +- **Keep tokens secure**: Never commit tokens to version control or share them in logs +- **Save immediately**: Personal access tokens are shown only once when created +- **Clean up regularly**: Delete unused tokens via your [token management page](https://www.brainstem.org/private/users/tokens/) ## Available API Endpoints @@ -175,7 +152,7 @@ https://www.BrainSTEM.org/api/private/stem/session/ **Specific session by ID:** ``` -https://www.BrainSTEM.org/api/private/stem/session/12345678-1234-1234-1234-123456789abc/ +https://www.BrainSTEM.org/api/private/stem/session// ``` **Procedure endpoint:** diff --git a/docs/api/dissemination/journal.md b/docs/api/dissemination/journal.md index 8ece7c9..e2817ee 100644 --- a/docs/api/dissemination/journal.md +++ b/docs/api/dissemination/journal.md @@ -40,7 +40,7 @@ Optional fields such as `comments` can be omitted from list/detail responses whe {: .no_toc} ``` -resp = client.load_model('journal') +resp = client.load('journal') ``` ### Response example @@ -49,19 +49,19 @@ resp = client.load_model('journal') ``` {'journals': [ { - 'id': 'fb66207b-bc2d-4e93-9047-7ad38a8883ef', + 'id': '', 'name': 'bioRxiv', 'description': '', 'website': 'https://www.biorxiv.org' }, { - 'id': 'd061bcf6-ac0c-4aa1-8ead-09aadbde7bf9', + 'id': '', 'name': 'eLife', 'description': '', 'website': '' }, { - 'id': 'da3359b7-e380-4dc6-ba9d-04831d3082d9', + 'id': '', 'name': 'SomeJournal', 'description': '', 'website': '' @@ -86,7 +86,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("journal", data={ +resp = client.save("journal", data={ 'name': 'MyNewJournal', 'description': '', 'website': 'newjournal.com'} @@ -98,7 +98,7 @@ resp = client.save_model("journal", data={ ``` {'journal_approval': { - 'id': '549b9e4f-5253-44f8-93ee-f18f08a39a36', + 'id': '', 'name': 'MyNewJournal', 'description': '', 'website': 'http://newjournal.com' @@ -118,7 +118,7 @@ resp = client.save_model("journal", data={ {: .no_toc} ``` -resp = client.load_model('journal', id='da3359b7-e380-4dc6-ba9d-04831d3082d9') +resp = client.load('journal', id='') ``` ### Response example @@ -126,7 +126,7 @@ resp = client.load_model('journal', id='da3359b7-e380-4dc6-ba9d-04831d3082d9') ``` {'journal': { - 'id': 'da3359b7-e380-4dc6-ba9d-04831d3082d9', + 'id': '', 'name': 'SomeJournal', 'description': '', 'website': ''} @@ -148,7 +148,7 @@ resp = client.load_model('journal', id='da3359b7-e380-4dc6-ba9d-04831d3082d9') {: .no_toc} ``` -resp = client.save_model("journal", id="da3359b7-e380-4dc6-ba9d-04831d3082d9", data={"description": "new text"}) +resp = client.save("journal", id="", data={"description": "new text"}) ``` ### Response example @@ -156,7 +156,7 @@ resp = client.save_model("journal", id="da3359b7-e380-4dc6-ba9d-04831d3082d9", d ``` {'journal_approval': { - 'id': '640ea107-cf9e-413a-b0b8-562082654481', + 'id': '', 'name': 'SomeJournal', 'description': 'new text', 'website': ''} @@ -177,7 +177,7 @@ resp = client.save_model("journal", id="da3359b7-e380-4dc6-ba9d-04831d3082d9", d {: .no_toc} ``` -resp = client.delete_model("journal", id="d37c9255-d5ae-47d9-b6e1-4ec760c200fb") +resp = client.delete("journal", id="") ``` ## List approvals @@ -192,7 +192,7 @@ resp = client.delete_model("journal", id="d37c9255-d5ae-47d9-b6e1-4ec760c200fb") {: .no_toc} ``` -resp = client.load_model('journalapproval') +resp = client.load('journalapproval') ``` ### Response example @@ -201,17 +201,17 @@ resp = client.load_model('journalapproval') ``` {'journal_approvals': [ { - 'id': '640ea107-cf9e-413a-b0b8-562082654481', + 'id': '', 'name': 'SomeJournal', 'description': 'new text', 'website': '', - 'instance_id': 'da3359b7-e380-4dc6-ba9d-04831d3082d9', + 'instance_id': '', 'action': 'Change', 'reviewer': None, 'status': 'Pending' }, { - 'id': '549b9e4f-5253-44f8-93ee-f18f08a39a36', + 'id': '', 'name': 'MyNewJournal', 'description': '', 'website': 'http://newjournal.com', @@ -236,7 +236,7 @@ resp = client.load_model('journalapproval') {: .no_toc} ``` -resp = client.load_model('journalapproval', id='549b9e4f-5253-44f8-93ee-f18f08a39a36') +resp = client.load('journalapproval', id='') ``` ### Response example @@ -244,7 +244,7 @@ resp = client.load_model('journalapproval', id='549b9e4f-5253-44f8-93ee-f18f08a3 ``` {'journal_approval': { - 'id': '549b9e4f-5253-44f8-93ee-f18f08a39a36', + 'id': '', 'name': 'MyNewJournal', 'description': '', 'website': 'http://newjournal.com', @@ -268,7 +268,7 @@ resp = client.load_model('journalapproval', id='549b9e4f-5253-44f8-93ee-f18f08a3 {: .no_toc} ``` -resp = client.save_model("journalapproval", id="549b9e4f-5253-44f8-93ee-f18f08a39a36", options="accept") +resp = client.save("journalapproval", id="", options="accept") ``` @@ -284,5 +284,5 @@ resp = client.save_model("journalapproval", id="549b9e4f-5253-44f8-93ee-f18f08a3 {: .no_toc} ``` -resp = client.save_model("journalapproval", id="549b9e4f-5253-44f8-93ee-f18f08a39a36", options="reject") +resp = client.save("journalapproval", id="", options="reject") ``` diff --git a/docs/api/dissemination/publication.md b/docs/api/dissemination/publication.md index 7908ddc..9e7a6f4 100644 --- a/docs/api/dissemination/publication.md +++ b/docs/api/dissemination/publication.md @@ -41,7 +41,7 @@ nav_order: 4 {: .no_toc} ``` -resp = client.load_model('publication') +resp = client.load('publication') ``` ### Response example @@ -50,10 +50,10 @@ resp = client.load_model('publication') ``` {'publications': [ { - "id": "9cb4b5ba-b5d9-4bad-9b1e-65b5bdce0746", + "id": "", "title": "RTHybrid: A Standardized and Open-Source Real-Time Software Model Library for Experimental Neuroscience", "authors": "Amaducci R, Reyes-Sanchez M, Elices I, Rodriguez FB and Varona P", - "journal": "0a71caa7-c984-47a4-921c-8b18405ee202", + "journal": "", "abstract": "Short explanation of the paper", "doi": "", "publication_url": "", @@ -61,10 +61,10 @@ resp = client.load_model('publication') "publication_date": "2020-03-12" }, { - "id": "8d0e93c1-ffa8-4d7d-a42a-65e1a0d938f6", + "id": "", "title": "Cooling of Medial Septum Reveals Theta Phase Lag Coordination of Hippocampal Cell Assemblies", "authors": "Peter Christian Petersen, György Buzsáki", - "journal": "330b41c4-b4a4-4761-8d59-300695fdaf2a", + "journal": "", "abstract": "Short explanation of the paper", "doi": "", "publication_url": "https://www.cell.com/neuron/fulltext/S0896-6273(20)30392-5", @@ -90,11 +90,11 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("publication", data= +resp = client.save("publication", data= { "title": "MyNewPaper", "authors": "Me et al.", - "journal": "0a71caa7-c984-47a4-921c-8b18405ee202", + "journal": "", "abstract": "Short explanation of the paper", "doi": "", "publication_url": "", @@ -108,10 +108,10 @@ resp = client.save_model("publication", data= {: .no_toc} ``` -{'publication': {'id': 'e308cb04-428b-4b2c-b86b-15e02c664560', +{'publication': {'id': '', 'title': 'MyNewPaper', 'authors': 'Me et al.', - 'journal': '0a71caa7-c984-47a4-921c-8b18405ee202', + 'journal': '', 'abstract': 'Short explanation of the paper', 'doi': '', 'publication_url': '', @@ -132,17 +132,17 @@ resp = client.save_model("publication", data= {: .no_toc} ``` -resp = client.load_model('publication', id='da3359b7-e380-4dc6-ba9d-04831d3082d9') +resp = client.load('publication', id='') ``` ### Response example {: .no_toc} ``` -{'publication': {'id': 'e308cb04-428b-4b2c-b86b-15e02c664560', +{'publication': {'id': '', 'title': 'MyNewPaper', 'authors': 'Me et al.', - 'journal': '0a71caa7-c984-47a4-921c-8b18405ee202', + 'journal': '', 'abstract': 'Short explanation of the paper', 'doi': '', 'publication_url': '', @@ -165,17 +165,17 @@ resp = client.load_model('publication', id='da3359b7-e380-4dc6-ba9d-04831d3082d9 {: .no_toc} ``` -resp = client.save_model("publication", id="e308cb04-428b-4b2c-b86b-15e02c664560", data={"abstract": "new text"}) +resp = client.save("publication", id="", data={"abstract": "new text"}) ``` ### Response example {: .no_toc} ``` -{'publication': {'id': 'e308cb04-428b-4b2c-b86b-15e02c664560', +{'publication': {'id': '', 'title': 'MyNewPaper', 'authors': 'Me et al.2', - 'journal': '0a71caa7-c984-47a4-921c-8b18405ee202', + 'journal': '', 'abstract': 'new text', 'doi': '', 'publication_url': '', @@ -197,5 +197,5 @@ resp = client.save_model("publication", id="e308cb04-428b-4b2c-b86b-15e02c664560 {: .no_toc} ``` -resp = client.delete_model("publication", id="e308cb04-428b-4b2c-b86b-15e02c664560") +resp = client.delete("publication", id="") ``` diff --git a/docs/api/modules/behavior.md b/docs/api/modules/behavior.md index 5b1d159..7f3c8a5 100644 --- a/docs/api/modules/behavior.md +++ b/docs/api/modules/behavior.md @@ -39,7 +39,7 @@ nav_order: 1 {: .no_toc} ``` -resp = client.load_model('behavior') +resp = client.load('behavior') ``` ### Response example @@ -48,25 +48,25 @@ resp = client.load_model('behavior') ``` {'behaviors': [ { - 'id': '00000000-0000-0000-0000-000000000000', - 'session': '00000000-0000-0000-0000-000000000000', - 'subjects': ['00000000-0000-0000-0000-000000000000'], - 'setup': '00000000-0000-0000-0000-000000000000', - 'behavioralassay': '00000000-0000-0000-0000-000000000000' + 'id': '', + 'session': '', + 'subjects': [''], + 'setup': '', + 'behavioralassay': '' }, { - 'id': '00000000-0000-0000-0000-000000000000', - 'session': '00000000-0000-0000-0000-000000000000', - 'subjects': ['00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000'], - 'setup': '00000000-0000-0000-0000-000000000000', - 'behavioralassay': '00000000-0000-0000-0000-000000000000' + 'id': '', + 'session': '', + 'subjects': ['', ''], + 'setup': '', + 'behavioralassay': '' }, { - 'id': '00000000-0000-0000-0000-000000000000', - 'session': '00000000-0000-0000-0000-000000000000', - 'subjects': ['00000000-0000-0000-0000-000000000000'], - 'setup': '00000000-0000-0000-0000-000000000000', - 'behavioralassay': '00000000-0000-0000-0000-000000000000' + 'id': '', + 'session': '', + 'subjects': [''], + 'setup': '', + 'behavioralassay': '' } ]} ``` @@ -83,11 +83,11 @@ resp = client.load_model('behavior') {: .no_toc} ``` -resp = client.save_model("behavior", data={ - "session": "00000000-0000-0000-0000-000000000000", - "subjects": ["00000000-0000-0000-0000-000000000000"], - "setup": "00000000-0000-0000-0000-000000000000", - "behavioralassay": "00000000-0000-0000-0000-000000000000", +resp = client.save("behavior", data={ + "session": "", + "subjects": [""], + "setup": "", + "behavioralassay": "", "notes": "Optional notes about this behavior" }) ``` @@ -98,11 +98,11 @@ resp = client.save_model("behavior", data={ ``` {'behavior': { - 'id': '00000000-0000-0000-0000-000000000000', - 'session': '00000000-0000-0000-0000-000000000000', - 'subjects': ['00000000-0000-0000-0000-000000000000'], - 'setup': '00000000-0000-0000-0000-000000000000', - 'behavioralassay': '00000000-0000-0000-0000-000000000000', + 'id': '', + 'session': '', + 'subjects': [''], + 'setup': '', + 'behavioralassay': '', 'notes': 'Optional notes about this behavior' } } @@ -121,7 +121,7 @@ resp = client.save_model("behavior", data={ {: .no_toc} ``` -resp = client.load_model('behavior', id='00000000-0000-0000-0000-000000000000') +resp = client.load('behavior', id='') ``` ### Response example @@ -130,11 +130,11 @@ resp = client.load_model('behavior', id='00000000-0000-0000-0000-000000000000') ``` {'behavior': { - 'id': '00000000-0000-0000-0000-000000000000', - 'session': '00000000-0000-0000-0000-000000000000', - 'subjects': ['00000000-0000-0000-0000-000000000000'], - 'setup': '00000000-0000-0000-0000-000000000000', - 'behavioralassay': '00000000-0000-0000-0000-000000000000', + 'id': '', + 'session': '', + 'subjects': [''], + 'setup': '', + 'behavioralassay': '', 'notes': 'Optional notes about this behavior' } } @@ -153,7 +153,7 @@ resp = client.load_model('behavior', id='00000000-0000-0000-0000-000000000000') {: .no_toc} ``` -resp = client.save_model("behavior", id="00000000-0000-0000-0000-000000000000", data={'subjects': ['00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000']}) +resp = client.save("behavior", id="", data={'subjects': ['', '']}) ``` ### Response example @@ -162,11 +162,11 @@ resp = client.save_model("behavior", id="00000000-0000-0000-0000-000000000000", ``` {'behavior': { - 'id': '00000000-0000-0000-0000-000000000000', - 'session': '00000000-0000-0000-0000-000000000000', - 'subjects': ['00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000000'], - 'setup': '00000000-0000-0000-0000-000000000000', - 'behavioralassay': '00000000-0000-0000-0000-000000000000', + 'id': '', + 'session': '', + 'subjects': ['', ''], + 'setup': '', + 'behavioralassay': '', 'notes': 'Optional notes about this behavior' } } @@ -185,5 +185,5 @@ resp = client.save_model("behavior", id="00000000-0000-0000-0000-000000000000", {: .no_toc} ``` -resp = client.delete_model("behavior", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("behavior", id="") ``` diff --git a/docs/api/modules/consumablestock.md b/docs/api/modules/consumablestock.md index 958337f..97fd013 100644 --- a/docs/api/modules/consumablestock.md +++ b/docs/api/modules/consumablestock.md @@ -50,7 +50,7 @@ A detailed list of the available `type` options and accepted schemas for the `de {: .no_toc} ``` -resp = client.load_model('consumablestock') +resp = client.load('consumablestock') ``` ### Response example @@ -59,18 +59,18 @@ resp = client.load_model('consumablestock') ``` {'consumable stocks': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'OpticFiber', 'status': 'AVAILABLE', 'notes': 'Backup spool', - 'inventory': '00000000-0000-0000-0000-000000000000', + 'inventory': '', 'acquisition_date': '2024-03-01', 'expiration_date': None, 'storage_location': 'Cabinet A', 'storage_conditions': 'Room temperature', 'intended_use': 'Optogenetics', 'cost': '120 USD', - 'consumable': '00000000-0000-0000-0000-000000000000', + 'consumable': '', 'details': { 'fiberIds': 'OF-2024-03-A', 'quantity': 12 @@ -78,11 +78,11 @@ resp = client.load_model('consumablestock') 'type_schema_version': '0.0.0' }, { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'SiliconProbe', 'status': 'RESERVED', 'notes': 'Quarterly order', - 'inventory': '00000000-0000-0000-0000-000000000000', + 'inventory': '', 'acquisition_date': '2024-02-15', 'expiration_date': None, 'storage_location': 'Freezer shelf 2', @@ -111,12 +111,12 @@ resp = client.load_model('consumablestock') {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "consumablestock", data={ "type": "OpticFiber", - "inventory": "00000000-0000-0000-0000-000000000000", - "consumable": "00000000-0000-0000-0000-000000000000", + "inventory": "", + "consumable": "", "notes": "Initial batch", "acquisition_date": "2024-03-01", "storage_location": "Cabinet A", @@ -130,18 +130,18 @@ resp = client.save_model( ``` {'consumable stock': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'OpticFiber', 'status': 'AVAILABLE', 'notes': 'Initial batch', - 'inventory': '00000000-0000-0000-0000-000000000000', + 'inventory': '', 'acquisition_date': '2024-03-01', 'expiration_date': None, 'storage_location': 'Cabinet A', 'storage_conditions': None, 'intended_use': None, 'cost': None, - 'consumable': '00000000-0000-0000-0000-000000000000', + 'consumable': '', 'details': {'fiberIds': 'OF-2024-03-A', 'quantity': 12}, 'type_schema_version': '0.0.0' }} @@ -159,7 +159,7 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.load_model('consumablestock', id='00000000-0000-0000-0000-000000000000') +resp = client.load('consumablestock', id='') ``` ### Response example @@ -167,18 +167,18 @@ resp = client.load_model('consumablestock', id='00000000-0000-0000-0000-00000000 ``` {'consumable stock': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'OpticFiber', 'status': 'AVAILABLE', 'notes': 'Initial batch', - 'inventory': '00000000-0000-0000-0000-000000000000', + 'inventory': '', 'acquisition_date': '2024-03-01', 'expiration_date': None, 'storage_location': 'Cabinet A', 'storage_conditions': None, 'intended_use': None, 'cost': None, - 'consumable': '00000000-0000-0000-0000-000000000000', + 'consumable': '', 'details': {'fiberIds': 'OF-2024-03-A', 'quantity': 12}, 'type_schema_version': '0.0.0' }} @@ -197,9 +197,9 @@ resp = client.load_model('consumablestock', id='00000000-0000-0000-0000-00000000 {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "consumablestock", - id="00000000-0000-0000-0000-000000000000", + id="", data={"notes": "Updated notes"} ) ``` @@ -209,18 +209,18 @@ resp = client.save_model( ``` {'consumable stock': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'OpticFiber', 'status': 'AVAILABLE', 'notes': 'Updated notes', - 'inventory': '00000000-0000-0000-0000-000000000000', + 'inventory': '', 'acquisition_date': '2024-03-01', 'expiration_date': None, 'storage_location': 'Cabinet A', 'storage_conditions': None, 'intended_use': None, 'cost': None, - 'consumable': '00000000-0000-0000-0000-000000000000', + 'consumable': '', 'details': {'fiberIds': 'OF-2024-03-A', 'quantity': 12}, 'type_schema_version': '0.0.0' }} @@ -237,5 +237,5 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.delete_model("consumablestock", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("consumablestock", id="") ``` diff --git a/docs/api/modules/dataacquisition.md b/docs/api/modules/dataacquisition.md index fa23a51..67639c1 100644 --- a/docs/api/modules/dataacquisition.md +++ b/docs/api/modules/dataacquisition.md @@ -53,7 +53,7 @@ A detailed list of the available `type` options and accepted schemas for the `de {: .no_toc} ``` -resp = client.load_model('dataacquisition') +resp = client.load('dataacquisition') ``` ### Response example @@ -62,11 +62,11 @@ resp = client.load_model('dataacquisition') ``` {'data_acquisitions': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'notes': 'main arena cameras', - 'session': '00000000-0000-0000-0000-000000000000', - 'procedures': ['00000000-0000-0000-0000-000000000000'], - 'equipment': ['00000000-0000-0000-0000-000000000000'], + 'session': '', + 'procedures': [''], + 'equipment': [''], 'type': 'BehavioralTracking', 'details': { 'fileName': 'session1_tracking.mp4', @@ -82,11 +82,11 @@ resp = client.load_model('dataacquisition') 'order': 0 }, { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'notes': 'acute probe recording', - 'session': '00000000-0000-0000-0000-000000000000', - 'procedures': ['00000000-0000-0000-0000-000000000000'], - 'equipment': ['00000000-0000-0000-0000-000000000000'], + 'session': '', + 'procedures': [''], + 'equipment': [''], 'type': 'ExtracellularEphys', 'details': { 'fileName': 'session1_probe.dat', @@ -121,13 +121,13 @@ resp = client.load_model('dataacquisition') {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "dataacquisition", data={ "type": "ExtracellularEphys", - "session": "00000000-0000-0000-0000-000000000000", - "procedures": ["00000000-0000-0000-0000-000000000000"], - "equipment": ["00000000-0000-0000-0000-000000000000"], + "session": "", + "procedures": [""], + "equipment": [""], "notes": "acute probe recording", "details": { "fileName": "session1_probe.dat", @@ -154,11 +154,11 @@ resp = client.save_model( ``` {'data_acquisition': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'notes': 'acute probe recording', - 'session': '00000000-0000-0000-0000-000000000000', - 'procedures': ['00000000-0000-0000-0000-000000000000'], - 'equipment': ['00000000-0000-0000-0000-000000000000'], + 'session': '', + 'procedures': [''], + 'equipment': [''], 'type': 'ExtracellularEphys', 'details': { 'fileName': 'session1_probe.dat', @@ -193,7 +193,7 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.load_model('dataacquisition', id='00000000-0000-0000-0000-000000000000') +resp = client.load('dataacquisition', id='') ``` ### Response example @@ -201,11 +201,11 @@ resp = client.load_model('dataacquisition', id='00000000-0000-0000-0000-00000000 ``` {'data_acquisition': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'notes': 'acute probe recording', - 'session': '00000000-0000-0000-0000-000000000000', - 'procedures': ['00000000-0000-0000-0000-000000000000'], - 'equipment': ['00000000-0000-0000-0000-000000000000'], + 'session': '', + 'procedures': [''], + 'equipment': [''], 'type': 'ExtracellularEphys', 'details': { 'fileName': 'session1_probe.dat', @@ -242,10 +242,10 @@ resp = client.load_model('dataacquisition', id='00000000-0000-0000-0000-00000000 {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "dataacquisition", - id="00000000-0000-0000-0000-000000000000", - data={"notes": "re-run with higher gain", "equipment": ["00000000-0000-0000-0000-000000000000"]} + id="", + data={"notes": "re-run with higher gain", "equipment": [""]} ) ``` @@ -254,11 +254,11 @@ resp = client.save_model( ``` {'data_acquisition': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'notes': 're-run with higher gain', - 'session': '00000000-0000-0000-0000-000000000000', - 'procedures': ['00000000-0000-0000-0000-000000000000'], - 'equipment': ['00000000-0000-0000-0000-000000000000'], + 'session': '', + 'procedures': [''], + 'equipment': [''], 'type': 'ExtracellularEphys', 'details': { 'fileName': 'session1_probe.dat', @@ -297,5 +297,5 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.delete_model("dataacquisition", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("dataacquisition", id="") ``` diff --git a/docs/api/modules/equipment.md b/docs/api/modules/equipment.md index a082fe1..ee24558 100644 --- a/docs/api/modules/equipment.md +++ b/docs/api/modules/equipment.md @@ -54,7 +54,7 @@ A detailed list of the available `type` options and accepted schemas for the `de {: .no_toc} ``` -resp = client.load_model('equipment') +resp = client.load('equipment') ``` ### Response example @@ -63,14 +63,14 @@ resp = client.load_model('equipment') ``` {'equipment': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'Headstage amplifier', 'type': 'Amplifier', 'notes': '32-channel preamp', - 'setup': '00000000-0000-0000-0000-000000000000', + 'setup': '', 'date_time': '2024-03-05T10:00:00Z', 'consumable': None, - 'hardwaredevice': '00000000-0000-0000-0000-000000000000', + 'hardwaredevice': '', 'details': {}, 'type_schema_version': '0.0.0', 'coordinates_system': 'External_XYZ_Absolute', @@ -85,11 +85,11 @@ resp = client.load_model('equipment') 'coordinates_schema_version': '0.0.0' }, { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'Two-photon rig', 'type': 'TwoPhotonMicroscope', 'notes': 'Imaging setup', - 'setup': '00000000-0000-0000-0000-000000000000', + 'setup': '', 'date_time': None, 'consumable': None, 'hardwaredevice': None, @@ -121,13 +121,13 @@ resp = client.load_model('equipment') {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "equipment", data={ "name": "Fiber photometry console", "type": "FiberPhotometrySystem", - "setup": "00000000-0000-0000-0000-000000000000", - "hardwaredevice": "00000000-0000-0000-0000-000000000000", + "setup": "", + "hardwaredevice": "", "notes": "Main recording rig", "details": {}, "coordinates_system": "External_XYZ_Absolute", @@ -148,14 +148,14 @@ resp = client.save_model( ``` {'equipment': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'Fiber photometry console', 'type': 'FiberPhotometrySystem', 'notes': 'Main recording rig', - 'setup': '00000000-0000-0000-0000-000000000000', + 'setup': '', 'date_time': None, 'consumable': None, - 'hardwaredevice': '00000000-0000-0000-0000-000000000000', + 'hardwaredevice': '', 'details': {}, 'type_schema_version': '0.0.0', 'coordinates_system': 'External_XYZ_Absolute', @@ -183,7 +183,7 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.load_model('equipment', id='00000000-0000-0000-0000-000000000000') +resp = client.load('equipment', id='') ``` ### Response example @@ -191,14 +191,14 @@ resp = client.load_model('equipment', id='00000000-0000-0000-0000-000000000000') ``` {'equipment': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'Fiber photometry console', 'type': 'FiberPhotometrySystem', 'notes': 'Main recording rig', - 'setup': '00000000-0000-0000-0000-000000000000', + 'setup': '', 'date_time': None, 'consumable': None, - 'hardwaredevice': '00000000-0000-0000-0000-000000000000', + 'hardwaredevice': '', 'details': {}, 'type_schema_version': '0.0.0', 'coordinates_system': 'External_XYZ_Absolute', @@ -227,9 +227,9 @@ resp = client.load_model('equipment', id='00000000-0000-0000-0000-000000000000') {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "equipment", - id="00000000-0000-0000-0000-000000000000", + id="", data={"notes": "Updated calibration complete"} ) ``` @@ -239,14 +239,14 @@ resp = client.save_model( ``` {'equipment': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'Fiber photometry console', 'type': 'FiberPhotometrySystem', 'notes': 'Updated calibration complete', - 'setup': '00000000-0000-0000-0000-000000000000', + 'setup': '', 'date_time': None, 'consumable': None, - 'hardwaredevice': '00000000-0000-0000-0000-000000000000', + 'hardwaredevice': '', 'details': {}, 'type_schema_version': '0.0.0', 'coordinates_system': 'External_XYZ_Absolute', @@ -273,5 +273,5 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.delete_model("equipment", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("equipment", id="") ``` diff --git a/docs/api/modules/manipulation.md b/docs/api/modules/manipulation.md index 3af3424..f5efd5f 100644 --- a/docs/api/modules/manipulation.md +++ b/docs/api/modules/manipulation.md @@ -46,7 +46,7 @@ A detailed list of the available `type` options and accepted schemas for the `de {: .no_toc} ``` -resp = client.load_model('manipulation') +resp = client.load('manipulation') ``` ### Response example @@ -55,12 +55,12 @@ resp = client.load_model('manipulation') ``` {'manipulations': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'ElectricalStimulation', 'notes': 'motor cortex pulses', - 'procedures': ['00000000-0000-0000-0000-000000000000'], - 'equipment': ['00000000-0000-0000-0000-000000000000'], - 'session': '00000000-0000-0000-0000-000000000000', + 'procedures': [''], + 'equipment': [''], + 'session': '', 'details': [ { 'amplitude': 0.15, @@ -76,12 +76,12 @@ resp = client.load_model('manipulation') 'order': 0 }, { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'LiquidPerturbation', 'notes': 'saline wash', - 'procedures': ['00000000-0000-0000-0000-000000000000'], + 'procedures': [''], 'equipment': [], - 'session': '00000000-0000-0000-0000-000000000000', + 'session': '', 'details': [ { 'liquidAgent': 'Saline', @@ -111,13 +111,13 @@ resp = client.load_model('manipulation') {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "manipulation", data={ 'type': 'LiquidPerturbation', - 'session': '00000000-0000-0000-0000-000000000000', - 'procedures': ['00000000-0000-0000-0000-000000000000'], - 'equipment': ['00000000-0000-0000-0000-000000000000'], + 'session': '', + 'procedures': [''], + 'equipment': [''], 'notes': 'odorant rinse', 'details': [ { @@ -139,12 +139,12 @@ resp = client.save_model( ``` {'manipulation': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'LiquidPerturbation', 'notes': 'odorant rinse', - 'procedures': ['00000000-0000-0000-0000-000000000000'], - 'equipment': ['00000000-0000-0000-0000-000000000000'], - 'session': '00000000-0000-0000-0000-000000000000', + 'procedures': [''], + 'equipment': [''], + 'session': '', 'details': [ { 'liquidAgent': 'Water', @@ -174,7 +174,7 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.load_model('manipulation', id='00000000-0000-0000-0000-000000000000') +resp = client.load('manipulation', id='') ``` ### Response example @@ -182,12 +182,12 @@ resp = client.load_model('manipulation', id='00000000-0000-0000-0000-00000000000 ``` {'manipulation': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'LiquidPerturbation', 'notes': 'odorant rinse', - 'procedures': ['00000000-0000-0000-0000-000000000000'], - 'equipment': ['00000000-0000-0000-0000-000000000000'], - 'session': '00000000-0000-0000-0000-000000000000', + 'procedures': [''], + 'equipment': [''], + 'session': '', 'details': [ { 'liquidAgent': 'Water', @@ -217,9 +217,9 @@ resp = client.load_model('manipulation', id='00000000-0000-0000-0000-00000000000 {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "manipulation", - id="00000000-0000-0000-0000-000000000000", + id="", data={"notes": "rinse complete"} ) ``` @@ -229,12 +229,12 @@ resp = client.save_model( ``` {'manipulation': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'LiquidPerturbation', 'notes': 'rinse complete', - 'procedures': ['00000000-0000-0000-0000-000000000000'], - 'equipment': ['00000000-0000-0000-0000-000000000000'], - 'session': '00000000-0000-0000-0000-000000000000', + 'procedures': [''], + 'equipment': [''], + 'session': '', 'details': [ { 'liquidAgent': 'Water', @@ -266,5 +266,5 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.delete_model("manipulation", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("manipulation", id="") ``` diff --git a/docs/api/modules/procedure.md b/docs/api/modules/procedure.md index b70b09c..75559e4 100644 --- a/docs/api/modules/procedure.md +++ b/docs/api/modules/procedure.md @@ -54,7 +54,7 @@ A detailed list of the available `type` options and accepted schemas for the `de {: .no_toc} ``` -resp = client.load_model('procedure') +resp = client.load('procedure') ``` ### Response example @@ -63,20 +63,20 @@ resp = client.load_model('procedure') ``` {'procedures': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'SiliconProbeImplant', 'notes': 'acute implant', - 'subject': '00000000-0000-0000-0000-000000000000', + 'subject': '', 'date_time': '2024-03-12T09:00:00Z', - 'consumablestock': '00000000-0000-0000-0000-000000000000', - 'equipment': ['00000000-0000-0000-0000-000000000000'], - 'licenses': ['00000000-0000-0000-0000-000000000000'], + 'consumablestock': '', + 'equipment': [''], + 'licenses': [''], 'details': { 'probeId': 'SP-64A', 'sterilizationMethod': 'Ethylene Oxide' }, 'type_schema_version': '0.0.0', - 'brain_region': '00000000-0000-0000-0000-000000000000', + 'brain_region': '', 'coordinates_system': 'Stereotaxic_BregmaAbsolute', 'coordinates_details': { 'apCoordinate': -2.5, @@ -91,10 +91,10 @@ resp = client.load_model('procedure') 'updated_at': '2024-03-12T09:00:00Z' }, { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'OpticFiberImplant', 'notes': 'bilateral implant', - 'subject': '00000000-0000-0000-0000-000000000000', + 'subject': '', 'date_time': None, 'consumablestock': None, 'equipment': [], @@ -105,7 +105,7 @@ resp = client.load_model('procedure') 'sterilizationMethod': 'Autoclave' }, 'type_schema_version': '0.0.0', - 'brain_region': '00000000-0000-0000-0000-000000000000', + 'brain_region': '', 'coordinates_system': 'Stereotaxic_BregmaBrainSurface', 'coordinates_details': { 'apCoordinate': -2.8, @@ -133,13 +133,13 @@ resp = client.load_model('procedure') {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "procedure", data={ "type": "OpticFiberImplant", - "subject": "00000000-0000-0000-0000-000000000000", - "consumablestock": "00000000-0000-0000-0000-000000000000", - "equipment": ["00000000-0000-0000-0000-000000000000"], + "subject": "", + "consumablestock": "", + "equipment": [""], "notes": "bilateral implant", "details": {"fiberTipShape": "flat", "fiberId": "OF-L-2024-07", "sterilizationMethod": "Autoclave"}, "coordinates_system": "Stereotaxic_BregmaAbsolute", @@ -160,13 +160,13 @@ resp = client.save_model( ``` {'procedure': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'OpticFiberImplant', 'notes': 'bilateral implant', - 'subject': '00000000-0000-0000-0000-000000000000', + 'subject': '', 'date_time': None, - 'consumablestock': '00000000-0000-0000-0000-000000000000', - 'equipment': ['00000000-0000-0000-0000-000000000000'], + 'consumablestock': '', + 'equipment': [''], 'licenses': [], 'details': {'fiberTipShape': 'flat', 'fiberId': 'OF-L-2024-07', 'sterilizationMethod': 'Autoclave'}, 'type_schema_version': '0.0.0', @@ -199,7 +199,7 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.load_model('procedure', id='00000000-0000-0000-0000-000000000000') +resp = client.load('procedure', id='') ``` ### Response example @@ -207,13 +207,13 @@ resp = client.load_model('procedure', id='00000000-0000-0000-0000-000000000000') ``` {'procedure': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'OpticFiberImplant', 'notes': 'bilateral implant', - 'subject': '00000000-0000-0000-0000-000000000000', + 'subject': '', 'date_time': None, - 'consumablestock': '00000000-0000-0000-0000-000000000000', - 'equipment': ['00000000-0000-0000-0000-000000000000'], + 'consumablestock': '', + 'equipment': [''], 'licenses': [], 'details': {'fiberTipShape': 'flat', 'fiberId': 'OF-L-2024-07', 'sterilizationMethod': 'Autoclave'}, 'type_schema_version': '0.0.0', @@ -246,9 +246,9 @@ resp = client.load_model('procedure', id='00000000-0000-0000-0000-000000000000') {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "procedure", - id="00000000-0000-0000-0000-000000000000", + id="", data={"notes": "implant tightened"} ) ``` @@ -258,13 +258,13 @@ resp = client.save_model( ``` {'procedure': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'OpticFiberImplant', 'notes': 'implant tightened', - 'subject': '00000000-0000-0000-0000-000000000000', + 'subject': '', 'date_time': None, - 'consumablestock': '00000000-0000-0000-0000-000000000000', - 'equipment': ['00000000-0000-0000-0000-000000000000'], + 'consumablestock': '', + 'equipment': [''], 'licenses': [], 'details': {'fiberTipShape': 'flat', 'fiberId': 'OF-L-2024-07', 'sterilizationMethod': 'Autoclave'}, 'type_schema_version': '0.0.0', @@ -297,5 +297,5 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.delete_model("procedure", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("procedure", id="") ``` diff --git a/docs/api/modules/procedurelog.md b/docs/api/modules/procedurelog.md index 230e400..5e6247a 100644 --- a/docs/api/modules/procedurelog.md +++ b/docs/api/modules/procedurelog.md @@ -58,7 +58,7 @@ A detailed list of the available `type` options and accepted schemas for the `de {: .no_toc} ``` -resp = client.load_model('procedurelog') +resp = client.load('procedurelog') ``` ### Response example @@ -67,10 +67,10 @@ resp = client.load_model('procedurelog') ``` {'procedure_logs': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'Impedances', 'description': None, - 'procedure': '00000000-0000-0000-0000-000000000000', + 'procedure': '', 'entries': [ {'date_time': '2023-05-05T06:20:00Z', 'notes': None, @@ -87,10 +87,10 @@ resp = client.load_model('procedurelog') ] }, { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'LinearDisplacement', 'description': None, - 'procedure': '00000000-0000-0000-0000-000000000000', + 'procedure': '', 'entries': [ {'date_time': '2023-04-05T13:45:00Z', 'notes': None, @@ -117,9 +117,9 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("procedurelog", data={ +resp = client.save("procedurelog", data={ "type": "LinearDisplacement", - "procedure": "00000000-0000-0000-0000-000000000000"}) + "procedure": ""}) ``` ### Response example @@ -127,10 +127,10 @@ resp = client.save_model("procedurelog", data={ ``` {'procedure_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'LinearDisplacement', 'description': None, - 'procedure': '00000000-0000-0000-0000-000000000000', + 'procedure': '', 'entries': []} } ``` @@ -148,7 +148,7 @@ resp = client.save_model("procedurelog", data={ {: .no_toc} ``` -resp = client.load_model('procedurelog', id='00000000-0000-0000-0000-000000000000') +resp = client.load('procedurelog', id='') ``` ### Response example @@ -156,10 +156,10 @@ resp = client.load_model('procedurelog', id='00000000-0000-0000-0000-00000000000 ``` {'procedure_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'LinearDisplacement', 'description': None, - 'procedure': '00000000-0000-0000-0000-000000000000', + 'procedure': '', 'entries': []} } ``` @@ -177,7 +177,7 @@ resp = client.load_model('procedurelog', id='00000000-0000-0000-0000-00000000000 {: .no_toc} ``` -resp = client.save_model("procedurelog", id="00000000-0000-0000-0000-000000000000", data={"description": "new text"}) +resp = client.save("procedurelog", id="", data={"description": "new text"}) ``` ### Response example @@ -185,10 +185,10 @@ resp = client.save_model("procedurelog", id="00000000-0000-0000-0000-00000000000 ``` {'procedure_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'LinearDisplacement', 'description': "new text", - 'procedure': '00000000-0000-0000-0000-000000000000', + 'procedure': '', 'entries': []} } ``` @@ -206,7 +206,7 @@ resp = client.save_model("procedurelog", id="00000000-0000-0000-0000-00000000000 {: .no_toc} ``` -resp = client.delete_model("procedurelog", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("procedurelog", id="") ``` @@ -222,7 +222,7 @@ resp = client.delete_model("procedurelog", id="00000000-0000-0000-0000-000000000 {: .no_toc} ``` -resp = client.save_model("procedurelog", id="00000000-0000-0000-0000-000000000000", options="add_entry", data={ +resp = client.save("procedurelog", id="", options="add_entry", data={ 'date_time': '2023-04-05T13:45:00Z', 'notes': None, 'details': {'displacement': 9.0} @@ -235,10 +235,10 @@ resp = client.save_model("procedurelog", id="00000000-0000-0000-0000-00000000000 ``` {'procedure_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'LinearDisplacement', 'description': 'new text', - 'procedure': '00000000-0000-0000-0000-000000000000', + 'procedure': '', 'entries': [ {'date_time': '2023-04-05T13:45:00Z', 'notes': None, @@ -260,7 +260,7 @@ resp = client.save_model("procedurelog", id="00000000-0000-0000-0000-00000000000 {: .no_toc} ``` -resp = client.save_model("procedurelog", id="00000000-0000-0000-0000-000000000000", options="change_entry", data={'date_time': '2023-04-05T13:45:00Z', 'notes': 'new text'}) +resp = client.save("procedurelog", id="", options="change_entry", data={'date_time': '2023-04-05T13:45:00Z', 'notes': 'new text'}) ``` ### Response example @@ -268,10 +268,10 @@ resp = client.save_model("procedurelog", id="00000000-0000-0000-0000-00000000000 ``` {'procedure_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'LinearDisplacement', 'description': 'new text', - 'procedure': '00000000-0000-0000-0000-000000000000', + 'procedure': '', 'entries': [ {'date_time': '2023-04-05T13:45:00Z', 'notes': "new text", @@ -294,7 +294,7 @@ resp = client.save_model("procedurelog", id="00000000-0000-0000-0000-00000000000 {: .no_toc} ``` -resp = client.save_model("procedurelog", id="00000000-0000-0000-0000-000000000000", options="remove_entry", data={'date_time': '2023-04-05T13:45:00Z'}) +resp = client.save("procedurelog", id="", options="remove_entry", data={'date_time': '2023-04-05T13:45:00Z'}) ``` ### Response example @@ -302,10 +302,10 @@ resp = client.save_model("procedurelog", id="00000000-0000-0000-0000-00000000000 ``` {'procedure_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'LinearDisplacement', 'description': 'new text', - 'procedure': '00000000-0000-0000-0000-000000000000', + 'procedure': '', 'entries': [] } } diff --git a/docs/api/modules/subjectlog.md b/docs/api/modules/subjectlog.md index c1b8362..5c6de15 100644 --- a/docs/api/modules/subjectlog.md +++ b/docs/api/modules/subjectlog.md @@ -67,7 +67,7 @@ A detailed list of the accepted schemas for the `details` field, related to each {: .no_toc} ``` -resp = client.load_model('subjectlog') +resp = client.load('subjectlog') ``` ### Response example @@ -76,11 +76,11 @@ resp = client.load_model('subjectlog') ``` {'subject_logs': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'Weighing', 'description': None, - 'subject': '00000000-0000-0000-0000-000000000000', - 'user': '00000000-0000-0000-0000-000000000000', + 'subject': '', + 'user': '', 'entries': [ {'date_time': '2023-03-26T04:05:00Z', 'notes': None, @@ -91,11 +91,11 @@ resp = client.load_model('subjectlog') ] }, { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'FoodConsumption', 'description': None, - 'subject': '00000000-0000-0000-0000-000000000000', - 'user': '00000000-0000-0000-0000-000000000000', + 'subject': '', + 'user': '', 'entries': [ {'date_time': '2023-03-09T07:10:00Z', 'notes': None, @@ -122,11 +122,11 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "subjectlog", data={ "type": "WaterConsumption", - "subject": "00000000-0000-0000-0000-000000000000", + "subject": "", "description": "Baseline water access" } ) @@ -137,11 +137,11 @@ resp = client.save_model( ``` {'subject_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'WaterConsumption', 'description': 'Baseline water access', - 'subject': '00000000-0000-0000-0000-000000000000', - 'user': '00000000-0000-0000-0000-000000000000', + 'subject': '', + 'user': '', 'entries': [] }} ``` @@ -159,7 +159,7 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.load_model('subjectlog', id='00000000-0000-0000-0000-000000000000') +resp = client.load('subjectlog', id='') ``` ### Response example @@ -167,11 +167,11 @@ resp = client.load_model('subjectlog', id='00000000-0000-0000-0000-000000000000' ``` {'subject_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'WaterConsumption', 'description': 'Baseline water access', - 'subject': '00000000-0000-0000-0000-000000000000', - 'user': '00000000-0000-0000-0000-000000000000', + 'subject': '', + 'user': '', 'entries': [] }} ``` @@ -189,9 +189,9 @@ resp = client.load_model('subjectlog', id='00000000-0000-0000-0000-000000000000' {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "subjectlog", - id="00000000-0000-0000-0000-000000000000", + id="", data={"description": "Post-deprivation monitoring"} ) ``` @@ -201,11 +201,11 @@ resp = client.save_model( ``` {'subject_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'WaterConsumption', 'description': 'Post-deprivation monitoring', - 'subject': '00000000-0000-0000-0000-000000000000', - 'user': '00000000-0000-0000-0000-000000000000', + 'subject': '', + 'user': '', 'entries': [] }} ``` @@ -223,7 +223,7 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.delete_model("subjectlog", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("subjectlog", id="") ``` @@ -239,7 +239,7 @@ resp = client.delete_model("subjectlog", id="00000000-0000-0000-0000-00000000000 {: .no_toc} ``` -resp = client.save_model("subjectlog", id="00000000-0000-0000-0000-000000000000", options="add_entry", data={ +resp = client.save("subjectlog", id="", options="add_entry", data={ 'date_time': '2023-04-05T13:45:00Z', 'notes': None, 'details': {'waterAmount': 9.0} @@ -252,11 +252,11 @@ resp = client.save_model("subjectlog", id="00000000-0000-0000-0000-000000000000" ``` {'subject_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'WaterConsumption', 'description': 'Post-deprivation monitoring', - 'subject': '00000000-0000-0000-0000-000000000000', - 'user': '00000000-0000-0000-0000-000000000000', + 'subject': '', + 'user': '', 'entries': [ {'date_time': '2023-04-05T13:45:00Z', 'notes': None, @@ -277,9 +277,9 @@ resp = client.save_model("subjectlog", id="00000000-0000-0000-0000-000000000000" {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "subjectlog", - id="00000000-0000-0000-0000-000000000000", + id="", options="change_entry", data={'date_time': '2023-04-05T13:45:00Z', 'notes': 'Replaced drip line'} ) @@ -290,11 +290,11 @@ resp = client.save_model( ``` {'subject_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'WaterConsumption', 'description': 'Post-deprivation monitoring', - 'subject': '00000000-0000-0000-0000-000000000000', - 'user': '00000000-0000-0000-0000-000000000000', + 'subject': '', + 'user': '', 'entries': [ {'date_time': '2023-04-05T13:45:00Z', 'notes': 'Replaced drip line', @@ -317,7 +317,7 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.save_model("subjectlog", id="00000000-0000-0000-0000-000000000000", options="remove_entry", data={'date_time': '2023-04-05T13:45:00Z'}) +resp = client.save("subjectlog", id="", options="remove_entry", data={'date_time': '2023-04-05T13:45:00Z'}) ``` ### Response example @@ -325,10 +325,10 @@ resp = client.save_model("subjectlog", id="00000000-0000-0000-0000-000000000000" ``` {'subject_log': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'type': 'WaterConsumption', 'description': "new text", - 'subject': '00000000-0000-0000-0000-000000000000', + 'subject': '', 'entries': []} } ``` diff --git a/docs/api/personal_attributes/behavioralassay.md b/docs/api/personal_attributes/behavioralassay.md index 0485dfa..88f81d5 100644 --- a/docs/api/personal_attributes/behavioralassay.md +++ b/docs/api/personal_attributes/behavioralassay.md @@ -39,7 +39,7 @@ nav_order: 1 {: .no_toc} ``` -resp = client.load_model('behavioralassay') +resp = client.load('behavioralassay') ``` ### Response example @@ -48,20 +48,20 @@ resp = client.load_model('behavioralassay') ``` {'behavioralassays': [ { - 'id': 'febe36f7-4769-496d-bb91-6a8443214b94', + 'id': '', 'name': 'AlternationRunning', 'description': 'Alternating running task', - 'setup_type': '531b2a21-ab1f-4aa8-8eaf-905421168d6b', - 'behavioral_paradigm': '00000000-0000-0000-0000-000000000000', + 'setup_type': '', + 'behavioral_paradigm': '', 'licenses': [], 'is_public': False }, { - 'id': 'f7bc834e-761c-4147-a3d4-da52293a565c', + 'id': '', 'name': 'ContinuousRunning', 'description': 'Continuous running task', - 'setup_type': '8e9c4d33-f59c-45ca-8e43-f01789f20332', - 'behavioral_paradigm': '00000000-0000-0000-0000-000000000000', + 'setup_type': '', + 'behavioral_paradigm': '', 'licenses': [], 'is_public': True } @@ -85,12 +85,12 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("behavioralassay", data= +resp = client.save("behavioralassay", data= { 'name': 'PlayMarioKart', 'description': 'Play Mario Kart on GameCube', - 'setup_type': '8e9c4d33-f59c-45ca-8e43-f01789f20332', - 'behavioral_paradigm': '00000000-0000-0000-0000-000000000000', + 'setup_type': '', + 'behavioral_paradigm': '', 'licenses': [], } ) @@ -101,11 +101,11 @@ resp = client.save_model("behavioralassay", data= ``` {'behavioralassay': { - 'id': '22ae80be-e030-4cee-9cd5-b94ac2edc7f8', + 'id': '', 'name': 'PlayMarioKart', 'description': 'Play Mario Kart on GameCube', - 'setup_type': '8e9c4d33-f59c-45ca-8e43-f01789f20332', - 'behavioral_paradigm': '00000000-0000-0000-0000-000000000000', + 'setup_type': '', + 'behavioral_paradigm': '', 'licenses': [], 'is_public': False} } @@ -124,7 +124,7 @@ resp = client.save_model("behavioralassay", data= {: .no_toc} ``` -resp = client.load_model('behavioralassay', id='22ae80be-e030-4cee-9cd5-b94ac2edc7f8') +resp = client.load('behavioralassay', id='') ``` ### Response example @@ -132,11 +132,11 @@ resp = client.load_model('behavioralassay', id='22ae80be-e030-4cee-9cd5-b94ac2ed ``` {'behavioralassay': { - 'id': '22ae80be-e030-4cee-9cd5-b94ac2edc7f8', + 'id': '', 'name': 'PlayMarioKart', 'description': 'Play Mario Kart on GameCube', - 'setup_type': '8e9c4d33-f59c-45ca-8e43-f01789f20332', - 'behavioral_paradigm': '00000000-0000-0000-0000-000000000000', + 'setup_type': '', + 'behavioral_paradigm': '', 'licenses': [], 'is_public': False} } @@ -155,7 +155,7 @@ resp = client.load_model('behavioralassay', id='22ae80be-e030-4cee-9cd5-b94ac2ed {: .no_toc} ``` -resp = client.save_model("behavioralassay", id="22ae80be-e030-4cee-9cd5-b94ac2edc7f8", data={"description": "new text"}) +resp = client.save("behavioralassay", id="", data={"description": "new text"}) ``` ### Response example @@ -163,11 +163,11 @@ resp = client.save_model("behavioralassay", id="22ae80be-e030-4cee-9cd5-b94ac2ed ``` {'behavioralassay': { - 'id': '22ae80be-e030-4cee-9cd5-b94ac2edc7f8', + 'id': '', 'name': 'PlayMarioKart', 'description': 'new text', - 'setup_type': '8e9c4d33-f59c-45ca-8e43-f01789f20332', - 'behavioral_paradigm': '00000000-0000-0000-0000-000000000000', + 'setup_type': '', + 'behavioral_paradigm': '', 'licenses': [], 'is_public': False} } @@ -186,5 +186,5 @@ resp = client.save_model("behavioralassay", id="22ae80be-e030-4cee-9cd5-b94ac2ed {: .no_toc} ``` -resp = client.delete_model("behavioralassay", id="22ae80be-e030-4cee-9cd5-b94ac2edc7f8") +resp = client.delete("behavioralassay", id="") ``` diff --git a/docs/api/personal_attributes/datastorage.md b/docs/api/personal_attributes/datastorage.md index f005443..1cf8c59 100644 --- a/docs/api/personal_attributes/datastorage.md +++ b/docs/api/personal_attributes/datastorage.md @@ -39,7 +39,7 @@ nav_order: 2 {: .no_toc} ``` -resp = client.load_model('datastorage') +resp = client.load('datastorage') ``` ### Response example @@ -48,7 +48,7 @@ resp = client.load_model('datastorage') ``` {'datastorages': [ { - 'id': '2ba92d91-349d-4e8c-9785-fc941ddd8868', + 'id': '', 'name': 'Test dataset', 'location': '/data/test', 'description': '', @@ -57,7 +57,7 @@ resp = client.load_model('datastorage') 'data_protocols': [] }, { - 'id': 'c2197dea-eab6-4bbc-8257-3f05537ffdb6', + 'id': '', 'name': 'Project data repository', 'location': '/data/project', 'description': '', @@ -101,7 +101,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("datastorage", data= +resp = client.save("datastorage", data= { 'name': "MyNewRepo", 'location': '/data/newrepo', @@ -134,7 +134,7 @@ resp = client.save_model("datastorage", data= ``` {'datastorage': { - 'id': '9f322057-cf48-4ec7-ab19-d0d7175cffe2', + 'id': '', 'name': 'MyNewRepo', 'location': '/data/newrepo', 'description': '', @@ -175,7 +175,7 @@ resp = client.save_model("datastorage", data= {: .no_toc} ``` -resp = client.load_model('datastorage', id='9f322057-cf48-4ec7-ab19-d0d7175cffe2') +resp = client.load('datastorage', id='') ``` ### Response example @@ -183,7 +183,7 @@ resp = client.load_model('datastorage', id='9f322057-cf48-4ec7-ab19-d0d7175cffe2 ``` {'datastorage': { - 'id': '9f322057-cf48-4ec7-ab19-d0d7175cffe2', + 'id': '', 'name': 'MyNewRepo', 'location': '/data/newrepo', 'description': '', @@ -224,7 +224,7 @@ resp = client.load_model('datastorage', id='9f322057-cf48-4ec7-ab19-d0d7175cffe2 {: .no_toc} ``` -resp = client.save_model("datastorage", id="9f322057-cf48-4ec7-ab19-d0d7175cffe2", data={"description": "new text"}) +resp = client.save("datastorage", id="", data={"description": "new text"}) ``` ### Response example @@ -232,7 +232,7 @@ resp = client.save_model("datastorage", id="9f322057-cf48-4ec7-ab19-d0d7175cffe2 ``` {'datastorage': { - 'id': '9f322057-cf48-4ec7-ab19-d0d7175cffe2', + 'id': '', 'name': 'MyNewRepo', 'location': '/data/newrepo', 'description': 'new text', @@ -273,5 +273,5 @@ resp = client.save_model("datastorage", id="9f322057-cf48-4ec7-ab19-d0d7175cffe2 {: .no_toc} ``` -resp = client.delete_model("datastorage", id="9f322057-cf48-4ec7-ab19-d0d7175cffe2") +resp = client.delete("datastorage", id="") ``` diff --git a/docs/api/personal_attributes/inventory.md b/docs/api/personal_attributes/inventory.md index 9b2b51b..c838f74 100644 --- a/docs/api/personal_attributes/inventory.md +++ b/docs/api/personal_attributes/inventory.md @@ -38,7 +38,7 @@ nav_order: 3 {: .no_toc} ``` -resp = client.load_model('inventory') +resp = client.load('inventory') ``` ### Response example @@ -47,14 +47,14 @@ resp = client.load_model('inventory') ``` {'inventories': [ { - 'id': '58e0003d-16c2-4264-913d-288463c0356d', + 'id': '', 'name': 'Probe inventory', 'location': 'Lab Room 101', 'description': '', 'is_public': False }, { - 'id': '3e9ec0e0-d685-42ec-8386-0fa24602a73e', + 'id': '', 'name': 'Virus inventory', 'location': 'Lab Room 102', 'description': '', @@ -79,7 +79,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("inventory", data= +resp = client.save("inventory", data= { 'name': 'My new probe inventory', 'location': 'Lab Room 103', @@ -94,7 +94,7 @@ resp = client.save_model("inventory", data= ``` {'inventory': { - 'id': 'd0ada97d-8607-48da-817b-bdd54bc9077b', + 'id': '', 'name': 'My new probe inventory', 'location': 'Lab Room 103', 'description': '', @@ -115,7 +115,7 @@ resp = client.save_model("inventory", data= {: .no_toc} ``` -resp = client.load_model('inventory', id='d0ada97d-8607-48da-817b-bdd54bc9077b') +resp = client.load('inventory', id='') ``` ### Response example @@ -123,7 +123,7 @@ resp = client.load_model('inventory', id='d0ada97d-8607-48da-817b-bdd54bc9077b') ``` {'inventory': { - 'id': 'd0ada97d-8607-48da-817b-bdd54bc9077b', + 'id': '', 'name': 'My new probe inventory', 'location': 'Lab Room 103', 'description': '', @@ -144,7 +144,7 @@ resp = client.load_model('inventory', id='d0ada97d-8607-48da-817b-bdd54bc9077b') {: .no_toc} ``` -resp = client.save_model("inventory", id="d0ada97d-8607-48da-817b-bdd54bc9077b", data={"description": "new text"}) +resp = client.save("inventory", id="", data={"description": "new text"}) ``` ### Response example @@ -152,7 +152,7 @@ resp = client.save_model("inventory", id="d0ada97d-8607-48da-817b-bdd54bc9077b", ``` {'inventory': { - 'id': 'd0ada97d-8607-48da-817b-bdd54bc9077b', + 'id': '', 'name': 'My new probe inventory', 'location': 'Lab Room 103', 'description': 'new text', @@ -173,5 +173,5 @@ resp = client.save_model("inventory", id="d0ada97d-8607-48da-817b-bdd54bc9077b", {: .no_toc} ``` -resp = client.delete_model("inventory", id="d0ada97d-8607-48da-817b-bdd54bc9077b") +resp = client.delete("inventory", id="") ``` diff --git a/docs/api/personal_attributes/license.md b/docs/api/personal_attributes/license.md index 7bc18c4..ac2c18e 100644 --- a/docs/api/personal_attributes/license.md +++ b/docs/api/personal_attributes/license.md @@ -49,7 +49,7 @@ nav_order: 5 {: .no_toc} ``` -resp = client.load_model('license') +resp = client.load('license') ``` ### Response example @@ -58,13 +58,13 @@ resp = client.load_model('license') ``` {'licenses': [ { - 'id': 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', + 'id': '', 'name': 'PPL: Septo-hippocampal dynamics 2025-2028', 'type': 'animal_research_authorization', 'status': 'active', 'description': '', 'country': 'GB', - 'regulatory_authority': 'b2c3d4e5-f6a7-8901-bcde-f12345678901', + 'regulatory_authority': '', 'license_number': 'PP1234567', 'license_document': None, 'valid_from': '2025-01-01', @@ -89,7 +89,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("license", data={ +resp = client.save("license", data={ 'name': 'IACUC Protocol 2026-001', 'type': 'animal_research_authorization', 'status': 'active', @@ -105,7 +105,7 @@ resp = client.save_model("license", data={ ``` {'license': { - 'id': 'c3d4e5f6-a7b8-9012-cdef-123456789012', + 'id': '', 'name': 'IACUC Protocol 2026-001', 'type': 'animal_research_authorization', 'status': 'active', @@ -133,7 +133,7 @@ resp = client.save_model("license", data={ {: .no_toc} ``` -resp = client.load_model('license', id='c3d4e5f6-a7b8-9012-cdef-123456789012') +resp = client.load('license', id='') ``` ### Response example @@ -141,7 +141,7 @@ resp = client.load_model('license', id='c3d4e5f6-a7b8-9012-cdef-123456789012') ``` {'license': { - 'id': 'c3d4e5f6-a7b8-9012-cdef-123456789012', + 'id': '', 'name': 'IACUC Protocol 2026-001', 'type': 'animal_research_authorization', 'status': 'active', @@ -169,7 +169,7 @@ resp = client.load_model('license', id='c3d4e5f6-a7b8-9012-cdef-123456789012') {: .no_toc} ``` -resp = client.save_model("license", id="c3d4e5f6-a7b8-9012-cdef-123456789012", data={"status": "expired"}) +resp = client.save("license", id="", data={"status": "expired"}) ``` ### Response example @@ -177,7 +177,7 @@ resp = client.save_model("license", id="c3d4e5f6-a7b8-9012-cdef-123456789012", d ``` {'license': { - 'id': 'c3d4e5f6-a7b8-9012-cdef-123456789012', + 'id': '', 'name': 'IACUC Protocol 2026-001', 'type': 'animal_research_authorization', 'status': 'expired', @@ -205,5 +205,5 @@ resp = client.save_model("license", id="c3d4e5f6-a7b8-9012-cdef-123456789012", d {: .no_toc} ``` -resp = client.delete_model("license", id="c3d4e5f6-a7b8-9012-cdef-123456789012") +resp = client.delete("license", id="") ``` diff --git a/docs/api/personal_attributes/setup.md b/docs/api/personal_attributes/setup.md index a4c9f8d..3156e67 100644 --- a/docs/api/personal_attributes/setup.md +++ b/docs/api/personal_attributes/setup.md @@ -41,7 +41,7 @@ nav_order: 4 {: .no_toc} ``` -resp = client.load_model('setup') +resp = client.load('setup') ``` ### Response example @@ -50,11 +50,11 @@ resp = client.load_model('setup') ``` {'setups': [ { - 'id': '58e0003d-16c2-4264-913d-288463c0356d', + 'id': '', 'name': 'Head-fixed wheel', 'location': 'Lab Room 101', 'description': '', - 'setup_type': '78dc6c02-dcb0-4a31-a035-a358c7ee9e79', + 'setup_type': '', 'specifications': [ {'name': 'Radius', 'value': 12, 'description': 'cm'} ], @@ -62,11 +62,11 @@ resp = client.load_model('setup') 'image': null }, { - 'id': '3e9ec0e0-d685-42ec-8386-0fa24602a73e', + 'id': '', 'name': 'Maze setup', 'location': 'Lab Room 102', 'description': '', - 'setup_type': 'e1f14b91-e507-48c1-bfec-c68d7db9c166', + 'setup_type': '', 'specifications': {}, 'is_public': True, 'image': null @@ -92,12 +92,12 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("setup", data= +resp = client.save("setup", data= { 'name': 'MyNewEnv', 'location': 'Lab Room 103', 'description': '', - 'setup_type': '78dc6c02-dcb0-4a31-a035-a358c7ee9e79', + 'setup_type': '', 'specifications': { 'Length': 100, 'Width': '30 cm' @@ -112,11 +112,11 @@ resp = client.save_model("setup", data= ``` {'setup': { - 'id': 'd0ada97d-8607-48da-817b-bdd54bc9077b', + 'id': '', 'name': 'MyNewEnv', 'location': 'Lab Room 103', 'description': '', - 'setup_type': '78dc6c02-dcb0-4a31-a035-a358c7ee9e79', + 'setup_type': '', 'specifications': { 'Length': 100, 'Width': '30 cm' @@ -139,7 +139,7 @@ resp = client.save_model("setup", data= {: .no_toc} ``` -resp = client.load_model('setup', id='d0ada97d-8607-48da-817b-bdd54bc9077b') +resp = client.load('setup', id='') ``` ### Response example @@ -147,11 +147,11 @@ resp = client.load_model('setup', id='d0ada97d-8607-48da-817b-bdd54bc9077b') ``` {'setup': { - 'id': 'd0ada97d-8607-48da-817b-bdd54bc9077b', + 'id': '', 'name': 'MyNewEnv', 'location': 'Lab Room 103', 'description': '', - 'setup_type': '78dc6c02-dcb0-4a31-a035-a358c7ee9e79', + 'setup_type': '', 'specifications': { 'Length': 100, 'Width': '30 cm' @@ -174,7 +174,7 @@ resp = client.load_model('setup', id='d0ada97d-8607-48da-817b-bdd54bc9077b') {: .no_toc} ``` -resp = client.save_model("setup", id="d0ada97d-8607-48da-817b-bdd54bc9077b", data={"description": "new text"}) +resp = client.save("setup", id="", data={"description": "new text"}) ``` ### Response example @@ -182,11 +182,11 @@ resp = client.save_model("setup", id="d0ada97d-8607-48da-817b-bdd54bc9077b", dat ``` {'setup': { - 'id': 'd0ada97d-8607-48da-817b-bdd54bc9077b', + 'id': '', 'name': 'MyNewEnv', 'location': 'Lab Room 103', 'description': 'new text', - 'setup_type': '78dc6c02-dcb0-4a31-a035-a358c7ee9e79', + 'setup_type': '', 'specifications': { 'Length': 100, 'Width': '30 cm' @@ -209,5 +209,5 @@ resp = client.save_model("setup", id="d0ada97d-8607-48da-817b-bdd54bc9077b", dat {: .no_toc} ``` -resp = client.delete_model("setup", id="d0ada97d-8607-48da-817b-bdd54bc9077b") +resp = client.delete("setup", id="") ``` diff --git a/docs/api/resources/consumable.md b/docs/api/resources/consumable.md index 58b0c2c..5b9a16b 100644 --- a/docs/api/resources/consumable.md +++ b/docs/api/resources/consumable.md @@ -47,7 +47,7 @@ A detailed list of the available `type` options and accepted schemas for the `de {: .no_toc} ``` -resp = client.load_model('consumable') +resp = client.load('consumable') ``` ### Response example @@ -56,10 +56,10 @@ resp = client.load_model('consumable') ``` {"consumables": [ { - "id": "0a533099-700a-4d9b-a3db-87be8d137770", + "id": "", "name": "AAV-EF1a-mCherry-IRES-WGA-Cre ", "description": "Transsynaptic Tracers: WGA-Cre (AAV2, 5 & 8)", - "supplier": "4fa1c3b4-f955-47f5-8524-3f1afa3fc657", + "supplier": "", "type": "VirusConstruct", "rrid": "", "rrid_url": "", @@ -70,10 +70,10 @@ resp = client.load_model('consumable') } }, { - "id": "3e3a4787-a688-485a-bdc6-c0cb1a2a23e1", + "id": "", "name": "A16x1-2mm-100-177", "description": "", - "supplier": "fba48e24-eebf-4b11-a8b9-ac660854d779", + "supplier": "", "type": "SiliconProbeDesign", "rrid": "", "rrid_url": "", @@ -109,10 +109,10 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("consumable", data={ +resp = client.save("consumable", data={ "name": "MyNewConsumable", "description": "", - "supplier": "fba48e24-eebf-4b11-a8b9-ac660854d779", + "supplier": "", "type": "OpticFiberDesign", "details": { "productId": "42", @@ -130,10 +130,10 @@ resp = client.save_model("consumable", data={ ``` {'consumable_approval': { - 'id': 'b7595523-5578-45c0-b7ef-c1f1485ac041', + 'id': '', 'name': 'MyNewConsumable', 'description': '', - 'supplier': 'fba48e24-eebf-4b11-a8b9-ac660854d779', + 'supplier': '', 'type': 'OpticFiberDesign', 'details': { 'productId': '42', @@ -159,7 +159,7 @@ resp = client.save_model("consumable", data={ {: .no_toc} ``` -resp = client.load_model('consumable', id='67f263cd-5960-406f-a879-c1f259140979') +resp = client.load('consumable', id='') ``` ### Response example @@ -167,10 +167,10 @@ resp = client.load_model('consumable', id='67f263cd-5960-406f-a879-c1f259140979' ``` {'consumable': { - 'id': '67f263cd-5960-406f-a879-c1f259140979', + 'id': '', 'name': 'MyNewConsumable', 'description': '', - 'supplier': 'fba48e24-eebf-4b11-a8b9-ac660854d779', + 'supplier': '', 'type': 'OpticFiberDesign', 'rrid': '', 'rrid_url': '', @@ -200,7 +200,7 @@ resp = client.load_model('consumable', id='67f263cd-5960-406f-a879-c1f259140979' {: .no_toc} ``` -resp = client.save_model("consumable", id="67f263cd-5960-406f-a879-c1f259140979", data={"description": "new text"}) +resp = client.save("consumable", id="", data={"description": "new text"}) ``` ### Response example @@ -208,10 +208,10 @@ resp = client.save_model("consumable", id="67f263cd-5960-406f-a879-c1f259140979" ``` {'consumable_approval': { - 'id': '8cf7d857-a197-4e36-9e0c-1766bb6aa285', + 'id': '', 'name': 'MyNewConsumable', 'description': 'new text', - 'supplier': 'fba48e24-eebf-4b11-a8b9-ac660854d779', + 'supplier': '', 'type': 'OpticFiberDesign', 'details': { 'productId': '42', @@ -238,7 +238,7 @@ resp = client.save_model("consumable", id="67f263cd-5960-406f-a879-c1f259140979" {: .no_toc} ``` -resp = client.delete_model("consumable", id="67f263cd-5960-406f-a879-c1f259140979") +resp = client.delete("consumable", id="") ``` @@ -253,7 +253,7 @@ resp = client.delete_model("consumable", id="67f263cd-5960-406f-a879-c1f25914097 {: .no_toc} ``` -resp = client.load_model('consumableapproval') +resp = client.load('consumableapproval') ``` ### Response example @@ -262,10 +262,10 @@ resp = client.load_model('consumableapproval') ``` {"consumable_approvals": [ { - "id": "b7595523-5578-45c0-b7ef-c1f1485ac041", + "id": "", "name": "MyNewConsumable", "description": "", - "supplier": "fba48e24-eebf-4b11-a8b9-ac660854d779", + "supplier": "", "type": "OpticFiberDesign", "details": { "productId": "42", @@ -296,7 +296,7 @@ Approval list responses also include a `meta` object (pagination/filter metadata {: .no_toc} ``` -resp = client.load_model('consumableapproval', id='b7595523-5578-45c0-b7ef-c1f1485ac041') +resp = client.load('consumableapproval', id='') ``` ### Response example @@ -304,10 +304,10 @@ resp = client.load_model('consumableapproval', id='b7595523-5578-45c0-b7ef-c1f14 ``` {'consumable_approval': { - 'id': 'b7595523-5578-45c0-b7ef-c1f1485ac041', + 'id': '', 'name': 'MyNewConsumable', 'description': '', - 'supplier': 'fba48e24-eebf-4b11-a8b9-ac660854d779', + 'supplier': '', 'type': 'OpticFiberDesign', 'details': { 'productId': '42', @@ -336,7 +336,7 @@ resp = client.load_model('consumableapproval', id='b7595523-5578-45c0-b7ef-c1f14 {: .no_toc} ``` -resp = client.save_model("consumableapproval", id="b7595523-5578-45c0-b7ef-c1f1485ac041", options="accept") +resp = client.save("consumableapproval", id="", options="accept") ``` @@ -351,5 +351,5 @@ resp = client.save_model("consumableapproval", id="b7595523-5578-45c0-b7ef-c1f14 {: .no_toc} ``` -resp = client.save_model("consumableapproval", id="8cf7d857-a197-4e36-9e0c-1766bb6aa285", options="reject") +resp = client.save("consumableapproval", id="", options="reject") ``` diff --git a/docs/api/resources/hardwaredevice.md b/docs/api/resources/hardwaredevice.md index 694d859..90d12cf 100644 --- a/docs/api/resources/hardwaredevice.md +++ b/docs/api/resources/hardwaredevice.md @@ -43,7 +43,7 @@ Optional fields such as `comments` can be omitted from list/detail responses whe {: .no_toc} ``` -resp = client.load_model('hardwaredevice') +resp = client.load('hardwaredevice') ``` ### Response example @@ -52,37 +52,37 @@ resp = client.load_model('hardwaredevice') ``` {'hardwaredevices': [ { - 'id': 'a14cc671-6d21-4688-9772-1d2bf765b793', + 'id': '', 'name': 'RZ5D Processor', 'description': '', - 'supplier': '56c6f4c3-cf31-48ac-bd16-410123776324', + 'supplier': '', 'rrid': '', 'rrid_url': '', 'external_identifiers': [] }, { - 'id': '33c67482-af52-44f4-a3ef-6d692512a6ca', + 'id': '', 'name': 'Scout (128ch)', 'description': '', - 'supplier': 'f309ec90-914b-4382-955e-017bf5d1def1', + 'supplier': '', 'rrid': '', 'rrid_url': '', 'external_identifiers': [] }, { - 'id': '4d33e7ad-c141-4e9d-bc9c-034c51dcfc5a', + 'id': '', 'name': 'SmartBox (256ch)', 'description': '', - 'supplier': 'fba48e24-eebf-4b11-a8b9-ac660854d779', + 'supplier': '', 'rrid': '', 'rrid_url': '', 'external_identifiers': [] }, { - 'id': '3ca40603-b7f0-4d58-8579-d48b3d6e7ad6', + 'id': '', 'name': 'SpikeGLX', 'description': 'SpikeGLX is a recording system for extracellular neural probes', - 'supplier': 'b8146db2-f50e-40c0-9558-1df3586a3b08', + 'supplier': '', 'rrid': '', 'rrid_url': '', 'external_identifiers': [] @@ -106,10 +106,10 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("hardwaredevice", data={ +resp = client.save("hardwaredevice", data={ 'name': 'MyNewHardwareDevice', 'description': '', - 'supplier': 'b8146db2-f50e-40c0-9558-1df3586a3b08'} + 'supplier': ''} ) ``` @@ -118,10 +118,10 @@ resp = client.save_model("hardwaredevice", data={ ``` {'hardwaredevice_approval': { - 'id': '23105f29-f31d-47c8-9cc5-0198222ee7dd', + 'id': '', 'name': 'MyNewHardwareDevice', 'description': '', - 'supplier': 'b8146db2-f50e-40c0-9558-1df3586a3b08'} + 'supplier': ''} } ``` @@ -138,7 +138,7 @@ resp = client.save_model("hardwaredevice", data={ {: .no_toc} ``` -resp = client.load_model('hardwaredevice', id='0e6c723c-e5f8-4979-b7f9-e77a3ae4e817') +resp = client.load('hardwaredevice', id='') ``` ### Response example @@ -146,10 +146,10 @@ resp = client.load_model('hardwaredevice', id='0e6c723c-e5f8-4979-b7f9-e77a3ae4e ``` {'hardwaredevice': { - 'id': '0e6c723c-e5f8-4979-b7f9-e77a3ae4e817', + 'id': '', 'name': 'MyNewHardwareDevice', 'description': '', - 'supplier': 'b8146db2-f50e-40c0-9558-1df3586a3b08', + 'supplier': '', 'rrid': '', 'rrid_url': '', 'external_identifiers': []} @@ -170,7 +170,7 @@ resp = client.load_model('hardwaredevice', id='0e6c723c-e5f8-4979-b7f9-e77a3ae4e {: .no_toc} ``` -resp = client.save_model("hardwaredevice", id="0e6c723c-e5f8-4979-b7f9-e77a3ae4e817", data={"description": "new text"}) +resp = client.save("hardwaredevice", id="", data={"description": "new text"}) ``` ### Response example @@ -178,10 +178,10 @@ resp = client.save_model("hardwaredevice", id="0e6c723c-e5f8-4979-b7f9-e77a3ae4e ``` {'hardwaredevice_approval': { - 'id': 'd10aaf4c-be23-45b2-9f81-ef1d65ca6c32', + 'id': '', 'name': 'MyNewHardwareDevice', 'description': 'new text', - 'supplier': 'b8146db2-f50e-40c0-9558-1df3586a3b08'} + 'supplier': ''} } ``` @@ -202,7 +202,7 @@ resp = client.save_model("hardwaredevice", id="0e6c723c-e5f8-4979-b7f9-e77a3ae4e {: .no_toc} ``` -resp = client.delete_model("hardwaredevice", id="0e6c723c-e5f8-4979-b7f9-e77a3ae4e817") +resp = client.delete("hardwaredevice", id="") ``` @@ -219,7 +219,7 @@ resp = client.delete_model("hardwaredevice", id="0e6c723c-e5f8-4979-b7f9-e77a3ae {: .no_toc} ``` -resp = client.load_model('hardwaredeviceapproval') +resp = client.load('hardwaredeviceapproval') ``` ### Response example @@ -230,21 +230,21 @@ resp = client.load_model('hardwaredeviceapproval') ``` {'hardwaredevice_approvals': [ { - 'id': '23105f29-f31d-47c8-9cc5-0198222ee7dd', + 'id': '', 'name': 'MyNewHardwareDevice', 'description': '', - 'supplier': 'b8146db2-f50e-40c0-9558-1df3586a3b08', + 'supplier': '', 'instance_id': None, 'action': 'Add', 'reviewer': None, 'status': 'Pending' }, { - 'id': 'accd5fe5-6739-4e44-ba24-3910eff01fef', + 'id': '', 'name': '16-Ch Extracellular Differential AC Amplifier Model 3500', 'description': '123', - 'supplier': '866fda99-0ae7-4aeb-a163-5c2e8a3ed4af', - 'instance_id': '56854ab5-708b-48b2-92a8-3bd84439c1e0', + 'supplier': '', + 'instance_id': '', 'action': 'Change', 'reviewer': 15, 'status': 'Accepted' @@ -266,7 +266,7 @@ Approval list responses also include a `meta` object (pagination/filter metadata {: .no_toc} ``` -resp = client.load_model('hardwaredeviceapproval', id='23105f29-f31d-47c8-9cc5-0198222ee7dd') +resp = client.load('hardwaredeviceapproval', id='') ``` ### Response example @@ -274,10 +274,10 @@ resp = client.load_model('hardwaredeviceapproval', id='23105f29-f31d-47c8-9cc5-0 ``` {'hardwaredevice_approval': { - 'id': '23105f29-f31d-47c8-9cc5-0198222ee7dd', + 'id': '', 'name': 'MyNewHardwareDevice', 'description': '', - 'supplier': 'b8146db2-f50e-40c0-9558-1df3586a3b08', + 'supplier': '', 'instance_id': None, 'action': 'Add', 'reviewer': None, @@ -297,7 +297,7 @@ resp = client.load_model('hardwaredeviceapproval', id='23105f29-f31d-47c8-9cc5-0 {: .no_toc} ``` -resp = client.save_model("hardwaredeviceapproval", id="23105f29-f31d-47c8-9cc5-0198222ee7dd", options="accept") +resp = client.save("hardwaredeviceapproval", id="", options="accept") ``` @@ -312,5 +312,5 @@ resp = client.save_model("hardwaredeviceapproval", id="23105f29-f31d-47c8-9cc5-0 {: .no_toc} ``` -resp = client.save_model("hardwaredeviceapproval", id="fd7f6132-0527-4310-a9da-9241728a9163", options="reject") +resp = client.save("hardwaredeviceapproval", id="", options="reject") ``` diff --git a/docs/api/resources/supplier.md b/docs/api/resources/supplier.md index b26de8f..c3a49cb 100644 --- a/docs/api/resources/supplier.md +++ b/docs/api/resources/supplier.md @@ -40,7 +40,7 @@ Optional fields such as `comments` can be omitted from list/detail responses whe {: .no_toc} ``` -resp = client.load_model('supplier') +resp = client.load('supplier') ``` ### Response example @@ -49,13 +49,13 @@ resp = client.load_model('supplier') ``` {'suppliers': [ { - 'id': 'a8fd144e-0207-4d47-917e-b89fd505ff06', + 'id': '', 'name': 'Thorlabs', 'description': '', 'website': 'https://www.thorlabs.com/' }, { - 'id': '4fa1c3b4-f955-47f5-8524-3f1afa3fc657', + 'id': '', 'name': 'UNC Vector Core', 'description': 'UNC Vector Core', 'website': 'https://www.med.unc.edu/genetherapy/vectorcore/' @@ -79,7 +79,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("supplier", data={ +resp = client.save("supplier", data={ 'name': 'MyNewSupplier', 'description': '', 'website': 'newsupplier.com'} @@ -91,7 +91,7 @@ resp = client.save_model("supplier", data={ ``` {'supplier_approval': { - 'id': '1af72008-d203-4bea-9766-f692b8a89df6', + 'id': '', 'name': 'MyNewSupplier', 'description': '', 'website': 'http://newsupplier.com'} @@ -111,7 +111,7 @@ resp = client.save_model("supplier", data={ {: .no_toc} ``` -resp = client.load_model('supplier', id='1338d838-5b69-4e89-8db9-b35224dcb01e') +resp = client.load('supplier', id='') ``` ### Response example @@ -119,7 +119,7 @@ resp = client.load_model('supplier', id='1338d838-5b69-4e89-8db9-b35224dcb01e') ``` {'supplier': { - 'id': '1338d838-5b69-4e89-8db9-b35224dcb01e', + 'id': '', 'name': 'MyNewSupplier', 'description': '', 'website': 'http://newsupplier.com'} @@ -140,7 +140,7 @@ resp = client.load_model('supplier', id='1338d838-5b69-4e89-8db9-b35224dcb01e') {: .no_toc} ``` -resp = client.save_model("supplier", id="1338d838-5b69-4e89-8db9-b35224dcb01e", data={"description": "new text"}) +resp = client.save("supplier", id="", data={"description": "new text"}) ``` ### Response example @@ -148,7 +148,7 @@ resp = client.save_model("supplier", id="1338d838-5b69-4e89-8db9-b35224dcb01e", ``` {'supplier_approval': { - 'id': 'e52eb599-a42f-4c37-9298-9bc4c9b42ff0', + 'id': '', 'name': 'MyNewSupplier', 'description': 'new text', 'website': 'http://newsupplier.com'} @@ -170,7 +170,7 @@ resp = client.save_model("supplier", id="1338d838-5b69-4e89-8db9-b35224dcb01e", {: .no_toc} ``` -resp = client.delete_model("supplier", id="1338d838-5b69-4e89-8db9-b35224dcb01e") +resp = client.delete("supplier", id="") ``` @@ -185,7 +185,7 @@ resp = client.delete_model("supplier", id="1338d838-5b69-4e89-8db9-b35224dcb01e" {: .no_toc} ``` -resp = client.load_model('supplierapproval') +resp = client.load('supplierapproval') ``` ### Response example @@ -194,7 +194,7 @@ resp = client.load_model('supplierapproval') ``` {'supplier_approvals': [ { - 'id': '1af72008-d203-4bea-9766-f692b8a89df6', + 'id': '', 'name': 'MyNewSupplier', 'description': '', 'website': 'http://newsupplier.com', @@ -204,11 +204,11 @@ resp = client.load_model('supplierapproval') 'status': 'Pending' }, { - 'id': '5c73ffd2-6d37-4336-be1b-9c39815497e9', + 'id': '', 'name': 'NeuroNexus', 'description': 'bbb', 'website': '', - 'instance_id': 'f314f4b0-a51d-45f8-8cda-d9dade2bff66', + 'instance_id': '', 'action': 'Change', 'reviewer': 3, 'status': 'Accepted' @@ -230,7 +230,7 @@ Approval list responses also include a `meta` object (pagination/filter metadata {: .no_toc} ``` -resp = client.load_model('supplierapproval', id='1af72008-d203-4bea-9766-f692b8a89df6') +resp = client.load('supplierapproval', id='') ``` ### Response example @@ -238,7 +238,7 @@ resp = client.load_model('supplierapproval', id='1af72008-d203-4bea-9766-f692b8a ``` {'supplier_approval': { - 'id': '1af72008-d203-4bea-9766-f692b8a89df6', + 'id': '', 'name': 'MyNewSupplier', 'description': '', 'website': 'http://newsupplier.com', @@ -261,7 +261,7 @@ resp = client.load_model('supplierapproval', id='1af72008-d203-4bea-9766-f692b8a {: .no_toc} ``` -resp = client.save_model("supplierapproval", id="1af72008-d203-4bea-9766-f692b8a89df6", options="accept") +resp = client.save("supplierapproval", id="", options="accept") ``` @@ -276,5 +276,5 @@ resp = client.save_model("supplierapproval", id="1af72008-d203-4bea-9766-f692b8a {: .no_toc} ``` -resp = client.save_model("supplierapproval", id="f314f4b0-a51d-45f8-8cda-d9dade2bff66", options="reject") +resp = client.save("supplierapproval", id="", options="reject") ``` diff --git a/docs/api/stem/breeding.md b/docs/api/stem/breeding.md index ea27ef6..82be5c8 100644 --- a/docs/api/stem/breeding.md +++ b/docs/api/stem/breeding.md @@ -44,7 +44,7 @@ nav_order: 7 {: .no_toc} ``` -resp = client.load_model('breeding') +resp = client.load('breeding') ``` ### Response example @@ -53,11 +53,11 @@ resp = client.load_model('breeding') ``` {'breedings': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'B6J x PV-Cre Spring 2026', - 'project': '00000000-0000-0000-0000-000000000000', - 'mother': '00000000-0000-0000-0000-000000000000', - 'father': '00000000-0000-0000-0000-000000000000' + 'project': '', + 'mother': '', + 'father': '' } ] } @@ -79,11 +79,11 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("breeding", data={ +resp = client.save("breeding", data={ "name": "NewBreeding", - "project": "00000000-0000-0000-0000-000000000000", - "mother": "00000000-0000-0000-0000-000000000000", - "father": "00000000-0000-0000-0000-000000000000" + "project": "", + "mother": "", + "father": "" }) ``` @@ -92,11 +92,11 @@ resp = client.save_model("breeding", data={ ``` {'breeding': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'NewBreeding', - 'project': '00000000-0000-0000-0000-000000000000', - 'mother': '00000000-0000-0000-0000-000000000000', - 'father': '00000000-0000-0000-0000-000000000000' + 'project': '', + 'mother': '', + 'father': '' } } ``` @@ -113,7 +113,7 @@ resp = client.save_model("breeding", data={ {: .no_toc} ``` -resp = client.load_model('breeding', id='00000000-0000-0000-0000-000000000000') +resp = client.load('breeding', id='') ``` ### Response example @@ -121,11 +121,11 @@ resp = client.load_model('breeding', id='00000000-0000-0000-0000-000000000000') ``` {'breeding': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'NewBreeding', - 'project': '00000000-0000-0000-0000-000000000000', - 'mother': '00000000-0000-0000-0000-000000000000', - 'father': '00000000-0000-0000-0000-000000000000', + 'project': '', + 'mother': '', + 'father': '', 'description': '', 'tags': [], 'birth_date': null, @@ -150,7 +150,7 @@ resp = client.load_model('breeding', id='00000000-0000-0000-0000-000000000000') {: .no_toc} ``` -resp = client.save_model("breeding", id="00000000-0000-0000-0000-000000000000", data={"name": "new name"}) +resp = client.save("breeding", id="", data={"name": "new name"}) ``` ### Response example @@ -158,11 +158,11 @@ resp = client.save_model("breeding", id="00000000-0000-0000-0000-000000000000", ``` {'breeding': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'new name', - 'project': '00000000-0000-0000-0000-000000000000', - 'mother': '00000000-0000-0000-0000-000000000000', - 'father': '00000000-0000-0000-0000-000000000000' + 'project': '', + 'mother': '', + 'father': '' } } ``` @@ -179,5 +179,5 @@ resp = client.save_model("breeding", id="00000000-0000-0000-0000-000000000000", {: .no_toc} ``` -resp = client.delete_model("breeding", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("breeding", id="") ``` diff --git a/docs/api/stem/cohort.md b/docs/api/stem/cohort.md index a81bc3f..101335a 100644 --- a/docs/api/stem/cohort.md +++ b/docs/api/stem/cohort.md @@ -37,7 +37,7 @@ nav_order: 4 {: .no_toc} ``` -resp = client.load_model('cohort') +resp = client.load('cohort') ``` ### Response example @@ -46,21 +46,21 @@ resp = client.load_model('cohort') ``` {'cohorts': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'newcohort1', - 'project': '00000000-0000-0000-0000-000000000000', + 'project': '', 'subjects': [ - '00000000-0000-0000-0000-000000000000', - '00000000-0000-0000-0000-000000000000' + '', + '' ] }, { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'cohort2', - 'project': '00000000-0000-0000-0000-000000000000', + 'project': '', 'subjects': [ - '00000000-0000-0000-0000-000000000000', - '00000000-0000-0000-0000-000000000000' + '', + '' ] } ] @@ -83,7 +83,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("cohort", data={"name": "NewRestCohort", "project": "00000000-0000-0000-0000-000000000000", "subjects": ["00000000-0000-0000-0000-000000000000"]}) +resp = client.save("cohort", data={"name": "NewRestCohort", "project": "", "subjects": [""]}) ``` ### Response example @@ -91,10 +91,10 @@ resp = client.save_model("cohort", data={"name": "NewRestCohort", "project": "00 ``` {'cohort': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'NewRestCohort', - 'project': '00000000-0000-0000-0000-000000000000', - 'subjects': ['00000000-0000-0000-0000-000000000000'] + 'project': '', + 'subjects': [''] } } ``` @@ -112,7 +112,7 @@ resp = client.save_model("cohort", data={"name": "NewRestCohort", "project": "00 {: .no_toc} ``` -resp = client.load_model('cohort', id='00000000-0000-0000-0000-000000000000') +resp = client.load('cohort', id='') ``` ### Response example @@ -120,10 +120,10 @@ resp = client.load_model('cohort', id='00000000-0000-0000-0000-000000000000') ``` {'cohort': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'NewRestCohort', - 'project': '00000000-0000-0000-0000-000000000000', - 'subjects': ['00000000-0000-0000-0000-000000000000'] + 'project': '', + 'subjects': [''] } } ``` @@ -141,7 +141,7 @@ resp = client.load_model('cohort', id='00000000-0000-0000-0000-000000000000') {: .no_toc} ``` -resp = client.save_model("cohort", id="00000000-0000-0000-0000-000000000000", data={"name": "new name"}) +resp = client.save("cohort", id="", data={"name": "new name"}) ``` ### Response example @@ -149,10 +149,10 @@ resp = client.save_model("cohort", id="00000000-0000-0000-0000-000000000000", da ``` {'cohort': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'new name', - 'project': '00000000-0000-0000-0000-000000000000', - 'subjects': ['00000000-0000-0000-0000-000000000000'] + 'project': '', + 'subjects': [''] } } ``` @@ -170,5 +170,5 @@ resp = client.save_model("cohort", id="00000000-0000-0000-0000-000000000000", da {: .no_toc} ``` -resp = client.delete_model("cohort", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("cohort", id="") ``` diff --git a/docs/api/stem/collection.md b/docs/api/stem/collection.md index 979d085..dcaf5b7 100644 --- a/docs/api/stem/collection.md +++ b/docs/api/stem/collection.md @@ -37,7 +37,7 @@ nav_order: 4 {: .no_toc} ``` -resp = client.load_model('collection') +resp = client.load('collection') ``` ### Response example @@ -46,21 +46,21 @@ resp = client.load_model('collection') ``` {'collections': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'newcollection1', - 'project': '00000000-0000-0000-0000-000000000000', + 'project': '', 'sessions': [ - '00000000-0000-0000-0000-000000000000', - '00000000-0000-0000-0000-000000000000' + '', + '' ] }, { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'collection2', - 'project': '00000000-0000-0000-0000-000000000000', + 'project': '', 'sessions': [ - '00000000-0000-0000-0000-000000000000', - '00000000-0000-0000-0000-000000000000' + '', + '' ] } ] @@ -81,7 +81,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("collection", data={"name": "NewRestCollection", "project": "00000000-0000-0000-0000-000000000000", "sessions": ["00000000-0000-0000-0000-000000000000"]}) +resp = client.save("collection", data={"name": "NewRestCollection", "project": "", "sessions": [""]}) ``` ### Response example @@ -89,10 +89,10 @@ resp = client.save_model("collection", data={"name": "NewRestCollection", "proje ``` {'collection': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'NewRestCollection', - 'project': '00000000-0000-0000-0000-000000000000', - 'sessions': ['00000000-0000-0000-0000-000000000000'] + 'project': '', + 'sessions': [''] } } ``` @@ -110,7 +110,7 @@ resp = client.save_model("collection", data={"name": "NewRestCollection", "proje {: .no_toc} ``` -resp = client.load_model('collection', id='00000000-0000-0000-0000-000000000000') +resp = client.load('collection', id='') ``` ### Response example @@ -118,10 +118,10 @@ resp = client.load_model('collection', id='00000000-0000-0000-0000-000000000000' ``` {'collection': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'NewRestCollection', - 'project': '00000000-0000-0000-0000-000000000000', - 'sessions': ['00000000-0000-0000-0000-000000000000'] + 'project': '', + 'sessions': [''] } } ``` @@ -139,7 +139,7 @@ resp = client.load_model('collection', id='00000000-0000-0000-0000-000000000000' {: .no_toc} ``` -resp = client.save_model("collection", id="00000000-0000-0000-0000-000000000000", data={"name": "new name"}) +resp = client.save("collection", id="", data={"name": "new name"}) ``` ### Response example @@ -147,10 +147,10 @@ resp = client.save_model("collection", id="00000000-0000-0000-0000-000000000000" ``` {'collection': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'name': 'new name', - 'project': '00000000-0000-0000-0000-000000000000', - 'sessions': ['00000000-0000-0000-0000-000000000000'] + 'project': '', + 'sessions': [''] } } ``` @@ -168,5 +168,5 @@ resp = client.save_model("collection", id="00000000-0000-0000-0000-000000000000" {: .no_toc} ``` -resp = client.delete_model("collection", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("collection", id="") ``` diff --git a/docs/api/stem/project.md b/docs/api/stem/project.md index 3ecbfe6..93cea8c 100644 --- a/docs/api/stem/project.md +++ b/docs/api/stem/project.md @@ -78,7 +78,7 @@ Each entry in the `groups` object follows the structure: {: .no_toc} ```python -resp = client.load_model("project") +resp = client.load("project") ``` **Example response** @@ -88,20 +88,20 @@ resp = client.load_model("project") { "projects": [ { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "project2", "description": "", "sessions": [ - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000" + "", + "", + "" ], "subjects": [ - "00000000-0000-0000-0000-000000000000" + "" ], "publications": [], "collections": [ - "00000000-0000-0000-0000-000000000000" + "" ], "cohorts": [], "extra_fields": { @@ -130,17 +130,17 @@ resp = client.load_model("project") }, }, { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "Test project1", "description": "

My first project1

", "sessions": [ - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000" + "", + "", + "", + "" ], "subjects": [ - "00000000-0000-0000-0000-000000000000" + "" ], "publications": [], "collections": [], @@ -193,7 +193,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ```python -resp = client.save_model("project", data={"name": "NewRestProject", "description": "some text"}) +resp = client.save("project", data={"name": "NewRestProject", "description": "some text"}) ``` **Example response** @@ -202,7 +202,7 @@ resp = client.save_model("project", data={"name": "NewRestProject", "descriptio ```json { "project": { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "NewRestProject", "description": "some text", "sessions": [], @@ -240,7 +240,7 @@ resp = client.save_model("project", data={"name": "NewRestProject", "descriptio {: .no_toc} ```python -resp = client.load_model("project", id="00000000-0000-0000-0000-000000000000") +resp = client.load("project", id="") ``` **Example response** @@ -249,11 +249,11 @@ resp = client.load_model("project", id="00000000-0000-0000-0000-000000000000") ```json { "project": { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "NewRestProject", "description": "some text", "sessions": [ - "00000000-0000-0000-0000-000000000000" + "" ], "subjects": [], "publications": [], @@ -300,15 +300,15 @@ resp = client.load_model("project", id="00000000-0000-0000-0000-000000000000") {: .no_toc} ```python -resp = client.save_model("project", id="00000000-0000-0000-0000-000000000000", data={"description": "new text"}) +resp = client.save("project", id="", data={"description": "new text"}) ``` To add new users and/or groups to the project, or modify the permissions of the existing ones, provide their corresponding dictionaries. Missing permissions will default to *False*. ```python -resp = client.save_model( +resp = client.save( "project", - id="00000000-0000-0000-0000-000000000000", + id="", data={ "description": "new text", "users": {"user2@mail.com": {"can_change": True, "is_manager": True}}, @@ -320,9 +320,9 @@ resp = client.save_model( To remove users and/or groups, provide the key-value pair `"remove": True` in the corresponding dictionary. ```python -resp = client.save_model( +resp = client.save( "project", - id="00000000-0000-0000-0000-000000000000", + id="", data={ "description": "new text", "users": {"user2@mail.com": {"remove": True}}, @@ -337,7 +337,7 @@ resp = client.save_model( ```json { "project": { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "NewRestProject", "description": "new text", "sessions": [], @@ -391,5 +391,5 @@ resp = client.save_model( {: .no_toc} ```python -resp = client.delete_model("project", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("project", id="") ``` diff --git a/docs/api/stem/project_group_membership_invitation.md b/docs/api/stem/project_group_membership_invitation.md index a8e26d0..a807085 100644 --- a/docs/api/stem/project_group_membership_invitation.md +++ b/docs/api/stem/project_group_membership_invitation.md @@ -40,7 +40,7 @@ nav_order: 5 {: .no_toc} ``` -resp = client.load_model('projectgroupmembershipinvitation') +resp = client.load('projectgroupmembershipinvitation') ``` ### Response example @@ -49,17 +49,17 @@ resp = client.load_model('projectgroupmembershipinvitation') ``` {'project_group_membership_invitations': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'invitee': 8, - 'project': '00000000-0000-0000-0000-000000000000', + 'project': '', 'can_change': False, 'manage_project': True, 'own_project': False }, { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'invitee': 11, - 'project': '00000000-0000-0000-0000-000000000000', + 'project': '', 'can_change': False, 'manage_project': True, 'own_project': True @@ -79,7 +79,7 @@ resp = client.load_model('projectgroupmembershipinvitation') {: .no_toc} ``` -resp = client.load_model('projectgroupmembershipinvitation', id='00000000-0000-0000-0000-000000000000') +resp = client.load('projectgroupmembershipinvitation', id='') ``` ### Response example @@ -87,9 +87,9 @@ resp = client.load_model('projectgroupmembershipinvitation', id='00000000-0000-0 ``` {'project_group_membership_invitation': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'invitee': 8, - 'project': '00000000-0000-0000-0000-000000000000', + 'project': '', 'can_change': False, 'manage_project': True, 'own_project': False @@ -108,7 +108,7 @@ resp = client.load_model('projectgroupmembershipinvitation', id='00000000-0000-0 {: .no_toc} ``` -resp = client.load_model("projectgroupmembershipinvitation", id="00000000-0000-0000-0000-000000000000", options="accept") +resp = client.load("projectgroupmembershipinvitation", id="", options="accept") ``` @@ -124,7 +124,7 @@ resp = client.load_model("projectgroupmembershipinvitation", id="00000000-0000-0 {: .no_toc} ``` -resp = client.load_model("projectgroupmembershipinvitation", id="00000000-0000-0000-0000-000000000000", options="reject") +resp = client.load("projectgroupmembershipinvitation", id="", options="reject") ``` @@ -139,5 +139,5 @@ resp = client.load_model("projectgroupmembershipinvitation", id="00000000-0000-0 {: .no_toc} ``` -resp = client.load_model("projectgroupmembershipinvitation", id="00000000-0000-0000-0000-000000000000", options="cancel") +resp = client.load("projectgroupmembershipinvitation", id="", options="cancel") ``` diff --git a/docs/api/stem/project_membership_invitation.md b/docs/api/stem/project_membership_invitation.md index 74acd7f..87ae99b 100644 --- a/docs/api/stem/project_membership_invitation.md +++ b/docs/api/stem/project_membership_invitation.md @@ -39,7 +39,7 @@ nav_order: 6 {: .no_toc} ``` -resp = client.load_model('projectmembershipinvitation') +resp = client.load('projectmembershipinvitation') ``` ### Response example @@ -48,17 +48,17 @@ resp = client.load_model('projectmembershipinvitation') ``` {'project_membership_invitations': [ { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'invitee': 27, - 'project': '00000000-0000-0000-0000-000000000000', + 'project': '', 'can_change': False, 'manage_project': False, 'own_project': False }, { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'invitee': 1, - 'project': '00000000-0000-0000-0000-000000000000', + 'project': '', 'can_change': False, 'manage_project': False, @@ -79,7 +79,7 @@ resp = client.load_model('projectmembershipinvitation') {: .no_toc} ``` -resp = client.load_model('projectmembershipinvitation', id='00000000-0000-0000-0000-000000000000') +resp = client.load('projectmembershipinvitation', id='') ``` ### Response example @@ -87,9 +87,9 @@ resp = client.load_model('projectmembershipinvitation', id='00000000-0000-0000-0 ``` {'project_membership_invitation': { - 'id': '00000000-0000-0000-0000-000000000000', + 'id': '', 'invitee': 27, - 'project': '00000000-0000-0000-0000-000000000000', + 'project': '', 'can_change': False, 'manage_project': False, 'own_project': False} @@ -108,7 +108,7 @@ resp = client.load_model('projectmembershipinvitation', id='00000000-0000-0000-0 {: .no_toc} ``` -resp = client.load_model("projectmembershipinvitation", id="00000000-0000-0000-0000-000000000000", options="accept") +resp = client.load("projectmembershipinvitation", id="", options="accept") ``` @@ -124,7 +124,7 @@ resp = client.load_model("projectmembershipinvitation", id="00000000-0000-0000-0 {: .no_toc} ``` -resp = client.load_model("projectmembershipinvitation", id="00000000-0000-0000-0000-000000000000", options="reject") +resp = client.load("projectmembershipinvitation", id="", options="reject") ``` @@ -139,5 +139,5 @@ resp = client.load_model("projectmembershipinvitation", id="00000000-0000-0000-0 {: .no_toc} ``` -resp = client.load_model("projectmembershipinvitation", id="00000000-0000-0000-0000-000000000000", options="cancel") +resp = client.load("projectmembershipinvitation", id="", options="cancel") ``` diff --git a/docs/api/stem/session.md b/docs/api/stem/session.md index b5f6d7b..8e49249 100644 --- a/docs/api/stem/session.md +++ b/docs/api/stem/session.md @@ -76,7 +76,7 @@ Use the Session → Data Storage endpoint (`/api/private/stem/sessiondatastorage {: .no_toc} ```python -resp = client.load_model("session") +resp = client.load("session") ``` ### Example response (list) @@ -86,31 +86,31 @@ resp = client.load_model("session") { "sessions": [ { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "session1", "description": "", "epochs": [], - "projects": ["00000000-0000-0000-0000-000000000000"], + "projects": [""], "date_time": null, "datastorage": [], "extra_fields": {}, "download_links": [], "dataacquisition": [], "behaviors": [], - "manipulations": ["00000000-0000-0000-0000-000000000000"], + "manipulations": [""], "tags": [], }, { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "session2", "description": "", "epochs": [], - "projects": ["00000000-0000-0000-0000-000000000000"], + "projects": [""], "date_time": null, "datastorage": [], "extra_fields": {}, "download_links": [], - "dataacquisition": ["00000000-0000-0000-0000-000000000000"], + "dataacquisition": [""], "behaviors": [], "manipulations": [], "tags": [], @@ -133,12 +133,12 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ```python -resp = client.save_model( +resp = client.save( "session", data={ "name": "NewSession", "description": "some text", - "projects": ["00000000-0000-0000-0000-000000000000"], + "projects": [""], }, ) ``` @@ -149,11 +149,11 @@ resp = client.save_model( ```json { "session": { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "NewSession", "description": "some text", "epochs": [], - "projects": ["00000000-0000-0000-0000-000000000000"], + "projects": [""], "date_time": null, "datastorage": [], "extra_fields": {}, @@ -178,7 +178,7 @@ resp = client.save_model( {: .no_toc} ```python -resp = client.load_model("session", id="00000000-0000-0000-0000-000000000000") +resp = client.load("session", id="") ``` ### Example response (detail) @@ -187,11 +187,11 @@ resp = client.load_model("session", id="00000000-0000-0000-0000-000000000000") ```json { "session": { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "NewSession", "description": "some text", "epochs": [], - "projects": ["00000000-0000-0000-0000-000000000000"], + "projects": [""], "date_time": null, "datastorage": [], "extra_fields": { @@ -222,9 +222,9 @@ resp = client.load_model("session", id="00000000-0000-0000-0000-000000000000") {: .no_toc} ```python -resp = client.save_model( +resp = client.save( "session", - id="00000000-0000-0000-0000-000000000000", + id="", data={"description": "new text"}, ) ``` @@ -235,11 +235,11 @@ resp = client.save_model( ```json { "session": { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "NewSession", "description": "new text", "epochs": [], - "projects": ["00000000-0000-0000-0000-000000000000"], + "projects": [""], "date_time": null, "datastorage": [], "extra_fields": {}, @@ -264,5 +264,5 @@ resp = client.save_model( {: .no_toc} ```python -resp = client.delete_model("session", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("session", id="") ``` diff --git a/docs/api/stem/subject.md b/docs/api/stem/subject.md index 09b962f..367d92c 100644 --- a/docs/api/stem/subject.md +++ b/docs/api/stem/subject.md @@ -63,7 +63,7 @@ nav_order: 2 {: .no_toc} ``` -resp = client.load_model('subject') +resp = client.load('subject') ``` ### Response example @@ -73,11 +73,11 @@ resp = client.load_model('subject') { "subjects": [ { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "subject1", "description": "", - "projects": ["00000000-0000-0000-0000-000000000000"], - "strain": "00000000-0000-0000-0000-000000000000", + "projects": [""], + "strain": "", "sex": "M", "genetic_line": "", "genotype": "", @@ -88,7 +88,7 @@ resp = client.load_model('subject') "death_date": null, "status": "active", "extra_fields": {}, - "procedures": ["00000000-0000-0000-0000-000000000000"], + "procedures": [""], "subjectlogs": [], "tags": [], "links": { @@ -98,11 +98,11 @@ resp = client.load_model('subject') "name_used_in_storage": null, }, { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "subject2", "description": "", - "projects": ["00000000-0000-0000-0000-000000000000"], - "strain": "00000000-0000-0000-0000-000000000000", + "projects": [""], + "strain": "", "sex": "M", "genetic_line": "", "genotype": "", @@ -114,16 +114,16 @@ resp = client.load_model('subject') "status": "active", "extra_fields": {}, "procedures": [ - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000" + "", + "", + "", + "", + "", + "", + "", + "" ], - "subjectlogs": ["00000000-0000-0000-0000-000000000000"], + "subjectlogs": [""], "tags": ["cooling"], "links": { "procedures": "procedures/", @@ -150,16 +150,16 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "subject", data={ "name": "NewSubject", "description": "some text", - "strain": "00000000-0000-0000-0000-000000000000", + "strain": "", "sex": "U", - "projects": ["00000000-0000-0000-0000-000000000000"], + "projects": [""], "subject_identifier": "WF-123", - "supplier": "00000000-0000-0000-0000-000000000000", + "supplier": "", }, ) ``` @@ -170,17 +170,17 @@ resp = client.save_model( ```json { "subject": { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "NewSubject", "description": "some text", - "projects": ["00000000-0000-0000-0000-000000000000"], - "strain": "00000000-0000-0000-0000-000000000000", + "projects": [""], + "strain": "", "sex": "U", "genetic_line": "", "genotype": "", "subject_identifier": "WF-123", "licenses": [], - "supplier": "00000000-0000-0000-0000-000000000000", + "supplier": "", "birth_date": null, "death_date": null, "status": "active", @@ -209,7 +209,7 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.load_model('subject', id='00000000-0000-0000-0000-000000000000') +resp = client.load('subject', id='') ``` ### Response example @@ -218,17 +218,17 @@ resp = client.load_model('subject', id='00000000-0000-0000-0000-000000000000') ```json { "subject": { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "NewSubject", "description": "some text", - "projects": ["00000000-0000-0000-0000-000000000000"], - "strain": "00000000-0000-0000-0000-000000000000", + "projects": [""], + "strain": "", "sex": "U", "genetic_line": "", "genotype": "", "subject_identifier": "WF-123", "licenses": [], - "supplier": "00000000-0000-0000-0000-000000000000", + "supplier": "", "birth_date": null, "death_date": null, "extra_fields": { @@ -260,9 +260,9 @@ resp = client.load_model('subject', id='00000000-0000-0000-0000-000000000000') {: .no_toc} ``` -resp = client.save_model( +resp = client.save( "subject", - id="00000000-0000-0000-0000-000000000000", + id="", data={"description": "new text"} ) ``` @@ -273,17 +273,17 @@ resp = client.save_model( ```json { "subject": { - "id": "00000000-0000-0000-0000-000000000000", + "id": "", "name": "NewSubject", "description": "new text", - "projects": ["00000000-0000-0000-0000-000000000000"], - "strain": "00000000-0000-0000-0000-000000000000", + "projects": [""], + "strain": "", "sex": "U", "genetic_line": "", "genotype": "", "subject_identifier": "WF-123", "licenses": [], - "supplier": "00000000-0000-0000-0000-000000000000", + "supplier": "", "birth_date": null, "death_date": null, "extra_fields": null, @@ -312,5 +312,5 @@ resp = client.save_model( {: .no_toc} ``` -resp = client.delete_model("subject", id="00000000-0000-0000-0000-000000000000") +resp = client.delete("subject", id="") ``` diff --git a/docs/api/taxonomies/behavioralcategory.md b/docs/api/taxonomies/behavioralcategory.md index fd0903b..6b3a8e0 100644 --- a/docs/api/taxonomies/behavioralcategory.md +++ b/docs/api/taxonomies/behavioralcategory.md @@ -40,7 +40,7 @@ Optional fields such as `comments` can be omitted from list/detail responses whe {: .no_toc} ``` -resp = client.load_model('behavioralcategory') +resp = client.load('behavioralcategory') ``` ### Response example @@ -49,16 +49,16 @@ resp = client.load_model('behavioralcategory') ``` {'behavioral_categories': [ { - 'id': 'a1b2c3d4-5678-90ab-cdef-1234567890ab', + 'id': '', 'name': 'Learning & Memory', 'description': 'Behavioral tasks assessing learning and memory processes', 'parent': None }, { - 'id': 'b2c3d4e5-6789-01bc-def0-2345678901bc', + 'id': '', 'name': 'Spatial Learning', 'description': 'Tasks assessing spatial navigation and spatial memory', - 'parent': 'a1b2c3d4-5678-90ab-cdef-1234567890ab' + 'parent': '' } ]} ``` @@ -79,7 +79,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("behavioralcategory", data={ +resp = client.save("behavioralcategory", data={ "name": "Motor Function", "description": "Tasks assessing motor abilities and coordination", } @@ -91,7 +91,7 @@ resp = client.save_model("behavioralcategory", data={ ``` {'behavioral_category_approval': { - 'id': 'c3d4e5f6-7890-12cd-ef01-3456789012cd', + 'id': '', 'name': 'Motor Function', 'description': 'Tasks assessing motor abilities and coordination', 'parent': None} @@ -109,7 +109,7 @@ resp = client.save_model("behavioralcategory", data={ {: .no_toc} ``` -resp = client.load_model('behavioralcategory', id='a1b2c3d4-5678-90ab-cdef-1234567890ab') +resp = client.load('behavioralcategory', id='') ``` ### Response example @@ -117,7 +117,7 @@ resp = client.load_model('behavioralcategory', id='a1b2c3d4-5678-90ab-cdef-12345 ``` {'behavioral_category': { - 'id': 'a1b2c3d4-5678-90ab-cdef-1234567890ab', + 'id': '', 'name': 'Learning & Memory', 'description': 'Behavioral tasks assessing learning and memory processes', 'parent': None} @@ -138,7 +138,7 @@ resp = client.load_model('behavioralcategory', id='a1b2c3d4-5678-90ab-cdef-12345 {: .no_toc} ``` -resp = client.save_model("behavioralcategory", id="a1b2c3d4-5678-90ab-cdef-1234567890ab", data={"description": "updated description"}) +resp = client.save("behavioralcategory", id="", data={"description": "updated description"}) ``` ### Response example @@ -146,7 +146,7 @@ resp = client.save_model("behavioralcategory", id="a1b2c3d4-5678-90ab-cdef-12345 ``` {'behavioral_category_approval': { - 'id': 'd4e5f6a7-8901-23de-f012-4567890123de', + 'id': '', 'name': 'Learning & Memory', 'description': 'updated description', 'parent': None} @@ -167,7 +167,7 @@ resp = client.save_model("behavioralcategory", id="a1b2c3d4-5678-90ab-cdef-12345 {: .no_toc} ``` -resp = client.delete_model("behavioralcategory", id="a1b2c3d4-5678-90ab-cdef-1234567890ab") +resp = client.delete("behavioralcategory", id="") ``` @@ -182,7 +182,7 @@ resp = client.delete_model("behavioralcategory", id="a1b2c3d4-5678-90ab-cdef-123 {: .no_toc} ``` -resp = client.load_model('behavioralcategoryapproval') +resp = client.load('behavioralcategoryapproval') ``` ### Response example @@ -191,7 +191,7 @@ resp = client.load_model('behavioralcategoryapproval') ``` {'behavioral_category_approvals': [ { - 'id': 'c3d4e5f6-7890-12cd-ef01-3456789012cd', + 'id': '', 'name': 'Motor Function', 'description': 'Tasks assessing motor abilities and coordination', 'parent': None, @@ -215,7 +215,7 @@ resp = client.load_model('behavioralcategoryapproval') {: .no_toc} ``` -resp = client.load_model('behavioralcategoryapproval', id='c3d4e5f6-7890-12cd-ef01-3456789012cd') +resp = client.load('behavioralcategoryapproval', id='') ``` ### Response example @@ -223,7 +223,7 @@ resp = client.load_model('behavioralcategoryapproval', id='c3d4e5f6-7890-12cd-ef ``` {'behavioral_category_approval': { - 'id': 'c3d4e5f6-7890-12cd-ef01-3456789012cd', + 'id': '', 'name': 'Motor Function', 'description': 'Tasks assessing motor abilities and coordination', 'parent': None, @@ -246,7 +246,7 @@ resp = client.load_model('behavioralcategoryapproval', id='c3d4e5f6-7890-12cd-ef {: .no_toc} ``` -resp = client.save_model("behavioralcategoryapproval", id="c3d4e5f6-7890-12cd-ef01-3456789012cd", options="accept") +resp = client.save("behavioralcategoryapproval", id="", options="accept") ``` @@ -261,5 +261,5 @@ resp = client.save_model("behavioralcategoryapproval", id="c3d4e5f6-7890-12cd-ef {: .no_toc} ``` -resp = client.save_model("behavioralcategoryapproval", id="d4e5f6a7-8901-23de-f012-4567890123de", options="reject") +resp = client.save("behavioralcategoryapproval", id="", options="reject") ``` diff --git a/docs/api/taxonomies/behavioralparadigm.md b/docs/api/taxonomies/behavioralparadigm.md index 1c2b7b8..4548860 100644 --- a/docs/api/taxonomies/behavioralparadigm.md +++ b/docs/api/taxonomies/behavioralparadigm.md @@ -45,7 +45,7 @@ Optional fields such as `comments` can be omitted from list/detail responses whe {: .no_toc} ``` -resp = client.load_model('behavioralparadigm') +resp = client.load('behavioralparadigm') ``` ### Response example @@ -54,10 +54,10 @@ resp = client.load_model('behavioralparadigm') ``` {'behavioral_paradigms': [ { - 'id': 'e5f6a7b8-9012-34ef-0123-5678901234ef', + 'id': '', 'name': 'Morris Water Navigation Task', 'description': 'A spatial learning task using a water maze to assess hippocampal-dependent spatial memory', - 'category': 'b2c3d4e5-6789-01bc-def0-2345678901bc', + 'category': '', 'species': [], 'original_publication': 'Morris 1984', 'reference_url': '', @@ -65,10 +65,10 @@ resp = client.load_model('behavioralparadigm') 'external_identifiers': None }, { - 'id': 'f6a7b8c9-0123-45f0-1234-6789012345f0', + 'id': '', 'name': 'Elevated Plus Exploration', 'description': 'Assessment of anxiety-like behavior via open arm avoidance on an elevated plus-shaped maze', - 'category': 'c3d4e5f6-7890-12cd-ef01-3456789012cd', + 'category': '', 'species': [], 'original_publication': '', 'reference_url': '', @@ -94,10 +94,10 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("behavioralparadigm", data={ +resp = client.save("behavioralparadigm", data={ "name": "Rotarod", "description": "Assessment of balance, coordination, and motor learning on a rotating rod", - "category": "c3d4e5f6-7890-12cd-ef01-3456789012cd", + "category": "", "original_publication": "Dunham & Miya 1957", } ) @@ -108,10 +108,10 @@ resp = client.save_model("behavioralparadigm", data={ ``` {'behavioral_paradigm_approval': { - 'id': 'a7b8c9d0-1234-56a1-2345-7890123456a1', + 'id': '', 'name': 'Rotarod', 'description': 'Assessment of balance, coordination, and motor learning on a rotating rod', - 'category': 'c3d4e5f6-7890-12cd-ef01-3456789012cd', + 'category': '', 'species': [], 'original_publication': 'Dunham & Miya 1957', 'reference_url': '', @@ -131,7 +131,7 @@ resp = client.save_model("behavioralparadigm", data={ {: .no_toc} ``` -resp = client.load_model('behavioralparadigm', id='e5f6a7b8-9012-34ef-0123-5678901234ef') +resp = client.load('behavioralparadigm', id='') ``` ### Response example @@ -139,10 +139,10 @@ resp = client.load_model('behavioralparadigm', id='e5f6a7b8-9012-34ef-0123-56789 ``` {'behavioral_paradigm': { - 'id': 'e5f6a7b8-9012-34ef-0123-5678901234ef', + 'id': '', 'name': 'Morris Water Navigation Task', 'description': 'A spatial learning task using a water maze to assess hippocampal-dependent spatial memory', - 'category': 'b2c3d4e5-6789-01bc-def0-2345678901bc', + 'category': '', 'species': [], 'original_publication': 'Morris 1984', 'reference_url': '', @@ -165,7 +165,7 @@ resp = client.load_model('behavioralparadigm', id='e5f6a7b8-9012-34ef-0123-56789 {: .no_toc} ``` -resp = client.save_model("behavioralparadigm", id="e5f6a7b8-9012-34ef-0123-5678901234ef", data={"description": "updated description"}) +resp = client.save("behavioralparadigm", id="", data={"description": "updated description"}) ``` ### Response example @@ -173,10 +173,10 @@ resp = client.save_model("behavioralparadigm", id="e5f6a7b8-9012-34ef-0123-56789 ``` {'behavioral_paradigm_approval': { - 'id': 'b8c9d0e1-2345-67b2-3456-8901234567b2', + 'id': '', 'name': 'Morris Water Navigation Task', 'description': 'updated description', - 'category': 'b2c3d4e5-6789-01bc-def0-2345678901bc', + 'category': '', 'species': [], 'original_publication': 'Morris 1984', 'reference_url': '', @@ -199,7 +199,7 @@ resp = client.save_model("behavioralparadigm", id="e5f6a7b8-9012-34ef-0123-56789 {: .no_toc} ``` -resp = client.delete_model("behavioralparadigm", id="e5f6a7b8-9012-34ef-0123-5678901234ef") +resp = client.delete("behavioralparadigm", id="") ``` @@ -214,7 +214,7 @@ resp = client.delete_model("behavioralparadigm", id="e5f6a7b8-9012-34ef-0123-567 {: .no_toc} ``` -resp = client.load_model('behavioralparadigmapproval') +resp = client.load('behavioralparadigmapproval') ``` ### Response example @@ -223,10 +223,10 @@ resp = client.load_model('behavioralparadigmapproval') ``` {'behavioral_paradigm_approvals': [ { - 'id': 'a7b8c9d0-1234-56a1-2345-7890123456a1', + 'id': '', 'name': 'Rotarod', 'description': 'Assessment of balance, coordination, and motor learning on a rotating rod', - 'category': 'c3d4e5f6-7890-12cd-ef01-3456789012cd', + 'category': '', 'species': [], 'original_publication': 'Dunham & Miya 1957', 'reference_url': '', @@ -252,7 +252,7 @@ resp = client.load_model('behavioralparadigmapproval') {: .no_toc} ``` -resp = client.load_model('behavioralparadigmapproval', id='a7b8c9d0-1234-56a1-2345-7890123456a1') +resp = client.load('behavioralparadigmapproval', id='') ``` ### Response example @@ -260,10 +260,10 @@ resp = client.load_model('behavioralparadigmapproval', id='a7b8c9d0-1234-56a1-23 ``` {'behavioral_paradigm_approval': { - 'id': 'a7b8c9d0-1234-56a1-2345-7890123456a1', + 'id': '', 'name': 'Rotarod', 'description': 'Assessment of balance, coordination, and motor learning on a rotating rod', - 'category': 'c3d4e5f6-7890-12cd-ef01-3456789012cd', + 'category': '', 'species': [], 'original_publication': 'Dunham & Miya 1957', 'reference_url': '', @@ -288,7 +288,7 @@ resp = client.load_model('behavioralparadigmapproval', id='a7b8c9d0-1234-56a1-23 {: .no_toc} ``` -resp = client.save_model("behavioralparadigmapproval", id="a7b8c9d0-1234-56a1-2345-7890123456a1", options="accept") +resp = client.save("behavioralparadigmapproval", id="", options="accept") ``` @@ -303,5 +303,5 @@ resp = client.save_model("behavioralparadigmapproval", id="a7b8c9d0-1234-56a1-23 {: .no_toc} ``` -resp = client.save_model("behavioralparadigmapproval", id="b8c9d0e1-2345-67b2-3456-8901234567b2", options="reject") +resp = client.save("behavioralparadigmapproval", id="", options="reject") ``` diff --git a/docs/api/taxonomies/brainregion.md b/docs/api/taxonomies/brainregion.md index b6be75b..17a5442 100644 --- a/docs/api/taxonomies/brainregion.md +++ b/docs/api/taxonomies/brainregion.md @@ -51,7 +51,7 @@ These are the available `atlas` options for Brain Region: {: .no_toc} ``` -resp = client.load_model('brainregion') +resp = client.load('brainregion') ``` ### Response example @@ -60,21 +60,21 @@ resp = client.load_model('brainregion') ``` {"brain_regions": [ { - 'id': '620a4416-54fb-4386-b8a7-dda66ac0a7e5', + 'id': '', 'name': 'Perifornical nucleus', 'description': '', 'acronym': 'PeF', 'atlas': 'AIA' }, { - 'id': 'b4782d29-c96c-4bf9-9394-8be2f2ed269a', + 'id': '', 'name': 'Retrochiasmatic area', 'description': '', 'acronym': 'RCH', 'atlas': 'AIA' }, { - 'id': '927a4e7a-4c75-4ecc-8670-bef7e8f4e944', + 'id': '', 'name': 'Subthalamic nucleus', 'description': '', 'acronym': 'STN', @@ -99,7 +99,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("brainregion", data={ +resp = client.save("brainregion", data={ "name": "MyNewBrainRegion", "description": "", "acronym": "MNBR", @@ -113,7 +113,7 @@ resp = client.save_model("brainregion", data={ ``` {'brain_region': { - 'id': '2cdd3db4-1dc4-4568-9ee3-de2356ee31a9', + 'id': '', 'name': 'MyNewBrainRegion', 'description': '', 'acronym': 'MNBR', @@ -134,7 +134,7 @@ resp = client.save_model("brainregion", data={ {: .no_toc} ``` -resp = client.load_model('brainregion', id='2cdd3db4-1dc4-4568-9ee3-de2356ee31a9') +resp = client.load('brainregion', id='') ``` ### Response example @@ -142,7 +142,7 @@ resp = client.load_model('brainregion', id='2cdd3db4-1dc4-4568-9ee3-de2356ee31a9 ``` {'brain_region': { - 'id': '2cdd3db4-1dc4-4568-9ee3-de2356ee31a9', + 'id': '', 'name': 'MyNewBrainRegion', 'description': '', 'acronym': 'MNBR', @@ -164,7 +164,7 @@ resp = client.load_model('brainregion', id='2cdd3db4-1dc4-4568-9ee3-de2356ee31a9 {: .no_toc} ``` -resp = client.save_model("brainregion", id="2cdd3db4-1dc4-4568-9ee3-de2356ee31a9", data={"description": "new text"}) +resp = client.save("brainregion", id="", data={"description": "new text"}) ``` ### Response example @@ -172,7 +172,7 @@ resp = client.save_model("brainregion", id="2cdd3db4-1dc4-4568-9ee3-de2356ee31a9 ``` {'brain_region': { - 'id': '2cdd3db4-1dc4-4568-9ee3-de2356ee31a9', + 'id': '', 'name': 'MyNewBrainRegion', 'description': 'new text', 'acronym': 'MNBR', @@ -194,5 +194,5 @@ resp = client.save_model("brainregion", id="2cdd3db4-1dc4-4568-9ee3-de2356ee31a9 {: .no_toc} ``` -resp = client.delete_model("brainregion", id="2cdd3db4-1dc4-4568-9ee3-de2356ee31a9") +resp = client.delete("brainregion", id="") ``` diff --git a/docs/api/taxonomies/regulatoryauthority.md b/docs/api/taxonomies/regulatoryauthority.md index 7f88281..3f41e60 100644 --- a/docs/api/taxonomies/regulatoryauthority.md +++ b/docs/api/taxonomies/regulatoryauthority.md @@ -43,7 +43,7 @@ Optional fields such as `abbreviation` and `comments` can be omitted from list/d {: .no_toc} ``` -resp = client.load_model('regulatoryauthority') +resp = client.load('regulatoryauthority') ``` ### Response example @@ -52,7 +52,7 @@ resp = client.load_model('regulatoryauthority') ``` {'regulatoryauthorities': [ { - 'id': 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', + 'id': '', 'name': 'Institutional Animal Care and Use Committee', 'abbreviation': 'IACUC', 'country': 'US', @@ -62,7 +62,7 @@ resp = client.load_model('regulatoryauthority') 'is_active': True }, { - 'id': 'b2c3d4e5-f6a7-8901-bcde-f12345678901', + 'id': '', 'name': 'Home Office', 'abbreviation': 'HO', 'country': 'GB', @@ -90,7 +90,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("regulatoryauthority", data={ +resp = client.save("regulatoryauthority", data={ "name": "Animal Ethics Committee", "abbreviation": "AEC", "country": "AU", @@ -104,7 +104,7 @@ resp = client.save_model("regulatoryauthority", data={ ``` {'regulatoryauthority_approval': { - 'id': 'c3d4e5f6-a7b8-9012-cdef-123456789012', + 'id': '', 'name': 'Animal Ethics Committee', 'abbreviation': 'AEC', 'country': 'AU', @@ -131,7 +131,7 @@ resp = client.save_model("regulatoryauthority", data={ {: .no_toc} ``` -resp = client.load_model('regulatoryauthority', id='a1b2c3d4-e5f6-7890-abcd-ef1234567890') +resp = client.load('regulatoryauthority', id='') ``` ### Response example @@ -139,7 +139,7 @@ resp = client.load_model('regulatoryauthority', id='a1b2c3d4-e5f6-7890-abcd-ef12 ``` {'regulatoryauthority': { - 'id': 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', + 'id': '', 'name': 'Institutional Animal Care and Use Committee', 'abbreviation': 'IACUC', 'country': 'US', @@ -164,7 +164,7 @@ resp = client.load_model('regulatoryauthority', id='a1b2c3d4-e5f6-7890-abcd-ef12 {: .no_toc} ``` -resp = client.save_model("regulatoryauthority", id="a1b2c3d4-e5f6-7890-abcd-ef1234567890", data={"description": "Updated description."}) +resp = client.save("regulatoryauthority", id="", data={"description": "Updated description."}) ``` ### Response example @@ -172,7 +172,7 @@ resp = client.save_model("regulatoryauthority", id="a1b2c3d4-e5f6-7890-abcd-ef12 ``` {'regulatoryauthority_approval': { - 'id': 'd4e5f6a7-b8c9-0123-defa-234567890123', + 'id': '', 'name': 'Institutional Animal Care and Use Committee', 'abbreviation': 'IACUC', 'country': 'US', @@ -180,7 +180,7 @@ resp = client.save_model("regulatoryauthority", id="a1b2c3d4-e5f6-7890-abcd-ef12 'website': '', 'description': 'Updated description.', 'is_active': True, - 'instance_id': 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', + 'instance_id': '', 'action': 'Change', 'reviewer': None, 'status': 'Pending'} @@ -201,7 +201,7 @@ resp = client.save_model("regulatoryauthority", id="a1b2c3d4-e5f6-7890-abcd-ef12 {: .no_toc} ``` -resp = client.delete_model("regulatoryauthority", id="a1b2c3d4-e5f6-7890-abcd-ef1234567890") +resp = client.delete("regulatoryauthority", id="") ``` @@ -216,7 +216,7 @@ resp = client.delete_model("regulatoryauthority", id="a1b2c3d4-e5f6-7890-abcd-ef {: .no_toc} ``` -resp = client.load_model('regulatoryauthorityapproval') +resp = client.load('regulatoryauthorityapproval') ``` ### Response example @@ -225,7 +225,7 @@ resp = client.load_model('regulatoryauthorityapproval') ``` {'regulatoryauthority_approvals': [ { - 'id': 'c3d4e5f6-a7b8-9012-cdef-123456789012', + 'id': '', 'name': 'Animal Ethics Committee', 'abbreviation': 'AEC', 'country': 'AU', @@ -253,7 +253,7 @@ resp = client.load_model('regulatoryauthorityapproval') {: .no_toc} ``` -resp = client.load_model('regulatoryauthorityapproval', id='c3d4e5f6-a7b8-9012-cdef-123456789012') +resp = client.load('regulatoryauthorityapproval', id='') ``` ### Response example @@ -261,7 +261,7 @@ resp = client.load_model('regulatoryauthorityapproval', id='c3d4e5f6-a7b8-9012-c ``` {'regulatoryauthority_approval': { - 'id': 'c3d4e5f6-a7b8-9012-cdef-123456789012', + 'id': '', 'name': 'Animal Ethics Committee', 'abbreviation': 'AEC', 'country': 'AU', @@ -288,7 +288,7 @@ resp = client.load_model('regulatoryauthorityapproval', id='c3d4e5f6-a7b8-9012-c {: .no_toc} ``` -resp = client.save_model("regulatoryauthorityapproval", id="c3d4e5f6-a7b8-9012-cdef-123456789012", options="accept") +resp = client.save("regulatoryauthorityapproval", id="", options="accept") ``` @@ -303,5 +303,5 @@ resp = client.save_model("regulatoryauthorityapproval", id="c3d4e5f6-a7b8-9012-c {: .no_toc} ``` -resp = client.save_model("regulatoryauthorityapproval", id="c3d4e5f6-a7b8-9012-cdef-123456789012", options="reject") +resp = client.save("regulatoryauthorityapproval", id="", options="reject") ``` diff --git a/docs/api/taxonomies/setuptype.md b/docs/api/taxonomies/setuptype.md index 51248e1..ac63a74 100644 --- a/docs/api/taxonomies/setuptype.md +++ b/docs/api/taxonomies/setuptype.md @@ -49,7 +49,7 @@ These are the available `category` options for Setup Type: {: .no_toc} ``` -resp = client.load_model('setuptype') +resp = client.load('setuptype') ``` ### Response example @@ -58,19 +58,19 @@ resp = client.load_model('setuptype') ``` {'setup_types': [ { - 'id': '531b2a21-ab1f-4aa8-8eaf-905421168d6b', + 'id': '', 'name': 'Barnes maze', 'description': 'The Barnes maze is a paradigm to study spatial learning and memory. It consists of a circular table with holes around the circumference.', 'category': 'F' }, { - 'id': '414a49b2-61b5-4ef5-8b64-6528d5f1ed8d', + 'id': '', 'name': 'Theta maze', 'description': 'A circular maze with a central arm going across the center of the circle.', 'category': 'U' }, { - 'id': '70b1d2eb-a721-4fef-8e86-0c2b1469283a', + 'id': '', 'name': 'Y-maze', 'description': 'The Y-maze is, similar to the T-maze, a test to investigate spatial learning and memory. Specifically designed for testing rats or mice.', 'category': 'U' @@ -94,7 +94,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("setuptype", data={ +resp = client.save("setuptype", data={ "name": "MyNewSetupType", "description": "", "category": "F", @@ -107,7 +107,7 @@ resp = client.save_model("setuptype", data={ ``` {'setup_type_approval': { - 'id': '725ef635-09b7-4817-98f7-d58e598b445e', + 'id': '', 'name': 'MyNewSetupType', 'description': '', 'category': 'F'} @@ -126,7 +126,7 @@ resp = client.save_model("setuptype", data={ {: .no_toc} ``` -resp = client.load_model('setuptype', id='a2510c9e-3ef2-40eb-b4b4-70b8a3fbd3c6') +resp = client.load('setuptype', id='') ``` ### Response example @@ -134,7 +134,7 @@ resp = client.load_model('setuptype', id='a2510c9e-3ef2-40eb-b4b4-70b8a3fbd3c6') ``` {'setup_type': { - 'id': 'a2510c9e-3ef2-40eb-b4b4-70b8a3fbd3c6', + 'id': '', 'name': 'MyNewSetupType', 'description': '', 'category': 'F'} @@ -155,7 +155,7 @@ resp = client.load_model('setuptype', id='a2510c9e-3ef2-40eb-b4b4-70b8a3fbd3c6') {: .no_toc} ``` -resp = client.save_model("setuptype", id="a2510c9e-3ef2-40eb-b4b4-70b8a3fbd3c6", data={"description": "new text"}) +resp = client.save("setuptype", id="", data={"description": "new text"}) ``` ### Response example @@ -163,7 +163,7 @@ resp = client.save_model("setuptype", id="a2510c9e-3ef2-40eb-b4b4-70b8a3fbd3c6", ``` {'setup_type_approval': { - 'id': '511f5736-5c34-46c5-b4d2-d7bb0727b5fe', + 'id': '', 'name': 'MyNewSetupType', 'description': 'new text', 'category': 'F'} @@ -184,7 +184,7 @@ resp = client.save_model("setuptype", id="a2510c9e-3ef2-40eb-b4b4-70b8a3fbd3c6", {: .no_toc} ``` -resp = client.delete_model("setuptype", id="a2510c9e-3ef2-40eb-b4b4-70b8a3fbd3c6") +resp = client.delete("setuptype", id="") ``` @@ -199,7 +199,7 @@ resp = client.delete_model("setuptype", id="a2510c9e-3ef2-40eb-b4b4-70b8a3fbd3c6 {: .no_toc} ``` -resp = client.load_model('setuptypeapproval') +resp = client.load('setuptypeapproval') ``` ### Response example @@ -208,7 +208,7 @@ resp = client.load_model('setuptypeapproval') ``` {'setup_type_approvals': [ { - 'id': '725ef635-09b7-4817-98f7-d58e598b445e', + 'id': '', 'name': 'MyNewSetupType', 'description': '', 'category': 'F', @@ -218,11 +218,11 @@ resp = client.load_model('setuptypeapproval') 'status': 'Pending' }, { - 'id': '97b70a5e-52f9-4358-8b27-0a886248e749', + 'id': '', 'name': 'MyNewMaze', 'description': '', 'category': 'U', - 'instance_id': 'e10ea8ab-9afa-4060-8382-dc9d9e1763f8', + 'instance_id': '', 'action': 'Add', 'reviewer': 3, 'status': 'Rejected' @@ -242,7 +242,7 @@ resp = client.load_model('setuptypeapproval') {: .no_toc} ``` -resp = client.load_model('setuptypeapproval', id='725ef635-09b7-4817-98f7-d58e598b445e') +resp = client.load('setuptypeapproval', id='') ``` ### Response example @@ -250,7 +250,7 @@ resp = client.load_model('setuptypeapproval', id='725ef635-09b7-4817-98f7-d58e59 ``` {'setup_type_approval': { - 'id': '725ef635-09b7-4817-98f7-d58e598b445e', + 'id': '', 'name': 'MyNewSetupType', 'description': '', 'category': 'F', @@ -273,7 +273,7 @@ resp = client.load_model('setuptypeapproval', id='725ef635-09b7-4817-98f7-d58e59 {: .no_toc} ``` -resp = client.save_model("setuptypeapproval", id="725ef635-09b7-4817-98f7-d58e598b445e", options="accept") +resp = client.save("setuptypeapproval", id="", options="accept") ``` @@ -288,5 +288,5 @@ resp = client.save_model("setuptypeapproval", id="725ef635-09b7-4817-98f7-d58e59 {: .no_toc} ``` -resp = client.save_model("setuptypeapproval", id="511f5736-5c34-46c5-b4d2-d7bb0727b5fe", options="reject") +resp = client.save("setuptypeapproval", id="", options="reject") ``` diff --git a/docs/api/taxonomies/species.md b/docs/api/taxonomies/species.md index a79eda5..8577cd9 100644 --- a/docs/api/taxonomies/species.md +++ b/docs/api/taxonomies/species.md @@ -42,7 +42,7 @@ Optional fields such as `comments` can be omitted from list/detail responses whe {: .no_toc} ``` -resp = client.load_model('species') +resp = client.load('species') ``` ### Response example @@ -51,7 +51,7 @@ resp = client.load_model('species') ``` {'species': [ { - 'id': '089b00eb-94e3-464b-b7e8-62d04ddf2b11', + 'id': '', 'name': 'Rat', 'description': 'Rattus rattus', 'rrid': None, @@ -59,7 +59,7 @@ resp = client.load_model('species') 'external_identifiers': [] }, { - 'id': '93dd9502-305a-4e7b-b66b-42cf8c79368f', + 'id': '', 'name': 'Red-eared Turtles', 'description': 'Trachemys scripta elegans', 'rrid': None, @@ -85,7 +85,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("species", data={ +resp = client.save("species", data={ "name": "MyNewSpecies", "description": "", } @@ -97,7 +97,7 @@ resp = client.save_model("species", data={ ``` {'species_approval': { - 'id': '529efb3b-99f9-4e42-90e3-f5990988f037', + 'id': '', 'name': 'MyNewSpecies', 'description': '', 'rrid': None, @@ -116,7 +116,7 @@ resp = client.save_model("species", data={ {: .no_toc} ``` -resp = client.load_model('species', id='855d4962-52d9-49f2-a9ab-36073bd34c3f') +resp = client.load('species', id='') ``` ### Response example @@ -124,7 +124,7 @@ resp = client.load_model('species', id='855d4962-52d9-49f2-a9ab-36073bd34c3f') ``` {'species': { - 'id': '855d4962-52d9-49f2-a9ab-36073bd34c3f', + 'id': '', 'name': 'MyNewSpecies', 'description': '', 'rrid': None, @@ -147,7 +147,7 @@ resp = client.load_model('species', id='855d4962-52d9-49f2-a9ab-36073bd34c3f') {: .no_toc} ``` -resp = client.save_model("species", id="855d4962-52d9-49f2-a9ab-36073bd34c3f", data={"description": "new text"}) +resp = client.save("species", id="", data={"description": "new text"}) ``` ### Response example @@ -155,7 +155,7 @@ resp = client.save_model("species", id="855d4962-52d9-49f2-a9ab-36073bd34c3f", d ``` {'species_approval': { - 'id': '5ccb907c-520a-4c67-baf1-ac23a71ab710', + 'id': '', 'name': 'MyNewSpecies', 'description': 'new text', 'rrid': None, @@ -177,7 +177,7 @@ resp = client.save_model("species", id="855d4962-52d9-49f2-a9ab-36073bd34c3f", d {: .no_toc} ``` -resp = client.delete_model("species", id="855d4962-52d9-49f2-a9ab-36073bd34c3f") +resp = client.delete("species", id="") ``` @@ -192,7 +192,7 @@ resp = client.delete_model("species", id="855d4962-52d9-49f2-a9ab-36073bd34c3f") {: .no_toc} ``` -resp = client.load_model('speciesapproval') +resp = client.load('speciesapproval') ``` ### Response example @@ -201,7 +201,7 @@ resp = client.load_model('speciesapproval') ``` {'species_approvals': [ { - 'id': '529efb3b-99f9-4e42-90e3-f5990988f037', + 'id': '', 'name': 'MyNewSpecies', 'description': '', 'rrid': None, @@ -212,7 +212,7 @@ resp = client.load_model('speciesapproval') 'status': 'Pending' }, { - 'id': '0e03a0f2-3b11-47bf-acc1-8b4b6d005692', + 'id': '', 'name': 'Digimon', 'description': 'aaa', 'rrid': None, @@ -237,7 +237,7 @@ resp = client.load_model('speciesapproval') {: .no_toc} ``` -resp = client.load_model('speciesapproval', id='529efb3b-99f9-4e42-90e3-f5990988f037') +resp = client.load('speciesapproval', id='') ``` ### Response example @@ -245,7 +245,7 @@ resp = client.load_model('speciesapproval', id='529efb3b-99f9-4e42-90e3-f5990988 ``` {'species_approval': { - 'id': '529efb3b-99f9-4e42-90e3-f5990988f037', + 'id': '', 'name': 'MyNewSpecies', 'description': '', 'rrid': None, @@ -269,7 +269,7 @@ resp = client.load_model('speciesapproval', id='529efb3b-99f9-4e42-90e3-f5990988 {: .no_toc} ``` -resp = client.save_model("speciesapproval", id="529efb3b-99f9-4e42-90e3-f5990988f037", options="accept") +resp = client.save("speciesapproval", id="", options="accept") ``` @@ -284,5 +284,5 @@ resp = client.save_model("speciesapproval", id="529efb3b-99f9-4e42-90e3-f5990988 {: .no_toc} ``` -resp = client.save_model("speciesapproval", id="5ccb907c-520a-4c67-baf1-ac23a71ab710", options="reject") +resp = client.save("speciesapproval", id="", options="reject") ``` diff --git a/docs/api/taxonomies/strain.md b/docs/api/taxonomies/strain.md index 7dafa4e..eeef7cc 100644 --- a/docs/api/taxonomies/strain.md +++ b/docs/api/taxonomies/strain.md @@ -43,7 +43,7 @@ Optional fields such as `comments` can be omitted from list/detail responses whe {: .no_toc} ``` -resp = client.load_model('strain') +resp = client.load('strain') ``` ### Response example @@ -52,19 +52,19 @@ resp = client.load_model('strain') ``` {'strains': [ { - 'id': 'd7e490ec-66ef-447e-ae9f-3f74c858258e', + 'id': '', 'name': 'Brown Norway', 'description': '', - 'species': '089b00eb-94e3-464b-b7e8-62d04ddf2b11', + 'species': '', 'rrid': None, 'rrid_url': None, 'external_identifiers': [] }, { - 'id': '378bc660-f35a-48a7-b06d-89ece1e4ba40', + 'id': '', 'name': 'Red-eared slider', 'description': '', - 'species': '93dd9502-305a-4e7b-b66b-42cf8c79368f', + 'species': '', 'rrid': None, 'rrid_url': None, 'external_identifiers': [] @@ -88,10 +88,10 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("strain", data={ +resp = client.save("strain", data={ "name": "MyNewStrain", "description": "", - "species": "93dd9502-305a-4e7b-b66b-42cf8c79368f", + "species": "", } ) ``` @@ -101,10 +101,10 @@ resp = client.save_model("strain", data={ ``` {'strain_approval': { - 'id': 'b460dfbc-79bb-499e-87ed-57df02832d88', + 'id': '', 'name': 'MyNewStrain', 'description': '', - 'species': '93dd9502-305a-4e7b-b66b-42cf8c79368f', + 'species': '', 'rrid': None, 'external_identifiers': []} } @@ -121,7 +121,7 @@ resp = client.save_model("strain", data={ {: .no_toc} ``` -resp = client.load_model('strain', id='7963dc0b-e4e7-459c-9a05-cf5a54200e02') +resp = client.load('strain', id='') ``` ### Response example @@ -129,10 +129,10 @@ resp = client.load_model('strain', id='7963dc0b-e4e7-459c-9a05-cf5a54200e02') ``` {'strain': { - 'id': '7963dc0b-e4e7-459c-9a05-cf5a54200e02', + 'id': '', 'name': 'MyNewStrain', 'description': '', - 'species': '93dd9502-305a-4e7b-b66b-42cf8c79368f', + 'species': '', 'rrid': None, 'rrid_url': None, 'external_identifiers': []} @@ -153,7 +153,7 @@ resp = client.load_model('strain', id='7963dc0b-e4e7-459c-9a05-cf5a54200e02') {: .no_toc} ``` -resp = client.save_model("strain", id="7963dc0b-e4e7-459c-9a05-cf5a54200e02", data={"description": "new text"}) +resp = client.save("strain", id="", data={"description": "new text"}) ``` ### Response example @@ -161,10 +161,10 @@ resp = client.save_model("strain", id="7963dc0b-e4e7-459c-9a05-cf5a54200e02", da ``` {'strain_approval': { - 'id': '6403fdaf-7896-4ef7-9b30-ee12d69aa408', + 'id': '', 'name': 'MyNewStrain', 'description': 'new text', - 'species': '93dd9502-305a-4e7b-b66b-42cf8c79368f', + 'species': '', 'rrid': None, 'external_identifiers': []} } @@ -184,7 +184,7 @@ resp = client.save_model("strain", id="7963dc0b-e4e7-459c-9a05-cf5a54200e02", da {: .no_toc} ``` -resp = client.delete_model("strain", id="7963dc0b-e4e7-459c-9a05-cf5a54200e02") +resp = client.delete("strain", id="") ``` @@ -199,7 +199,7 @@ resp = client.delete_model("strain", id="7963dc0b-e4e7-459c-9a05-cf5a54200e02") {: .no_toc} ``` -resp = client.load_model('strainapproval') +resp = client.load('strainapproval') ``` ### Response example @@ -208,10 +208,10 @@ resp = client.load_model('strainapproval') ``` {'strain_approvals': [ { - 'id': 'b460dfbc-79bb-499e-87ed-57df02832d88', + 'id': '', 'name': 'MyNewStrain', 'description': '', - 'species': '93dd9502-305a-4e7b-b66b-42cf8c79368f', + 'species': '', 'rrid': None, 'external_identifiers': [], 'instance_id': None, @@ -220,10 +220,10 @@ resp = client.load_model('strainapproval') 'status': 'Pending' }, { - 'id': '535e2f20-5571-4acd-83ef-edc4c076bbb4', + 'id': '', 'name': 'Agumon', 'description': '', - 'species': '7a224fef-df3f-4b4e-aa52-7ae743b7bf58', + 'species': '', 'rrid': None, 'external_identifiers': [], 'instance_id': None, @@ -246,7 +246,7 @@ resp = client.load_model('strainapproval') {: .no_toc} ``` -resp = client.load_model('strainapproval', id='b460dfbc-79bb-499e-87ed-57df02832d88') +resp = client.load('strainapproval', id='') ``` ### Response example @@ -254,10 +254,10 @@ resp = client.load_model('strainapproval', id='b460dfbc-79bb-499e-87ed-57df02832 ``` {'strain_approval': { - 'id': 'b460dfbc-79bb-499e-87ed-57df02832d88', + 'id': '', 'name': 'MyNewStrain', 'description': '', - 'species': '93dd9502-305a-4e7b-b66b-42cf8c79368f', + 'species': '', 'rrid': None, 'external_identifiers': [], 'instance_id': None, @@ -279,7 +279,7 @@ resp = client.load_model('strainapproval', id='b460dfbc-79bb-499e-87ed-57df02832 {: .no_toc} ``` -resp = client.save_model("strainapproval", id="b460dfbc-79bb-499e-87ed-57df02832d88", options="accept") +resp = client.save("strainapproval", id="", options="accept") ``` @@ -294,5 +294,5 @@ resp = client.save_model("strainapproval", id="b460dfbc-79bb-499e-87ed-57df02832 {: .no_toc} ``` -resp = client.save_model("strainapproval", id="6403fdaf-7896-4ef7-9b30-ee12d69aa408", options="reject") +resp = client.save("strainapproval", id="", options="reject") ``` diff --git a/docs/api/users/group.md b/docs/api/users/group.md index 43ab5ce..08f6394 100644 --- a/docs/api/users/group.md +++ b/docs/api/users/group.md @@ -39,7 +39,7 @@ Each entry in the `users` dictionary has the user `email` as key and the followi {: .no_toc} ``` -resp = client.load_model('group') +resp = client.load('group') ``` ### Response example @@ -84,7 +84,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("group", data={ +resp = client.save("group", data={ "name": "NewGroup", }) ``` @@ -115,7 +115,7 @@ resp = client.save_model("group", data={ {: .no_toc} ``` -resp = client.load_model('group', id='48') +resp = client.load('group', id='48') ``` ### Response example @@ -145,13 +145,13 @@ resp = client.load_model('group', id='48') {: .no_toc} ``` -resp = client.save_model("group", id="48", data={"name": "NewGroupName"}) +resp = client.save("group", id="48", data={"name": "NewGroupName"}) ``` To add new users to the group, or modify the permissions of the existing ones, provide their corresponding dictionaries. Missing permissions will default to *False*. ``` -resp = client.save_model("group", id="48", data={ +resp = client.save("group", id="48", data={ "users": {'user4@mail.com': {'is_manager': False, 'is_owner': False}} } ) @@ -160,7 +160,7 @@ resp = client.save_model("group", id="48", data={ To remove users, provide the key-value pair `"remove": True` in the corresponding dictionary. ``` -resp = client.save_model("group", id="48", data={ +resp = client.save("group", id="48", data={ "users": {'user4@mail.com': {'remove': True}} } ) @@ -195,7 +195,7 @@ resp = client.save_model("group", id="48", data={ {: .no_toc} ``` -resp = client.delete_model("group", id="3654964e-1bf7-40c7-a376-9dcec4c125cd") +resp = client.delete("group", id="") ``` @@ -211,7 +211,7 @@ resp = client.delete_model("group", id="3654964e-1bf7-40c7-a376-9dcec4c125cd") {: .no_toc} ``` -resp = client.load_model("group", id="9", options="join") +resp = client.load("group", id="9", options="join") ``` **Note:** a request to join the group is created. @@ -229,5 +229,5 @@ resp = client.load_model("group", id="9", options="join") {: .no_toc} ``` -resp = client.load_model("group", id="9", options="leave") +resp = client.load("group", id="9", options="leave") ``` diff --git a/docs/api/users/group_membership_invitation.md b/docs/api/users/group_membership_invitation.md index 9ea0813..e817ca3 100644 --- a/docs/api/users/group_membership_invitation.md +++ b/docs/api/users/group_membership_invitation.md @@ -38,7 +38,7 @@ nav_order: 3 {: .no_toc} ``` -resp = client.load_model('groupmembershipinvitation') +resp = client.load('groupmembershipinvitation') ``` ### Response example @@ -47,14 +47,14 @@ resp = client.load_model('groupmembershipinvitation') ``` {'group_membership_invitations': [ { - 'id': 'bdbc1823-7bcf-402d-bcaf-c16ce8da4632', + 'id': '', 'user_account_invitation': 11, 'authgroup': 12, 'new_manager': False, 'new_owner': False }, { - 'id': '4820aea8-151c-422e-9427-d7985a949518', + 'id': '', 'user_account_invitation': 7, 'authgroup': 48, 'new_manager': False, @@ -77,7 +77,7 @@ List responses include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.load_model('groupmembershipinvitation', id='bdbc1823-7bcf-402d-bcaf-c16ce8da4632') +resp = client.load('groupmembershipinvitation', id='') ``` ### Response example @@ -85,7 +85,7 @@ resp = client.load_model('groupmembershipinvitation', id='bdbc1823-7bcf-402d-bca ``` {'group_membership_invitation': { - 'id': 'bdbc1823-7bcf-402d-bcaf-c16ce8da4632', + 'id': '', 'user_account_invitation': 11, 'authgroup': 12, 'new_manager': False, @@ -105,7 +105,7 @@ resp = client.load_model('groupmembershipinvitation', id='bdbc1823-7bcf-402d-bca {: .no_toc} ``` -resp = client.load_model("groupmembershipinvitation", id="caf8093f-def3-43a4-9c46-543e3f7d63b0", options="accept") +resp = client.load("groupmembershipinvitation", id="", options="accept") ``` @@ -121,7 +121,7 @@ resp = client.load_model("groupmembershipinvitation", id="caf8093f-def3-43a4-9c4 {: .no_toc} ``` -resp = client.load_model("groupmembershipinvitation", id="fa2d3f83-f5e8-4c3f-9006-fc2d92d0c0a0", options="reject") +resp = client.load("groupmembershipinvitation", id="", options="reject") ``` @@ -136,5 +136,5 @@ resp = client.load_model("groupmembershipinvitation", id="fa2d3f83-f5e8-4c3f-900 {: .no_toc} ``` -resp = client.load_model("groupmembershipinvitation", id="77c92a03-79ce-4cd6-9379-fd3d4f459012", options="cancel") +resp = client.load("groupmembershipinvitation", id="", options="cancel") ``` diff --git a/docs/api/users/group_membership_request.md b/docs/api/users/group_membership_request.md index eaf4b73..b05758e 100644 --- a/docs/api/users/group_membership_request.md +++ b/docs/api/users/group_membership_request.md @@ -35,7 +35,7 @@ nav_order: 4 {: .no_toc} ``` -resp = client.load_model('groupmembershiprequest') +resp = client.load('groupmembershiprequest') ``` ### Response example @@ -44,12 +44,12 @@ resp = client.load_model('groupmembershiprequest') ``` {'group_membership_requests': [ { - 'id': 'fd335535-cf79-4ae8-86af-ed87e1108889', + 'id': '', 'user_account_request': 3, 'authgroup': 9 }, { - 'id': '5a6378e9-be26-4f0f-8e12-2d11a05cd769', + 'id': '', 'user_account_request': 3, 'authgroup': 1 }, @@ -70,7 +70,7 @@ List responses include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.load_model('groupmembershiprequest', id='fd335535-cf79-4ae8-86af-ed87e1108889') +resp = client.load('groupmembershiprequest', id='') ``` ### Response example @@ -78,7 +78,7 @@ resp = client.load_model('groupmembershiprequest', id='fd335535-cf79-4ae8-86af-e ``` {'group_membership_request': { - 'id': 'fd335535-cf79-4ae8-86af-ed87e1108889', + 'id': '', 'user_account_request': 3, 'authgroup': 9} } @@ -96,7 +96,7 @@ resp = client.load_model('groupmembershiprequest', id='fd335535-cf79-4ae8-86af-e {: .no_toc} ``` -resp = client.load_model("groupmembershiprequest", id="fd335535-cf79-4ae8-86af-ed87e1108889", options="accept") +resp = client.load("groupmembershiprequest", id="", options="accept") ``` @@ -112,7 +112,7 @@ resp = client.load_model("groupmembershiprequest", id="fd335535-cf79-4ae8-86af-e {: .no_toc} ``` -resp = client.load_model("groupmembershiprequest", id="5a6378e9-be26-4f0f-8e12-2d11a05cd769", options="reject") +resp = client.load("groupmembershiprequest", id="", options="reject") ``` @@ -127,5 +127,5 @@ resp = client.load_model("groupmembershiprequest", id="5a6378e9-be26-4f0f-8e12-2 {: .no_toc} ``` -resp = client.load_model("groupmembershiprequest", id="263fa5ff-1dd0-4b20-a028-5679ac1b54cf", options="cancel") +resp = client.load("groupmembershiprequest", id="", options="cancel") ``` diff --git a/docs/api/users/laboratory.md b/docs/api/users/laboratory.md index 2f5e9a7..9d9ee4a 100644 --- a/docs/api/users/laboratory.md +++ b/docs/api/users/laboratory.md @@ -41,7 +41,7 @@ nav_order: 4 {: .no_toc} ``` -resp = client.load_model('laboratory') +resp = client.load('laboratory') ``` ### Response example @@ -50,7 +50,7 @@ resp = client.load_model('laboratory') ``` {'laboratories': [ { - 'id': '3362d1da-29e4-4723-b326-1605f390178a', + 'id': '', 'group': 1, 'principal_investigators': [], 'description': '', @@ -61,7 +61,7 @@ resp = client.load_model('laboratory') 'country': 'United States' }, { - 'id': 'e5dc5bd9-072d-45e4-8b00-2a468a59db8b', + 'id': '', 'group': 8, 'principal_investigators': [3, 7], 'description': '', @@ -89,7 +89,7 @@ Public list responses also include a `meta` object (pagination/filter metadata). {: .no_toc} ``` -resp = client.save_model("laboratory", data={ +resp = client.save("laboratory", data={ 'group': 41, 'principal_investigators': [3], 'institution': 'A university'} @@ -101,7 +101,7 @@ resp = client.save_model("laboratory", data={ ``` {'laboratory': { - 'id': '5d882f8b-5c74-428e-9ed9-41c8780527ff', + 'id': '', 'group': 41, 'principal_investigators': [3], 'description': '', @@ -126,7 +126,7 @@ resp = client.save_model("laboratory", data={ {: .no_toc} ``` -resp = client.load_model('laboratory', id='5d882f8b-5c74-428e-9ed9-41c8780527ff') +resp = client.load('laboratory', id='') ``` ### Response example @@ -134,7 +134,7 @@ resp = client.load_model('laboratory', id='5d882f8b-5c74-428e-9ed9-41c8780527ff' ``` {'laboratory': { - 'id': '5d882f8b-5c74-428e-9ed9-41c8780527ff', + 'id': '', 'group': 41, 'principal_investigators': [3], 'description': '', @@ -159,7 +159,7 @@ resp = client.load_model('laboratory', id='5d882f8b-5c74-428e-9ed9-41c8780527ff' {: .no_toc} ``` -resp = client.save_model("laboratory", id="5d882f8b-5c74-428e-9ed9-41c8780527ff", data={"description": "new text"}) +resp = client.save("laboratory", id="", data={"description": "new text"}) ``` ### Response example @@ -167,7 +167,7 @@ resp = client.save_model("laboratory", id="5d882f8b-5c74-428e-9ed9-41c8780527ff" ``` {'laboratory': { - 'id': '5d882f8b-5c74-428e-9ed9-41c8780527ff', + 'id': '', 'group': 41, 'principal_investigators': [3], 'description': 'new text', @@ -192,5 +192,5 @@ resp = client.save_model("laboratory", id="5d882f8b-5c74-428e-9ed9-41c8780527ff" {: .no_toc} ``` -resp = client.delete_model("laboratory", id="5d882f8b-5c74-428e-9ed9-41c8780527ff") +resp = client.delete("laboratory", id="") ``` diff --git a/docs/api/users/user.md b/docs/api/users/user.md index 784490e..8061612 100644 --- a/docs/api/users/user.md +++ b/docs/api/users/user.md @@ -47,7 +47,7 @@ Each dictionary in the `groups_own_json` list contains the group's `id` and `nam ``` -resp = client.load_model('user') +resp = client.load('user') ``` ### Response example @@ -105,7 +105,7 @@ Users can only be added through the website Register form. ``` -resp = client.load_model('user', id='16') +resp = client.load('user', id='16') ``` ### Response example @@ -142,7 +142,7 @@ resp = client.load_model('user', id='16') ``` -resp = client.save_model("user", id="16", data={"website": "www.someweb.com"}) +resp = client.save("user", id="16", data={"website": "www.someweb.com"}) ``` ### Response example @@ -178,5 +178,5 @@ resp = client.save_model("user", id="16", data={"website": "www.someweb.com"}) {: .no_toc} ``` -resp = client.delete_model("user", id="16") +resp = client.delete("user", id="16") ``` diff --git a/docs/tutorials/behavioral-assays.md b/docs/tutorials/behavioral-assays.md index 25bb453..2f68009 100644 --- a/docs/tutorials/behavioral-assays.md +++ b/docs/tutorials/behavioral-assays.md @@ -30,18 +30,21 @@ A behavioral assay defines: 2. Click *Add behavioral assay* 3. Fill in the required fields: - **Name**: Descriptive name (e.g., "T-maze Alternation Task") - - **Setup Type**: Select the matching setup type (e.g., T-maze) + - **Setup type**: Select the matching setup type (e.g., T-maze) (**required**) + - **Behavioral paradigm**: Select the standardized paradigm this assay implements (**required**) + - **Authenticated Groups**: Assign one or more lab groups (**required**) - **Description**: Briefly describe the protocol, goals, and any special requirements 4. Save the assay. It will now be available when creating sessions in compatible setups. ### Example: Defining a T-maze Alternation Paradigm -```json -{ - "name": "T-maze Alternation Task", - "setup_type": "T-maze", - "description": "A spatial working memory task where the subject must alternate between left and right arms for reward." -} -``` + +| Field | Value | +|-------|-------| +| **Name** | T-maze Alternation Task | +| **Setup type** | T-maze (select from available setup types) | +| **Behavioral paradigm** | Alternation Task (select the matching paradigm) | +| **Authenticated Groups** | Select your lab group | +| **Description** | A spatial working memory task where the subject must alternate between left and right arms for reward. | ## Best Practices - Use clear, standardized names for assays diff --git a/docs/tutorials/electrophysiology-workflow.md b/docs/tutorials/electrophysiology-workflow.md index 976158b..2715ed2 100644 --- a/docs/tutorials/electrophysiology-workflow.md +++ b/docs/tutorials/electrophysiology-workflow.md @@ -437,25 +437,41 @@ Group related sessions for analysis and organization. Access your experimental data programmatically for analysis. ```python -from brainstem_api_client import BrainstemClient +from brainstem_api_tools import BrainstemClient client = BrainstemClient() -# Get all sessions for a subject -subject_sessions = client.load_model('session', - filters={'subject__name': 'TM_R001'}).json() - -# Get behavioral performance data -behavior_data = client.load_model('behavioralassay', - filters={'session__subject__name': 'TM_R001'}).json() - -# Get neural data file paths -neural_files = client.load_model('dataacquisition', - filters={'session__subject__name': 'TM_R001', - 'type': 'Extracellular'}).json() - -# Download specific session data -session_data = client.load_model('session', filters={'name': 'tm_r001_day1_behavior_id'}) +# Step 1: Resolve subject name to its UUID +# (Session has no subject field; subjects are linked via behavior records) +subjects = client.load('subject', filters={'name': 'TM_R001'}).json() +subject_id = subjects['subjects'][0]['id'] + +# Step 2: Find all behavior records for this subject and collect session IDs +behaviors = client.load('behavior', + filters={'subjects': subject_id}, + load_all=True).json() +session_ids = list({b['session'] for b in behaviors.get('behaviors', [])}) + +# Step 3: Load the sessions +subject_sessions = [] +for sid in session_ids: + resp = client.load('session', filters={'id': sid}).json() + subject_sessions.extend(resp.get('sessions', [])) + +# Step 4: Behavior records are already in `behaviors` from Step 2 +behavior_data = behaviors + +# Step 5: Get neural data acquisition records per session +neural_files = [] +for sid in session_ids: + resp = client.load('dataacquisition', + filters={'session': sid, + 'type': 'ExtracellularEphys'}).json() + neural_files.extend(resp.get('data_acquisitions', [])) + +# Load a specific session by name +session_data = client.load('session', + filters={'name': 'TM_R001_Day1_ThetaMaze_Training1'}).json() ``` ## Next Steps diff --git a/docs/tutorials/managing-data-storage.md b/docs/tutorials/managing-data-storage.md index 3e2a351..8062929 100644 --- a/docs/tutorials/managing-data-storage.md +++ b/docs/tutorials/managing-data-storage.md @@ -165,59 +165,88 @@ When you associate a data storage with a session, BrainSTEM can automatically co Use the Python or MATLAB API to programmatically access your data paths: ```python -from brainstem_api_client import BrainstemClient +from brainstem_api_tools import BrainstemClient client = BrainstemClient() -# Load session with data storage information -session_response = client.load_model('session', - id='your-session-id', - include=['datastorage']) +# Load session with expanded data storage records +# Use filters={'id': ...} to fetch a single session by UUID +session_response = client.load('session', + filters={'id': 'your-session-id'}, + include=['datastorage']) session_data = session_response.json()['sessions'][0] -storage_info = session_data['datastorage'] -# Access configured protocols and paths -for protocol in storage_info['data_protocols']: - print(f"Protocol: {protocol['protocol']}") - print(f"Base path: {protocol['path']}") - print(f"Public access: {protocol['is_public']}") +# datastorage is a list of expanded objects when include=['datastorage'] is used +for storage in session_data['datastorage']: + for protocol in storage['data_protocols']: + print(f"Protocol: {protocol['protocol']}") + print(f"Base path: {protocol['path']}") + print(f"Public access: {protocol['is_public']}") ``` ### Constructing Full Paths in Your Analysis Code {: .no_toc} ```python -def construct_data_path(session_data): +def construct_data_path(session_data, subject_name=None): """ - Construct full path to session data based on BrainSTEM metadata + Construct full path to session data based on BrainSTEM metadata. + + Requires the session to have been loaded with: + include=['datastorage', 'projects'] + so that datastorage and projects are expanded to full objects. + + Sessions have no direct subject field — subjects are linked via behavior + records. Pass subject_name explicitly when your organization includes + Subjects (e.g. retrieved via client.load('behavior', ...)). """ - storage = session_data['datastorage'] + if not session_data.get('datastorage'): + return None + + # datastorage is a list; use the first linked storage + storage = session_data['datastorage'][0] # Use the first configured protocol by default. # Update this selection if your storage relies on a specific protocol. base_path = storage['data_protocols'][0]['path'] - + # Extract organization elements organization = storage['data_organization'] - + # Build path based on organization structure path_components = [base_path] - + for element in organization: if element['elements'] == 'Projects': + # projects is expanded to full objects when include=['projects'] is used path_components.append(session_data['projects'][0]['name']) elif element['elements'] == 'Subjects': - path_components.append(session_data['subject']['name']) + # Session has no direct subject field; provide subject_name separately. + if subject_name: + path_components.append(subject_name) elif element['elements'] == 'Sessions': - storage_name = session_data.get('name_used_in_storage', - session_data['name']) + storage_name = session_data.get('name_used_in_storage') or session_data['name'] path_components.append(storage_name) - + return '/'.join(path_components) -# Usage -full_path = construct_data_path(session_data) + +# Load session with datastorage and projects expanded +session_response = client.load('session', + filters={'id': 'your-session-id'}, + include=['datastorage', 'projects']) +session_data = session_response.json()['sessions'][0] + +# If your organization includes Subjects, retrieve subject name via behaviors +behaviors = client.load('behavior', filters={'session': session_data['id']}).json() +subject_name = None +if behaviors.get('behaviors'): + subject_id = behaviors['behaviors'][0]['subjects'][0] + subject_resp = client.load('subject', filters={'id': subject_id}).json() + subject_name = subject_resp['subjects'][0]['name'] + +full_path = construct_data_path(session_data, subject_name=subject_name) print(f"Data location: {full_path}") ``` @@ -282,30 +311,39 @@ print(f"Data location: {full_path}") ```python import os -from brainstem_api_client import BrainstemClient +from brainstem_api_tools import BrainstemClient def load_session_data(session_id): """ - Load session metadata and construct data paths + Load session metadata and construct data paths. + Uses include=['datastorage', 'projects'] so path construction works. """ client = BrainstemClient() - - # Get session with data storage info - response = client.load_model('session', - id=session_id, - include=['datastorage', 'dataacquisition']) - + + # Use filters={'id': ...} to fetch a single session by UUID + response = client.load('session', + filters={'id': session_id}, + include=['datastorage', 'projects', 'dataacquisition']) + session = response.json()['sessions'][0] - + + # Retrieve subject name via behavior records if organization includes Subjects + behaviors = client.load('behavior', filters={'session': session_id}).json() + subject_name = None + if behaviors.get('behaviors'): + subject_id = behaviors['behaviors'][0]['subjects'][0] + subject_resp = client.load('subject', filters={'id': subject_id}).json() + subject_name = subject_resp['subjects'][0]['name'] + # Construct data path - data_path = construct_data_path(session) - + data_path = construct_data_path(session, subject_name=subject_name) + # Load actual data files data_files = [] - if os.path.exists(data_path): - data_files = [f for f in os.listdir(data_path) - if f.endswith(('.dat', '.bin', '.h5'))] - + if data_path and os.path.exists(data_path): + data_files = [f for f in os.listdir(data_path) + if f.endswith(('.dat', '.bin', '.h5'))] + return { 'session_metadata': session, 'data_path': data_path, @@ -318,26 +356,45 @@ def load_session_data(session_id): ```matlab function data_info = load_session_data(session_id) - % Load session metadata and construct data paths - - % Get session with data storage info - session_data = load_model('model', 'session', ... - 'id', session_id, ... - 'include', {'datastorage', 'dataacquisition'}); - - % Extract data storage information - storage = session_data.datastorage; + % Load session metadata and construct data paths. + % Using include={'datastorage','projects'} expands those fields to full objects. + client = BrainstemClient(); + + % Fetch the session by UUID and expand datastorage and projects + session_response = client.load('session', ... + 'id', session_id, ... + 'include', {'datastorage', 'projects', 'dataacquisition'}); + session_data = session_response.sessions{1}; + + % Extract data storage information (first linked storage) + storage = session_data.datastorage{1}; % Use the first configured protocol; adjust if a specific protocol is required. base_path = storage.data_protocols{1}.path; - - % Construct full path (simplified example) + + % Project name is available when include={'projects'} is used project_name = session_data.projects{1}.name; - subject_name = session_data.subject.name; + + % Session has no direct subject field; subjects are linked via behavior records. + % Retrieve subject separately if your organization structure includes Subjects. + behaviors = client.load('behavior', 'filter', {'session', session_id}); + if ~isempty(behaviors.behaviors) + subject_id = behaviors.behaviors{1}.subjects{1}; + subject_resp = client.load('subject', 'id', subject_id); + subject_name = subject_resp.subjects{1}.name; + else + subject_name = ''; + end + storage_name = session_data.name_used_in_storage; - - full_path = fullfile(base_path, project_name, subject_name, storage_name); - + + % Build path — omit subject component if subject_name is empty + if ~isempty(subject_name) + full_path = fullfile(base_path, project_name, subject_name, storage_name); + else + full_path = fullfile(base_path, project_name, storage_name); + end + data_info.session_metadata = session_data; data_info.data_path = full_path; data_info.exists = exist(full_path, 'dir') == 7; @@ -357,7 +414,7 @@ Configure your organization structure to match your lab's file hierarchy: "Projects", "Subjects", "Sessions" - ], + ] } ``` diff --git a/docs/tutorials/two-photon-imaging-workflow.md b/docs/tutorials/two-photon-imaging-workflow.md index be057e5..aada4b0 100644 --- a/docs/tutorials/two-photon-imaging-workflow.md +++ b/docs/tutorials/two-photon-imaging-workflow.md @@ -86,7 +86,7 @@ Now we'll add individual mice that will participate in our imaging study. After creating subjects, document their housing conditions and initial weights using subject logs. 1. **Create Housing Log**: - - Go to *Modules* → *Subject logs* + - Go to *Subject logs* (below Subjects) - Click *Add subject log* **Housing Log Configuration:** @@ -128,7 +128,7 @@ After creating subjects, document their housing conditions and initial weights u After creating individual subjects, group them into a cohort for experimental organization. 1. **Navigate to Cohorts**: - - Go to *Personal Attributes* → *Cohorts* + - Go to *Cohorts* (below Subjects) - Click *Add cohort* **[SCREENSHOT NEEDED: Cohort creation interface]** @@ -251,7 +251,7 @@ Document the cranial window implantation procedure. Start with habituation to head-fixation and imaging setup. 1. **Navigate to Sessions**: - - Go to *Modules* → *Sessions* + - Go to *Sessions* - Click *Add session* **[SCREENSHOT NEEDED: Session creation form for imaging]** @@ -575,23 +575,36 @@ Group related imaging sessions for comprehensive analysis. Access your imaging data programmatically for analysis. ```python -from brainstem_api_client import BrainstemClient +from brainstem_api_tools import BrainstemClient import numpy as np import matplotlib.pyplot as plt client = BrainstemClient() -# Get all imaging sessions for a subject -imaging_sessions = client.load_model('session', - filters={'projects__name': 'Visual Cortex Population Dynamics Study'}).json() - -# Get two-photon data acquisition details -imaging_data = client.load_model('dataacquisition', - filters={'session__projects__name': 'Visual Cortex Population Dynamics Study', - 'type': 'Two-Photon Microscopy'}).json() - -# Download specific imaging session data -session_data = client.download_session_data('vc_m001_day1_gratings_id') +# Step 1: Resolve project name to its UUID +projects = client.load('project', + filters={'name': 'Visual Cortex Population Dynamics Study'}).json() +project_id = projects['projects'][0]['id'] + +# Step 2: Load all sessions in this project +all_sessions_resp = client.load('session', + filters={'projects': project_id}, + load_all=True).json() +imaging_sessions = all_sessions_resp.get('sessions', []) +session_ids = [s['id'] for s in imaging_sessions] + +# Step 3: Get two-photon data acquisition records per session +# Correct type string is 'TwoPhotonMicroscopy' (see Data acquisition schemas) +imaging_data = [] +for sid in session_ids: + resp = client.load('dataacquisition', + filters={'session': sid, + 'type': 'TwoPhotonMicroscopy'}).json() + imaging_data.extend(resp.get('data_acquisitions', [])) + +# Load a specific imaging session by name +session_data = client.load('session', + filters={'name': 'VC_M001_Day1_DriftingGratings'}).json() ``` ## Next Steps