Skip to main content

SDK for the Orchestrate API at api.careevolutionapi.com

Project description

Orchestrate SDK

The Orchestrate SDK provides TypeScript, Python, and C# clients for interacting with the Orchestrate API at https://api.careevolutionapi.com.

Full documentation of the API is available at https://rosetta-api.docs.careevolution.com/.

Installation

TypeScript:

npm install @careevolution/orchestrate

Python:

pip install orchestrate-api

C#:

dotnet add package CareEvolution.Orchestrate

Usage

TypeScript

import { OrchestrateApi } from '@careevolution/orchestrate';

const orchestrate = new OrchestrateApi({apiKey: "your-api-key"});
await orchestrate.terminology.classifyCondition({
  code: "119981000146107",
  system: "SNOMED",
});

Python

from orchestrate import OrchestrateApi

api = OrchestrateApi(api_key="your-api-key")
api.terminology.classify_condition(code="119981000146107", system="SNOMED")

C#

using CareEvolution.Orchestrate;

var api = new OrchestrateApi(new OrchestrateClientOptions
{
    ApiKey = "your-api-key",
});

await api.Terminology.ClassifyConditionAsync(new ClassifyConditionRequest
{
    Code = "119981000146107",
    System = "SNOMED",
});

Additionally, C# also supports dependency injection with IOrchestrateApi and OrchestrateApi registered in the service collection.

using CareEvolution.Orchestrate;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
services.AddOrchestrateApi();

Configuration

The SDK supports environment variables for configuring HTTP behavior. These can be used for local development, CI, or shared runtime configuration.

For the primary OrchestrateApi clients in TypeScript, Python, and C#:

Environment variable Purpose Default
ORCHESTRATE_API_KEY Sets the API key sent as the x-api-key header. Not set
ORCHESTRATE_BASE_URL Overrides the base URL for Orchestrate API requests. https://api.careevolutionapi.com
ORCHESTRATE_TIMEOUT_MS Sets the request timeout in milliseconds. 120000
ORCHESTRATE_ADDITIONAL_HEADERS Adds extra headers for every request. The value must be a JSON object of string header names to string values. Not set

Environment variables used by the identity clients:

Environment variable Purpose
ORCHESTRATE_IDENTITY_URL Base URL for IdentityApi. Required unless the URL is passed directly when creating the client.
ORCHESTRATE_IDENTITY_API_KEY API key sent as the x-api-key header for IdentityApi.
ORCHESTRATE_IDENTITY_METRICS_KEY Metrics key sent as the Authorization header for IdentityApi. A value with or without the Basic prefix is accepted.
ORCHESTRATE_IDENTITY_LOCAL_HASHING_URL Base URL for LocalHashingApi. Required unless the URL is passed directly when creating the client.

Configuration Precedence

When the same setting is provided in more than one place, the SDK resolves it in this order:

  1. Explicit constructor parameters
  2. The matching environment variable
  3. The SDK default, when one exists

For example, passing api_key or timeout_ms in Python, apiKey or timeoutMs in TypeScript, or ApiKey or TimeoutMs in C# overrides the corresponding environment variable.

ORCHESTRATE_ADDITIONAL_HEADERS is additive. It is merged into the request headers before the SDK applies its standard Accept, Content-Type, authentication, and metrics headers, so the SDK-managed headers take precedence if the same header name is supplied in multiple places.

Examples

TypeScript Example

export ORCHESTRATE_API_KEY="your-api-key"
export ORCHESTRATE_TIMEOUT_MS="30000"
export ORCHESTRATE_ADDITIONAL_HEADERS='{"x-correlation-id":"demo-run"}'
import { OrchestrateApi } from '@careevolution/orchestrate';

const orchestrate = new OrchestrateApi();

Python Example

export ORCHESTRATE_API_KEY="your-api-key"
export ORCHESTRATE_TIMEOUT_MS="30000"
export ORCHESTRATE_ADDITIONAL_HEADERS='{"x-correlation-id":"demo-run"}'
from orchestrate import OrchestrateApi

api = OrchestrateApi()

C# Example

With environment values as above or DI configuration:

using Microsoft.Extensions.DependencyInjection;
using CareEvolution.Orchestrate;

var services = new ServiceCollection();
services.AddOrchestrateApi(options =>
{
    options.ApiKey = "your-api-key";
    options.TimeoutMs = 30000;
});

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orchestrate_api-4.1.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orchestrate_api-4.1.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file orchestrate_api-4.1.0.tar.gz.

File metadata

  • Download URL: orchestrate_api-4.1.0.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/2.3.4 CPython/3.14.3 Linux/6.17.0-1010-azure

File hashes

Hashes for orchestrate_api-4.1.0.tar.gz
Algorithm Hash digest
SHA256 9d930281697196f9f51890de34d99a694af2b0dbe12c7d6b4a38af79ba0f92ad
MD5 080dae373dc89131d1684b8da4a46878
BLAKE2b-256 9295d595715bf8cd5da9c8033ee1fcd1a90dfd3df802cba985181304f0a3fc9a

See more details on using hashes here.

File details

Details for the file orchestrate_api-4.1.0-py3-none-any.whl.

File metadata

  • Download URL: orchestrate_api-4.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/2.3.4 CPython/3.14.3 Linux/6.17.0-1010-azure

File hashes

Hashes for orchestrate_api-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad3bb6aa868be4bcff873ff4bdda04cbad3b53a7afdac1b7c04a11191405881f
MD5 43b3bb4cc3e5460ff0a8632efd5a0983
BLAKE2b-256 52c75130b9d4e305e342270e6748791a2dbc2be7afaa1975172ba019a9a5fb9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page