Create User Defined Endpoint - Create User Defined Endpoint
Crea un endpoint definito dall'utente.
Crea l'endpoint definito dall'utente nell'istanza ACL
PUT {ledgerEndpoint}/app/userDefinedEndpoints?api-version=2024-12-09-preview
Parametri dell'URI
Nome | In | Necessario | Tipo | Descrizione |
---|---|---|---|---|
ledger
|
path | True |
string (url) |
URL libro mastro riservato, ad esempio |
api-version
|
query | True |
string |
Versione dell'API da usare con la richiesta HTTP. |
Corpo della richiesta
Nome | Necessario | Tipo | Descrizione |
---|---|---|---|
metadata | True | ||
modules | True |
Risposte
Nome | Tipo | Descrizione |
---|---|---|
201 Created |
Viene creato l'endpoint definito dall'utente. |
|
Other Status Codes |
Risposta di errore che descrive il motivo per cui l'operazione non è riuscita. |
Esempio
CreateUserDefinedEndpoint
Esempio di richiesta
PUT {ledgerEndpoint}/app/userDefinedEndpoints?api-version=2024-12-09-preview
{
"metadata": {
"endpoints": {
"/content": {
"get": {
"forwarding_required": "always",
"authn_policies": [
{}
]
}
}
}
},
"modules": {
"name": "test.js",
"module": "TESTJS"
}
}
Risposta di esempio
Definizioni
Nome | Descrizione |
---|---|
Bundle |
bundle per gli endpoint definiti dall'utente |
Confidential |
Risposta di errore da Confidential Ledger. |
Confidential |
Risposta di errore da Confidential Ledger. |
Endpoint |
|
Forwarding |
|
Interpreter |
|
Metadata | |
method_to_Endpoint |
|
Mode | |
Module |
|
Redirection |
Bundle
bundle per gli endpoint definiti dall'utente
Nome | Tipo | Descrizione |
---|---|---|
metadata | ||
modules |
ConfidentialLedgerError
Risposta di errore da Confidential Ledger.
Nome | Tipo | Descrizione |
---|---|---|
error |
Risposta di errore da Confidential Ledger. |
ConfidentialLedgerErrorBody
Risposta di errore da Confidential Ledger.
Nome | Tipo | Descrizione |
---|---|---|
code |
string |
Codice di errore. |
message |
string |
Messaggio di errore. |
EndpointProperties
Nome | Tipo | Descrizione |
---|---|---|
authn_policies |
json[] |
|
forwarding_required | ||
interpreter_reuse | ||
js_function |
string |
|
js_module |
string |
|
mode | ||
openapi |
json |
|
openapi_hidden |
boolean |
|
redirection_strategy |
ForwardingRequired
Valore | Descrizione |
---|---|
always | |
never | |
sometimes |
InterpreterReusePolicy
Nome | Tipo | Descrizione |
---|---|---|
key |
string |
Metadata
Nome | Tipo | Descrizione |
---|---|---|
endpoints |
<string,
method_to_Endpoint |
Mappa del percorso agli endpoint del metodo per il percorso |
method_to_EndpointProperties
Nome | Tipo | Descrizione |
---|---|---|
delete | ||
get | ||
patch | ||
put |
Mode
Valore | Descrizione |
---|---|
historical | |
readonly | |
readwrite |
ModuleDef
Nome | Tipo | Descrizione |
---|---|---|
module |
string |
|
name |
string |
RedirectionStrategy
Valore | Descrizione |
---|---|
none | |
to_backup | |
to_primary |