Research: Signals Python SDK and Autolab Action Blocks
| Field | Value |
|---|---|
| Type | Research |
| Status | Active |
| Author | xRED Dev Team |
| Created | 2026-04-08 |
| Maintained by | LabEx (SDK), LabEx / AutoLab (AAB) |
| Repos | signals-python-sdk (v0.3.0), aab_signals (v0.1.0) |
| Tracking | AAB-1919 (template analysis) |
| Related SAD | SAD-001 |
| Related ADR | ADR-005, ADR-009 |
1. Ownership and Responsibility
Both the SDK and the AAB are maintained by the LabEx team. xRED Dev uses them as consumers.
| Component | Repo | Maintained by | Used by |
|---|---|---|---|
| Signals Python SDK | labex/sdk/signals-python-sdk | LabEx | AAB Signals, potentially other consumers |
| AAB Signals | autolab/toolkit/autolab_action_blocks/aab_signals | LabEx / AutoLab | AutoLab workflows (Camunda) |
2. Signals Python SDK
What it is
An auto-generated Python API client for the MuleSoft “Experiments API”
(dia-rnd-experiments-exp, v2.6.3). It wraps the DataRiver Facade — not the Signals
API directly. This is the officially supported path per LEM governance
(ADR-005).
AutoLab / xRED App → signals-python-sdk → MuleSoft (DataRiver) → Signals ELNCode generation pipeline
The SDK is fully auto-generated:
- Source: Swagger 2.0 spec from MuleSoft (
api.json) - Convert: Swagger 2.0 → OpenAPI 3.0 via
api-spec-converter - Patch: OpenAPI Overlay applied via
oas-patchto fix MuleSoft spec issues (zero-width characters, wrong data types, misnamed schemas) - Generate:
openapi-generator-cli v7.15.0withpython-pydantic-v1generator - Publish: to Roche Artifactory
Installation
# From Roche Artifactory (RCN required)
pip install signals-python-sdk --index-url https://repository-ng.intranet.roche.com/artifactory/api/pypi/pypi-local/simple
# Or from Git
pip install git+https://code.roche.com/labex/sdk/signals-python-sdk.gitDependencies: Python 3.8+, urllib3, python-dateutil, pydantic >=1.10.5,<2
(Pydantic v1 only), aenum.
Authentication
MuleSoft client credentials (Basic Auth) + mTLS client certificate:
import signals_python_sdk
configuration = signals_python_sdk.Configuration(
host="https://dev-de-c1.apis.roche.com:443/dia-rnd-experiments-exp-dev/v2",
username=os.environ["MULESOFT_CLIENT_ID"],
password=os.environ["MULESOFT_CLIENT_SECRET"],
)
configuration.cert_file = "/path/to/cert.pem"2FA with client certificate is required per the API’s non-functional requirements.
AutoLab ↔ Signals environment mapping
See retina.roche.com/cb/issue/6763835 for the canonical reference.
| AutoLab Env | MuleSoft Experiments API URL | Signals Tenant | Notes |
|---|---|---|---|
| DEV | https://dev-de-c1.apis.roche.com:443/dia-rnd-experiments-exp-dev/v2/ | Integration Lab (Dev1) | |
| QA | https://stage-de-c1.apis.roche.com:443/dia-rnd-experiments-exp-stage/v2/ | Template Lab | Replaced previous TEST connection |
| STG | https://stage-de-c1.apis.roche.com:443/dia-rnd-experiments-exp-lab-stage/v2/ | Train | |
| PROD | https://prod-de-c1.apis.roche.com:443/dia-rnd-experiments-exp/v2/ | Production |
Decommissioned: The QA → TEST connection (test-de-c1.apis.roche.com/.../dia-rnd-experiments-exp-test/v2/)
has been removed. QA now connects to Template Lab via the STAGE MuleSoft endpoint.
Available operations (27 methods)
All methods live on a single DefaultApi class:
Experiments:
| Method | HTTP | Description |
|---|---|---|
get_experiment_identifier_values_by_name | GET /experiments | Get experiment by name |
get_data_for_given_experiment_ | GET /experiments/{eid} | Get experiment by EID |
get_detailed_data_for_given_experiment_ | GET /experiments/{eid}/details | Detailed data with tables |
get_detailed_data_for_given_worksheet_id_ | GET /experiments/worksheets/{worksheetId} | Get by worksheet ID |
search_experiments_by_given_criteria | POST /experiments/basicSearch | Basic search |
search_experiments_by_given_criteria_ | POST /experiments/search | Advanced search |
create_experiment | POST /experiments | Create from template |
close_experiment_without_signing | POST /experiments/{eid}/close | Close without signing |
Files/Attachments:
| Method | HTTP | Description |
|---|---|---|
list_an_experiments_attachments | GET /files | List attachments |
attach_a_file_to_an_experiment | POST /files | Upload file (base64) |
download_an_attachment_from_an_experiment | GET /files/{eid} | Download attachment |
Tables:
| Method | HTTP | Description |
|---|---|---|
templates_search | GET /templates | Search table templates |
get_template_definition | GET /tables/templates/{eid} | Table template with columns |
create_table | POST /tables | Create table from template |
get_content_of_the_table | GET /tables/{eid}/rows | Read table rows |
get_content_of_multiply_tables | GET /tables/batch/rows | Batch read tables |
add_a_row_to_the_table | POST /tables/{eid}/rows | Add row |
update_an_external_file_link_in_an_experiments_file_table1 | PATCH /tables/{eid}/rows/{rowId} | Update row |
delete_row | DELETE /tables/{eid}/rows/{rowId} | Delete row |
Metadata (External File Links):
| Method | HTTP | Description |
|---|---|---|
get_for_an_experiment_content_of_tables | GET /metadata | Get file link metadata |
add_an_external_file_link_to_an_experiments_file_table | POST /metadata | Add file link |
update_an_external_file_link_in_an_experiments_file_table0 | PATCH /metadata/{rowId} | Update file link |
delete_an_external_file_link_from_an_experiments_file_table | DELETE /metadata/{rowId} | Delete file link |
Other:
| Method | HTTP | Description |
|---|---|---|
get_template_details | GET /experiments/templates/templateId | Experiment template details |
returns_200_only_if_its_key_dependencies_are_available | GET / | Health check |
Non-functional requirements
| Metric | Value |
|---|---|
| Rate limit | < 300 calls per hour (MuleSoft layer limit) |
| Availability | 98% |
| Disaster Recovery RTO | < 4 hours |
| Disaster Recovery RPO | < 4 hours |
| Security | 2FA with client enforcement + certificate |
Known issues and limitations
- Pydantic v1 only — the generator uses
python-pydantic-v1template; Pydantic v2 is not supported yet - Awkward method names — auto-generated names like
get_detailed_data_for_given_experiment_are hard to work with - MuleSoft spec quality — the overlay patch fixes zero-width Unicode characters,
wrong data types (
file→string/byte), and misnamed schemas generated by MuleSoft - No examples or integration tests — only auto-generated test stubs
- 300 calls/hour rate limit — this is the MuleSoft layer’s own limit, separate from the 1,000/min Signals tenant quota
3. Experiment Templates
Analysis performed via GET /experiments/templates/templateId against the DEV instance
(AAB-1919 ).
Supported by current SDK (9 of 12)
| Template | Required Fields | Notes |
|---|---|---|
| pRED In-Vitro | Description, Group, Limited Access, Limited Access Reason, Portfolio Projects | Standard pRED in-vitro |
| pRED In-Vivo | Same as In-Vitro | Standard pRED in-vivo |
| pRED Ex-Vivo | Same | Standard pRED ex-vivo |
| pRED Manual In-Vivo | Same | Manual in-vivo |
| pRED 360 Labs | Same | 360 Labs experiments |
| pRED PS BioX BioAM | Same | BioX BioAM |
| Legal Metadata Experiment Template pRED | Name only (auto-generated) | Minimal metadata |
| Legal Metadata Experiment Template gRED | Name only | Minimal metadata |
| Legal Metadata Experiment Template PTD | Name only | Minimal metadata |
Not supported by current SDK (3 of 12)
| Template | Missing Fields | Why |
|---|---|---|
| DEFAULT_EXPERIMENT | Special template selection field | Not in SDK’s create payload |
| PTDC Process Chemistry | Department, Theme Number | Custom fields not in SDK |
| ProcessChem gRED Experiment Template | Business Area, Department, Firewalled | Custom fields not in SDK |
These require fields that the MuleSoft create_experiment endpoint does not expose.
Supporting them would require extending the MuleSoft Experiments API spec and regenerating
the SDK — this is a DataRiver gap to raise with the LEM team.
Template replication to xRED DIA tenant
These templates exist on the pRED/gRED Signals tenants. The xRED DIA tenant needs exact replicas of the same templates so that the SDK and AAB work without modification.
Action required: Request LEM to replicate all 9 supported templates into the DIA tenant, preserving exact field definitions (name, type, required/optional, allowed values).
Process:
- Export full template definitions from pRED DEV using
GET /experiments/templates/templateId(Excel sheet uploaded to AAB-1919) - Provide definitions to LEM team
- LEM creates templates in DIA tenant via Signals Admin
- Verify template IDs accessible via
templates_searchon DIA tenant - Confirm
create_experimentworks for each template
Note: Template IDs are environment-specific UUIDs — the DIA tenant will have different IDs. The SDK and AAB resolve templates by name, not hardcoded ID.
4. AAB Signals (Autolab Action Block)
What is AAB?
The AutoLab Action Blocks framework is a modular system for building workflow
components on the Roche AutoLab platform. Each AAB is a Python package implementing
service tasks composed into BPMN workflows orchestrated by Camunda. The
autolab_action_blocks group contains 35+ AABs covering Signals, EWB, Chromeleon,
Genedata, Arvados, IRCI, TaPIR, and more.
Current operations
| Action Block | Type | Description |
|---|---|---|
signals_create_experiment | Service task | Create experiment from template (currently limited to pRED In-Vitro / In-Vivo) |
signals_attach_files_to_experiment | Service task | Attach files from MinIO (max 10, base64 encoded) |
signals_get_experiment_details | Service task | Get experiment details by EID |
signals_close_experiment | Service task | Close experiment without signing |
ca_attach_files_to_experiment | Call activity | Composite: attach + optional create + optional close |
Not yet implemented (SDK supports but AAB does not use): table operations, row management, search, external file links, attachment downloads, worksheet access.
Architecture
Authentication (two layers)
| Layer | Credential | Source | Notes |
|---|---|---|---|
| MuleSoft client | Client ID + Secret + Certificate | Token Manager → AutoLab Vault | Cert updates require AutoLab platform team |
| User context | Signals OAuth token | Token Manager (user authenticates via AutoLab plugin) | User must visit BASE_URL_AUTOLAB/plugins/signals |
Operational note: The MuleSoft client certificates are stored in the AutoLab Vault, not in a Vault we control. When certs need rotation, we must ask the AutoLab platform team to update them. This is a dependency to track.
AutoLab ↔ Signals environment mapping
AutoLab instances map to specific Signals environments. The full mapping is maintained in the AutoLab configuration (AutoLab ↔ Signals Env Mappings and Configs).
Write-back patterns
- MuleSoft-mediated only — all API calls go through MuleSoft with mTLS + client credentials. No direct Signals API access.
- Base64 file upload — files read from MinIO, base64-encoded in memory, uploaded in a single POST. Max 10 files per call (payload size concern).
- User token pass-through — user’s Signals token obtained from Token Manager and passed on every call. Operations happen in the user’s context.
- Template-based creation — experiments created from predefined templates, not
freeform. Currently hardcoded to
"pRED In-Vitro"and"pRED In-Vivo"only. - Close without signing — digital signature workflows are not handled.
- No structured data writing — AAB only does file attachments, not table row writes.
Known issues
- Only 2 templates hardcoded —
signals_create_experimentonly accepts"pRED In-Vitro"and"pRED In-Vivo"viaTemplateNameLiteral. The 7 other supported templates need to be added. - Cert rotation dependency — MuleSoft client certificates are in AutoLab Vault; we cannot self-service rotate them.
- Python 3.9 lock — AAB is locked to
>=3.9.0,<3.10, while the SDK supports 3.8+. - SDK version lag — AAB pins
signals-python-sdk==0.2.0while SDK is at v0.3.0. - No table write operations — the SDK supports table CRUD but AAB doesn’t use it yet.
5. Operational Dependencies
| Dependency | Controlled by | What we need from them |
|---|---|---|
| MuleSoft Experiments API spec | DataRiver / LEM | Spec updates when new endpoints are needed |
| MuleSoft client certificates | AutoLab platform team (via AutoLab Vault) | Cert rotation |
| Signals experiment templates | LEM (Signals Admin) | Template replication to DIA tenant |
| Roche Artifactory | Roche IT | SDK publishing (pypi-local) |
| AutoLab ↔ Signals env mapping | AutoLab platform team | Environment configuration |
6. Next Steps
| Action | Owner | Status |
|---|---|---|
| Replicate 9 templates to DIA tenant | LEM team (request from xRED) | Not started |
Add remaining 7 templates to AAB TemplateNameLiteral | LabEx | Not started |
| Update AAB to use SDK v0.3.0 | LabEx | Not started |
| Support 3 unsupported templates (DataRiver API gap) | DataRiver team | Requires enhancement request |
| Implement table write operations in AAB | LabEx | Not started |
| Evaluate Pydantic v2 migration for SDK | LabEx | Not started |