Skip to content

DHI.Services.MIKECloud — Internal Guide (Core)

One place for MIKECloud platform basics + shared rules for all MIKECloud providers (Documents, Time Series, GIS, Meshes). Each module page links back here for common behavior.


What is MIKECloud?

MIKECloud is DHI’s internal cloud—secure storage + platform services you call programmatically (upload/download files, query time series, import GIS layers, read multidimensional model outputs, etc.).


Core concepts (platform + Domain Services)

  • Projects & Subprojects → hierarchical folders (subprojects are “folders” under a project).
  • Datasets (typed):
    • File → “Documents” (arbitrary files)
    • Timeseries
    • Gisvectordata (vector layers)
    • Multidimensional (e.g., dfs2/dfsu ingested to MIKECloud)
  • Items → e.g., time series items inside a Timeseries dataset (name, unit, quantity).
  • Paths / Full names → POSIX-like:
    • Generic: SubProjA/SubProjB/DatasetOrFileName
    • Time series: dataset segment then item name Example:
      • Dataset: /Hydro/Observations
      • Item full name: /Hydro/Observations/WaterLevel

Prerequisites (all providers)

  1. API key (GUID) for MIKECloud Open API — keep it secret.
  2. Project ID (GUID) — the root project you work under.
  3. Environment — typically Prod (SDK supports Prod/Test/Dev).
  4. NuGet
    • Core: DHI.Services.Provider.MIKECloud
    • Domain(s): DHI.Services.Documents, DHI.Services.TimeSeries, DHI.Services.GIS, DHI.Services.Meshes
    • Web API hosts: the corresponding *.WebApi packages

Connection string (shared format)

apiKey=<YOUR-API-KEY-GUID>;projectId=<YOUR-PROJECT-GUID>;environment=Prod

Notes

  • In Web API hosts, prefer env indirection: apiKey=[env:MIKECLOUD_APIKEY];projectId=[env:MIKECLOUD_PROJECT];environment=Prod
  • Each MIKECloud provider also exposes a strongly-typed ctor: (Guid apiKey, Guid projectId, PlatformEnvironment environment = PlatformEnvironment.Prod)
  • Constructors validate:
    • environment via Enum.TryParse → throws on invalid values.
    • projectId exists → throws ArgumentException if not found (HTTP 404 from platform).

Shared behaviors & helpers

  • Async bridging: Providers call the MIKECloud SDK via AsyncHelpers.RunSync(…) to keep sync signatures. Avoid massive list calls on a hot UI thread.
  • Path creation:
    • Subprojects: created on demand during writes (Add) when missing.
    • Datasets: some flows create (via Transfer import), others require existing datasets (see module tables).
  • “;nonrecursive” suffix: accepted by many list APIs to restrict traversal to a single level.
  • Security: Providers authenticate to MIKECloud with the API key. Any end-user authorization should be enforced by your host (e.g., Web API).

Providers in this package (overview)

Area Repository class (namespace) Purpose (high level)
Documents (files) DocumentRepository · GroupedDocumentRepository Upload/download single files; grouped “folders” view + metadata filtering
Time Series GroupedTimeSeriesRepository CRUD + values for series stored in Timeseries datasets
GIS vectors GroupedGisRepository Import via GeoJSON (Transfer), list/read as FeatureCollection
Multidimensional mesh GroupedMeshRepository Import dfs2/dfsu; metadata; timestamps; point series; spatial aggregations