Events - Reward

回報獎勵,以配置給指定事件排名最高的動作。

POST {Endpoint}/personalizer/v1.0/events/{eventId}/reward

URI 參數

名稱 位於 必要 類型 Description
Endpoint
path True

string

支援的認知服務端點。

eventId
path True

string

此獎勵適用的事件標識碼。

要求標頭

名稱 必要 類型 Description
Ocp-Apim-Subscription-Key True

string

要求本文

名稱 必要 類型 Description
value True

number

要指派給動作的獎勵。 值應介於 -1 到 1 之間。

回應

名稱 類型 Description
204 No Content

Success

Other Status Codes

ErrorResponse

無效的獎勵要求。

安全性

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

範例

Successful Events_Reward request

Sample Request

POST {Endpoint}/personalizer/v1.0/events/id/reward


{
  "value": 1
}

Sample Response

定義

名稱 Description
ErrorCode

高階錯誤碼。

ErrorResponse

用來將錯誤傳回給用戶端

InternalError

物件,包含比父對象有關錯誤的更特定資訊。

PersonalizerError

error 物件。

RewardRequest

獲得排名回應的獎勵。

ErrorCode

高階錯誤碼。

名稱 類型 Description
BadRequest

string

伺服器無法瞭解要求。

InternalServerError

string

伺服器上已經發生泛用錯誤。

ResourceNotFound

string

要求的資源不存在於伺服器上。

ErrorResponse

用來將錯誤傳回給用戶端

名稱 類型 Description
error

PersonalizerError

error 物件。

InternalError

物件,包含比父對象有關錯誤的更特定資訊。

名稱 類型 Description
code

string

詳細的錯誤碼。

innererror

InternalError

error 物件。

PersonalizerError

error 物件。

名稱 類型 Description
code

ErrorCode

高階錯誤碼。

details

PersonalizerError[]

導致此錯誤之特定錯誤的詳細數據陣列。

innerError

InternalError

更精細的錯誤詳細數據。

message

string

說明服務所報告錯誤的訊息。

target

string

錯誤來源專案。

RewardRequest

獲得排名回應的獎勵。

名稱 類型 Description
value

number

要指派給動作的獎勵。 值應介於 -1 到 1 之間。