> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kasoftware.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 使用 API

> 將 API 資源公開給授權使用者和 IP 地址，並查詢 API 端口。

為 API 建立資源後，可以將它們公開給授權使用者和 IP 地址。知行之橋使用基於身分驗證權杖的身分驗證，並支援主要的身分驗證方案。點選 **使用者** 索引標籤可管理使用者的身分驗證權杖和權限。要定義允許存取應用程式的 IP 地址，請點選 **伺服器** 索引標籤。

現在可以在瀏覽器中查詢 API，如下面的範例查詢和回應所示。

**請求**

`http://MyServer:MyPort/connector/MyAPIPortName/api.rsc/Cars`

**回應**

```json theme={null}
{ 
  "@odata.context":"http://MyServer:MyPort/connector/MyAPIPortName/api.rsc/$metadata#Cars",
  "value":[
    { "Id": "10001", "Model": "MyModel1", "Color": "Red" },
    { "Id": "10002", "Model": "MyModel2", "Color2": "Blue" }
  ]
}
```

## 重寫 HTTP 方法

某些用戶端可能無法為特定操作發出正確的 HTTP 方法。可以使用 `@x-http-method` 查詢字串輸入參數或 `X-HTTP-Method` HTTP 訊息頭來覆蓋請求的 HTTP 方法。例如，不支援 HTTP PUT 方法的用戶端可以在 GET 請求中包含 *X-HTTP-Method: PUT* 訊息頭，以發出資源更新請求。
