---
# System prepended metadata

title: PHM API 格式(2023/02)

---

# PHM API 格式 (2023/02)

[TOC]

## Setting API
#### **[POST]** /v2/setting/connection
* Request
```
{
    "settings" : [
        {
            "connection_type": "datahub",
            "credential": {
                "node_id": "df3b08e2-6a75-4d20-afc9-8764b5ab5cb7",
                "credential_key" : "fcc46c998497ea64be4570b1d002a7vt",
                "dccs_api_url" : "https://api-dccs-ensaas.sa.wise-paas.com/"
            }
        },
        {
            "connection_type": "minio",
            "credential": {
                "host": "https://200-9000.aifs.ym.wise-paas.com/",
                "user_id" : "hIufTSuDLnT8cFKw7FSB5E2Lz",
                "password" : "nbMjrBhDi3zKsbLcUemgTKYs2",
                "bucket" : "phm-bucket" 
            }
        }
    ]
}
```
* Response 
```
# 正確新增setting
{
    "errCode" : 200,
    "result" : "success"
}

# 新增object時有錯誤
{
    "errCode" : 600
    "result" : string   # explain why error happens
}
    
```
