Integrate Flytxt with CX Industries Framework
Here's how you can integrate Flytxt with CX Industries Framework:
Create SystemDescriptors (TTD)
https://<host>:<port>/admin/systemDescriptors
Method: POST
Payload
{
"target-name": "flytxt-api",
"external": {
"apis": [
{
"api-id": "flytxt-101",
"api-resources": [
{
"resources": [
{
"resource-id": "customers-api"
},
{
"resource-id": "recommendations-api"
}
]
}
],
"api-version": "v2"
}
]
},
"system": "flytxt",
"domain": "flytxt"
}
Create Connection Descriptors (TIC)
https://<host>:<port>/admin/connectionDescriptors
Method: POST
Payload
{
"system-descriptor": "<TTD ID>",
"endpoint-name": "flytxt-api",
"endpoint-url": "<FLYTXT_ENDPOINT_URI>",
"fabric-facing-auth": {
"oidc-client-credentials": {
"client-id": "<CLIENT_ID>",
"client-secret": "<CLIENT_SECRET>",
"identity-uri": "<IDENTITY_URI>",
"scope": "<SCOPE>"
}
},
"type": "external"
}
Create Gatekeeping Rule
https://<host>:<port>/admin/gatekeepingRules/<gkr-id>
Method: PUT
Payload
{
"id": "<GKR Id>",
"endpoint-name": "flytxt-api",
"rule-name": "Generated gatekeeping rule for endpoint flytxt-api",
"external-event-emitter-identification":"<CLIENT_ID>",
"destination-selection": [
{
"api-id": "flytxt-101",
"api-version": "v2",
"criteria": [
{
"rank": 1,
"resource-ids": [
"customers-api",
"recommendations-api"
]
}
]
}
]
}