The HTTP/2 Server agent enables you to configure an HTTP server in a real-time workflow. The agent receives requests, converts them into UDRs routed into the workflow, and then sends responses back over a TCP/IP connection.
...
Setting | Description | |||||
---|---|---|---|---|---|---|
Use OpenAPI Profile | Select this option if you want the agent to use an OpenAPI profile. | |||||
OpenAPI Profile | If Use OpenAPI Profile has been selected, select which profile to use in this field. | |||||
Enable Validation | Select this option if you want to validate the OpenAPI profile.
| |||||
Override Error Response on Server Shutdown | Select this option to enable the customization of the HTTP response for when a request to the server is received upon the server being terminated. | |||||
Override Error Response on Server Overload | Select this option to enable the customization of the HTTP response for when a request to the server is received upon the server being overloaded.
| |||||
Status Code | The HTTP error code for the error response. The default error code set is 503 for server shutdown and 429 for server overload. | |||||
Content Type | ||||||
UDR Type | Browse for the UDR that will be populated as part of the HTTP response message. | |||||
UDR Field | The fields in the selected UDR Type will be shown in this column. | |||||
Type | The data type for the each of the UDR fields will be shown here. Usage Engine supports the following data type:
| |||||
Value | Enter a value that conforms to the data type of the UDR field. The value will then be parsed into the HTTP response when the error is triggered. | |||||
Use 5G Profile | Select this option if you want the agent to use a 5G profile. | |||||
5G Profile | If Use 5G Profile has been selected, select which profile to use in this field. | |||||
NRF Address | Enter the primary NRF (NF Repository Function) address in this field. | |||||
Reconnect to primary address when it is available | Enable this option to have the agent fall back to the primary NRF address from the secondary address. The agent to constantly send a registration request to the primary NRF address at every heartbeat interval. The heartbeat interval will be based off of the value that you have configured in the 5G profile. | |||||
NRF Address (Secondary) | Enter one or more secondary NRF (NF Repository Function) address in this list, this is to allow for alternative connections when the heartbeat with the primary NRF Address is not established. |
...
Input Data
9.41.4.1 NRFSpecificationUDRwill only be required when Custom Specification is enabled on the 5G Profile. Refer to 8.1 5G Profile or more information about enabling Custom Specifications for 5G.
...
Code Block | ||
---|---|---|
| ||
import ultra.openapi.Test_5G.TS29510_Nnrf_NFDiscovery; consume { http.RequestCycle cycleUdr = (http.RequestCycle) input; debug("input from client \n" + cycleUdr); ProblemDetails problemDetails = udrCreate(ProblemDetails); http.Response response = udrCreate(http.Response); if (cycleUdr.isError) { // cycleUdr.isError will be true if any errors is encountered while processing the request list<string> headers = listCreate(string); listAdd(headers, "application/problem+json"); mapSet(response.headers, "Content-Type", headers); problemDetails.title = "Request Error"; problemDetails.cause = listGet(cycleUdr.errorMessages, 0); // cycleUdr.errorMessages is a list containing error messages set from the error encountered problemDetails.status = cycleUdr.errorStatusCode; // cycleUdr.errorStatusCode contains the status code of the error encountered response.openAPIUDR = problemDetails; response.statusCode = cycleUdr.errorStatusCode; } cycleUdr.response = response; debug("after apl logic \n" + cycleUdr); udrRoute("to_server", cycleUdr); } |
Scroll ignore | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||