Migrating from API versions prior to 2024-10-01
The Nabla Core API version 2024-10-01 introduces many new features and structural changes.
This step-by-step guide will help you migrate your existing integration to the latest version, enabling you to fully utilize the Nabla Core API.
Determine your current versionโ
To determine which API version you are currently targeting, please refer to Targeting a specific version. You might be either explicitly specifying an API version for all your calls or relying on the pinned version set in the API Admin Console.
During the migration, we recommend to use the explicit version header for new migrated API calls to target the newer version. Once all your clients are migrated you can go upgrade the pinned version in the API Admin Console.
Upgrade to the latest version before 2024-10-01โ
This guide details migration from the latest version prior to 2024-10-01, i.e. version 2024-04-22.
Use an OAuth Client instead of Server Keysโ
Starting with version 2024-10-01, the long-lived Server Keys will no longer be accepted for Server API authentication.
The new flow for authenticating your server calls is now based on OAuth Private Key JWT standard for higher security.
Please check the dedicated OAuth Client authentication page for details on how to start using this new authentication flow.
Change your base URLโ
Product name changeโ
Apply the following renaming to the base URL:
/v1/copilot-api/serverbecome/v1/core/server/v1/copilot-api/userbecome/v1/core/user
Specify your regionโ
Specify the region on which your Nabla Core API organization is hosted, us for the United States and eu for European Union.
https://us.api.nabla.com/v1/core+ (/serveror/user) +/path/to/endpointhttps://eu.api.nabla.com/v1/core+ (/serveror/user) +/path/to/endpoint
New localesโ
Instead of a single enum, we now have two separate enums for languages, henceforth called locales:
- Speech locale: Supports 35 values for various languages with regional dialects and variations. Used for transcription (speech-to-text) and generated patient instructions.
- Note locale: Supports 3 values, i.e.
ENGLISH_US,ENGLISH_UKandFRENCH_FR, used for generated notes.
Asynchronous requests response flowโ
Asynchronous requests, such as /digest_async and /listen_async used to take a callback_url to which the response was sent in an HTTP POST call.
This behavior is deprecated and replaced by a polling mechanism, along with an alternative webhook mechanism.
Please refer to the Asynchronous note generation guide for more details.
Each old endpoint's migrationโ
Create or update a user: /usersโ
Remove email and roles fields from both input and output, those fields were already deprecated.
Create, read, update or delete dot phrases: /dot_phrasesโ
Endpoints case changed from snake to kebab: /dot_phrases becomes /dot-phrases.
Listen websocket /listen-wsโ
- Endpoint renamed to
/transcribe-ws. - Protocol renamed to
transcribe-protocol. - Removed
output_objectsinput field (if you need to filter out frames, this should be done client-side). - Polymorphism discriminator field key in all frames (both input and output frames) renamed from
objecttotype. - Enums values now follow
SCREAMING_SNAKE_CASE, e.g.pcm_s16lebecomesPCM_S16LEandpatientbecomesPATIENT. - Changes specific to the Configuration frame:
- Discriminator value renamed from
listen_configtoCONFIG. - Field
languagereplaced byspeech_locale(see New locales above). - Example:
Before After { "object": "listen_config", "output_objects": ["transcript_item"], "encoding": "pcm_s16le", "sample_rate": 16000, "language": "en-US", "streams": [ { "id": "doctor_stream", "speaker_type": "doctor" } ] }{ "type": "CONFIG", "encoding": "PCM_S16LE", "sample_rate": 16000, "speech_locale": "ENGLISH_US", "streams": [ { "id": "doctor_stream", "speaker_type": "DOCTOR" } ] }
- Discriminator value renamed from
- Changes specific to the Transcript item frame:
- Field
speakerrenamed tospeaker_type.
- Field
- No particular changes other than those mentioned above for the frames: Audio chunk, End, Audio chunk ack, and* error message*.
Listen from audio fileโ
- Previously known as
/listen, it's now called/transcribe. - Previously known as
/listen_async, it's now called/transcribe-async.
Changes common to both sync & async Listen endpointsโ
- Removed
output_objectsfield. - Field
languagereplaced byspeech_locale(see New locales above). - In output (response) schema: Field
speaker(insidetranscript[]) renamed tospeaker_type. - Removed note generation capability. The Transcribe endpoint is only meant for transcription. You should combine with dedicated note generation endpoints if needed.
- Note generation related fields removed:
section_style,split_by_problemandnote_template.
Changes specific to the asynchronous transcriptionโ
- Field
callback_urlremoved. - Check the Asynchronous requests response flow for how to migrate your usage of
callback_url.
Note generation endpointsโ
- Previously known as
/digest, it's now called/generate-note. - Previously known as
/digest_async, it's now called/generate-note-async.
Changes common to both sync & async note generation endpointsโ
- Removed
output_objectsfield. - Field
languagereplaced bynote_locale(see New locales above). - In
transcript_itemsschema: Fieldspeakerrenamed tospeaker_type. - Field
noterenamed toprevious_note.- You can also specify an optional
titlefield (note title), as it might have been generated by Nabla.
- You can also specify an optional
- Fields
section_styleandsplit_by_problemremoved, to be replaced by per-section customization capabilities that offer more and finer customization options.- Please notice that the value
PARAGRAPHSfromsection_styleenum maps to the singularPARAGRAPH(without an S).
- Please notice that the value
- Field
note_templateenum values changed, here's a mapping:GENERAL_MEDICINEbecomesGENERIC_MULTIPLE_SECTIONS.GENERAL_MEDICINE_AP_MERGEDbecomesGENERIC_MULTIPLE_SECTIONS_AP_MERGED.SOAPbecomesGENERIC_SOAP.GENERAL_MEDICINE_WCCbecomesWCC_MULTIPLE_SECTIONS.SOAP_WCCbecomesWCC_SOAP.GENERAL_MEDICINE_EMERGENCYbecomesEMERGENCY_MULTIPLE_SECTIONS.SOAP_EMERGENCYbecomesEMERGENCY_SOAP.CARDIOLOGYbecomesCARDIOLOGY_MULTIPLE_SECTIONS.PSYCHIATRYbecomesPSYCHIATRY_MULTIPLE_SECTIONS.DIETbecomesDIET_MULTIPLE_SECTIONS.PSYCHOLOGYbecomesPSYCHOLOGY_MULTIPLE_SECTIONS.
- Generated note sections keys (e.g.
note.sections[].key) enum values changed, here's a mapping:SOAP_SUBJECTIVE(Subjective) becomesSUBJECTIVE.SOAP_OBJECTIVE(Objective) becomesOBJECTIVE.SOAP_ASSESSMENT(Assessment) becomesASSESSMENT.SOAP_PLAN(Plan) becomesPLAN.SOAP_ASSESSMENT_AND_PLAN(Assessment & Plan) becomesASSESSMENT_AND_PLAN.SOAP_DIAGNOSTIC_TESTS_ORDERED(Diagnostic tests ordered) becomesDIAGNOSTIC_TESTS_ORDERED.DIET_LIFESTYLE(Lifestyle) becomesLIFESTYLE.DIET_MEDICAL_HISTORY(Medical history) becomesPAST_MEDICAL_HISTORY.DIET_CHIEF_COMPLAINT(Reason for visit and goals) becomesCHIEF_COMPLAINT.DIET_VITALS(Vitals) becomesVITALS.DIET_HABITS(Food habits) becomesFOOD_HABITS.DIET_OBJECTIVES(Objectives and advice) becomesOBJECTIVES_AND_ADVICE.DIET_APPOINTMENTS(Appointment) becomesAPPOINTMENTS.PSYCHOLOGY_HISTORY_OF_COMPLAINT(History of the present complaint) becomesHISTORY_OF_PRESENT_COMPLAINT.CARDIOVASCULAR_RISKS(Cardiovascular risk factors) becomesCARDIOVASCULAR_RISK_FACTORS.
- Check the new templates and their sections in Note templates and sections.
| Before | After |
|---|---|
| |
Changes specific to the asynchronous note generationโ
- Field
callback_urlremoved. - Check the Asynchronous requests response flow for how to migrate your usage of
callback_url.
Generate normalized data endpointโ
- Replace the path
/generate_normalized_datawith/generate-normalized-data(case change). - New required input field:
note_template. - Changes to
note_localefield as per New locales. - Changes to the input
noteas per the changes to the generated note, see Note generation endpoints. - Enums values for FHIR condition clinical status and FHIR condition category now follow
SCREAMING_SNAKE_CASE, e.g. valueresolvedbecomesRESOLVEDandencounter_diagnosisbecomesENCOUNTER_DIAGNOSIS.
Generate patient instructions endpointโ
- Replace the path
/generate_patient_instructionswith/generate-patient-instructions(case change). - New required input field:
note_template. - Changes to
note_localefield as per note locale in New locales. - Changes to
instructions_localefield as per speech locale in New locales. - Changes to the input
noteas per the changes to the generated note, see Note generation endpoints.