{"id":41663,"library":"oci-objectstorage","title":"OCI Object Storage SDK","description":"Official Oracle Cloud Infrastructure (OCI) SDK for Node.js to manage Object Storage service resources. Current stable version is 2.132.0, released as part of the OCI TypeScript SDK monorepo with weekly release cadence. Supports all Object Storage operations: buckets, objects, pre-authenticated requests, multipart uploads, and retention rules. Requires OCI account, IAM user with policies, and API signing key pair. Ships with TypeScript types. Differentiator: first-party SDK maintained by Oracle, supports all OCI regions and features, integrates with OCI authentication providers.","status":"active","version":"2.132.0","language":"javascript","source_language":"en","source_url":"https://github.com/oracle/oci-typescript-sdk","tags":["javascript","typescript"],"install":[{"cmd":"npm install oci-objectstorage","lang":"bash","label":"npm"},{"cmd":"yarn add oci-objectstorage","lang":"bash","label":"yarn"},{"cmd":"pnpm add oci-objectstorage","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"OCI common SDK for authentication, HTTP handling, and signing","package":"oci-common","optional":false}],"imports":[{"note":"ESM import is recommended in TypeScript/ES modules; CJS require also works but destructure the named export.","wrong":"const ObjectStorageClient = require('oci-objectstorage').ObjectStorageClient","symbol":"ObjectStorageClient","correct":"import { ObjectStorageClient } from 'oci-objectstorage'"},{"note":"Models are in a subpath; use explicit lib path.","wrong":"import models from 'oci-objectstorage'","symbol":"models","correct":"import * as models from 'oci-objectstorage/lib/models'"},{"note":"Request types are also in subpaths; check docs for correct import.","wrong":"import ListObjectsRequest from 'oci-objectstorage'","symbol":"requests","correct":"import { ListObjectsRequest } from 'oci-objectstorage/lib/requests'"},{"note":"Common utilities like auth providers come from 'oci-common' package.","wrong":"import { common } from 'oci-objectstorage'","symbol":"common","correct":"import { common } from 'oci-common'"}],"quickstart":{"code":"import { ObjectStorageClient } from 'oci-objectstorage';\nimport { common } from 'oci-common';\n\nconst provider = new common.ConfigFileAuthenticationDetailsProvider();\nconst client = new ObjectStorageClient({ authenticationDetailsProvider: provider });\n\nasync function listBuckets() {\n  const namespaceName = (await client.getNamespace({})).value;\n  const compartmentId = process.env.COMPARTMENT_OCID!;\n  const response = await client.listBuckets({ namespaceName, compartmentId });\n  console.log(response.items);\n}\n\nlistBuckets();","lang":"typescript","description":"Authenticate using OCI config file and list all buckets in a compartment."},"warnings":[{"fix":"Update import paths to include '/lib/models', '/lib/requests' etc.","message":"oci-objectstorage v2.x moved to monorepo; imports changed from 'oci-objectstorage' to subpaths for models and requests.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Set region explicitly in config or via environment variable OCI_REGION.","message":"Using ConfigFileAuthenticationDetailsProvider without region setting may cause errors in some regions.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use client.getObject({...}) with the object name and bucket name from list results.","message":"ListObjectsRequest does not return object content; you must call getObject separately.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Catch errors with try/catch and inspect error.statusCode for HTTP status.","message":"All API calls are async and return promises; errors are of type OciError with statusCode and serviceCode.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'2.132.0':23 'account':55 'api':61 'authent':46,86 'bucket':42 'cadenc':36 'cloud':7 'current':19 'differenti':69 'featur':82 'first':71 'first-parti':70 'iam':56 'infrastructur':8 'integr':83 'javascript':88 'key':63 'maintain':74 'manag':14 'monorepo':32 'multipart':48 'node.js':12 'object':2,15,39,43 'oci':1,9,29,54,79,85 'offici':5 'oper':41 'oracl':6,76 'pair':64 'part':26 'parti':72 'polici':59 'pre':45 'pre-authent':44 'provid':87 'region':80 'releas':24,35 'request':47 'requir':53 'resourc':18 'retent':51 'rule':52 'sdk':4,10,31,73 'servic':17 'ship':65 'sign':62 'stabl':20 'storag':3,16,40 'support':37,77 'type':68 'typescript':30,67,89 'upload':49 'user':57 'version':21 'week':34","created_at":"2026-06-04T18:53:30.461050+00:00","updated_at":"2026-06-04T18:53:30.461050+00:00","problems":[{"fix":"Call getNamespace() first to retrieve namespace name or set it from environment variable.","cause":"Namespace name not provided in listBuckets request.","error":"Error: Missing required parameter 'namespaceName'"},{"fix":"Instantiate provider (e.g., new common.ConfigFileAuthenticationDetailsProvider()) and pass it in client options.","cause":"AuthenticationDetailsProvider not passed to client constructor.","error":"TypeError: Cannot read properties of undefined (reading 'authenticationDetailsProvider')"},{"fix":"Ensure ~/.oci/config exists with correct user, fingerprint, tenancy, and key_file paths.","cause":"OCI authentication failed; missing or invalid config file or API key.","error":"Error: NotAuthenticated"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/oracle/oci-typescript-sdk#readme","github":"https://github.com/oracle/oci-typescript-sdk","docs":null,"changelog":null,"pypi":null,"npm":"oci-objectstorage","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}