城市污水厂业务中台
产品指南
解决方案
开发者中心
申请试用
返回门户
产品指南
解决方案
开发者中心
申请试用
返回门户
  • 快速上手
  • 模块功能
  • API文档

    • 用户认证管理服务
    • 方案管理服务
    • 模型计算服务
    • IoT服务
    • 污水业务中台领域服务
    • 污水业务中台基础服务
  • 如何使用

快速上手

尝试 业务中台 最简单的方法是使用创建一个 JavaScript 文件。
通过Fetch API,发送标准的 HTTP 请求,获取相关服务。

注意

请先点击申请试用,获取你的专属 token 和 tenantId

const token = '{{your_token}}';
const tenantId = '{{your_tenantId}}';
const host = 'https://online-products.dhichina.cn/gateway/';
const service = 'global-scenario-manager-service';
const api = '/api/v1/scenario-manager/scenariogroup/root';
const url = `${host}/${service}/${api}`;
const requestOptions = {
  headers: {
    Authorization: `Bearer ${token}`,
    tenantId,
  },
};
const $content = document.querySelector('#content');
fetch(url, requestOptions)
  .then((response) => response.json())
  .then((result) => console.log(result))
  .catch((error) => console.error('error', error));

可以输入 token 直接尝试 😁

最近更新:: 2023/3/14 09:27
Contributors: Lin, linkang hu
Next
/develop/modules.html