◷ Reading Time: 5 minutes
Get Service Details Using Services URL
To demonstrate how to retrieve service information, we will be using Postman, but you can use any API testing tool for this.
Retrieve All the Available Services
You can use the Services URL to get the list of available services along with their details. For example, if your package has three services, you can retrieve the service details of all three services.

Request
- URL: <Services URL>
e.g. https://us-west2-fr-project-305102.cloudfunctions.net/age-service-132658713990376521/Services/?code=pE46KvMUQg4jmKJWHofR6Ss4W4HtXBL5m5DZBp5ynESvgj3rGHPDgw6q/l0QpYMoyl2VRGYSMY2gxU1oyxYyJw== - Request type: GET
Response
[
{
"packageId": "8ad25252fc2f43e99b7d7224d1a510e9",
"packageName": "age-service",
"serviceName": "person growing state",
"serviceId": "7e130b07b8964ea5b796d3383ac91027",
"packageVersion": "1",
"serviceVersion": "1",
"packageUri": "/8ad25252fc2f43e99b7d7224d1a510e9/7e130b07b8964ea5b796d3383ac91027/decision.function.frdp",
"parameters": {
"href": "/services/age-service/1/person growing state/1"
},
"execute": {
"href": "/execute/age-service/1/person growing state/1"
}
},
{
"packageId": "8ad25252fc2f43e99b7d7224d1a510e9",
"packageName": "age-service",
"serviceName": "person growing state",
"serviceId": "a21be108580c49d88a3b2857835d7878",
"packageVersion": "1",
"serviceVersion": null,
"packageUri": "/8ad25252fc2f43e99b7d7224d1a510e9/a21be108580c49d88a3b2857835d7878/decision.function.frdp",
"parameters": {
"href": "/services/age-service/1/person growing state"
},
"execute": {
"href": "/execute/age-service/1/person growing state"
}
}
]
Retrieve Information on Input
You can retrieve further information on the input data structure, entry URI, and concept.

- URL: <Replace Services Uri /Services part with the service’s parameters.href value of its response>
e.g. https://us-west2-fr-project-305102.cloudfunctions.net/age-service-132658713990376521/services/age-service/1/person growing state/1/?code=pE46KvMUQg4jmKJWHofR6Ss4W4HtXBL5m5DZBp5ynESvgj3rGHPDgw6q/l0QpYMoyl2VRGYSMY2gxU1oyxYyJw== - Request type: GET

Response
In this response, we can see that the
[
{
"name": "person",
"direction": "InOut",
"assembly": "PersonConcept.xml",
"type": "Person",
"concept": {
"filename": "PersonConcept.xml",
"types": [
{
"name": "Person",
"type": "Fact",
"members": [
{
"name": "Age",
"type": "int"
},
{
"name": "Title",
"fact": "Title"
}
]
},
{
"name": "Title",
"type": "Option",
"members": [
{
"name": "Infant"
},
{
"name": "Kid"
},
{
"name": "Teen"
},
{
"name": "Young"
},
{
"name": "Adult"
},
{
"name": "Immortal"
}
]
}
],
"namespace": "Samples"
}
}
]
You may also opt to retrieve the swagger specification by using the swagger endpoint.
Execute the Service
Using the Execute Url, we can execute the service and retrieve output from our Google Cloud Function deployed in Google.

Request
- URL: <Execute Url>
e.g. https://us-west2-fr-project-305102.cloudfunctions.net/age-service-132658713990376521/Execute/age-service/1/person growing state/1?code=i7shHfdqjFwzrxvQAFN3QV1B+8Oi+xDzruHl2pcbHhpR2+rp/A97rrUbaPLTSPyRMBSQB0k6PB9G3gmY6x/9lA== - Request type: POST
- Body: <input of your service>
Response
It will run the app deployed in Google Cloud, and provide the results accordingly. In this example, since we entered 50 as age, it returned ‘Kid’ as the title. In the decision table, you can see that we have defined the age group 39-99 as ‘Kid’.
{
"isCanceled": false,
"invocationId": "arn:aws:lambda:us-west-2:627175391071:function:age-service-132633758128829094",
"elapsed": "00:00:00.0014247",
"outputs": [
{
"name": "person",
"value": "{\"Age\":50,\"Title\":\"Kid\"}"
}
]
}
Checking your Function in Google Cloud Console
On your Google Cloud Console page, you will see all the functions created by FlexRule through Google Cloud Function deploy.

The code as seen in the Execute and Service URLs are to be found in Cloud Function page of the Google Cloud Console.
