Skip to main content

Get method

Get method information

Function GetMethod(Val Connection, Val Service, Val Method, Val Tls = Undefined) Export

ParameterCLI optionTypeRequiredDescription
Connection--connArbitraryExisting connection or connection parameters
Service--serviceStringService name
Method--methodStringMethod name
Tls--tlsStructure Of KeyAndValueTLS settings, if necessary. See GetTlsSettings

Returns: Map Of KeyAndValue - Processing result

1C:Enterprise/OneScript code example
    Address = "https://grpcb.in:9001";
Scheme = "https://hut.openintegrations.dev/test_data/grpcbin.proto"; // String, path to file or URL

Parameters = OPI_GRPC.GetConnectionParameters(Address, Scheme);
Tls = OPI_GRPC.GetTlsSettings(True);

Connection = OPI_GRPC.CreateConnection(Parameters, Tls);
Service = "grpcbin.GRPCBin";
Method = "Index";

Result = OPI_GRPC.GetMethod(Connection, Service, Method);
    # JSON data can also be passed as a path to a .json file

oint grpc GetMethod \
--conn "{'address':'https://grpcb.in:9001','proto':{'main.proto':'https://hut.openintegrations.dev/test_data/grpcbin.proto'}}" \
--service "grpcbin.GRPCBin" \
--method "Index"
Result
{
"data": {
"is_client_streaming": "***",
"is_server_streaming": false,
"request_schema": {
"fields": {},
"type": "object"
},
"request_type": "grpcbin.EmptyMessage",
"response_schema": {
"fields": {
"description": {
"number": 1,
"required": true,
"type": "string"
},
"endpoints": {
"number": 2,
"required": true,
"type": "message"
}
},
"type": "object"
},
"response_type": "grpcbin.IndexReply"
},
"result": true
}