Hear from Salesforce leaders on how to create and deploy Agentforce agents.
Contact Us 1-800-596-4880

Troubleshooting with the Admin API

Anypoint Flex Gateway includes one administration interface:

  • Flex Gateway Admin API

The Flex Gateway Admin API enables you to query for information related to a gateway’s API instances, services, and configurations. The related CLI includes the following command:

  • flexctl dump

As an example, the following inline configuration snippet defines a single API instance named jsonplaceholder-api in the default namespace (it remains default because namespace is not explicitly defined.) Additionally, the snippet defines one included policy: http-basic-authentication-flex.

Configuration Example

apiVersion: gateway.mulesoft.com/v1alpha1
kind: ApiInstance
metadata:
  name: jsonplaceholder-api
spec:
  address: http://0.0.0.0:8080
  services:
    jsonplaceholder:
      address: https://jsonplaceholder.typicode.com:443/
      routes:
        - rules:
            - path: /api(/users/.*)
            - path: /api(/comments/.*)
  policies:
    - policyRef:
        name: http-basic-authentication-flex
      config:
        username: chris
        password: admin

API Instances

To see a JSON representation of your API instance, execute the flexctl dump command. The CLI creates a file called api-instances.json.

When running in a Docker container, execute this command in the container itself.

cat api-instances.json

The API returns the following:

Services

To see a JSON representation of defined services, execute the flexctl dump command. The CLI creates a file called services.json.

When running in a Docker container, execute this command in the container itself.

cat services.json

The API returns the following:

[
   {
      "address":"https://jsonplaceholder.typicode.com:443/",
      "kind":"Service",
      "name":"jsonplaceholder-api-jsonplaceholder",
      "namespace":"default"
   }
]

Config Dump

To see a JSON representation of the complete configuration definition, execute the flexctl dump command. The CLI creates a file called configuration.json.

When running in a Docker container, execute this command in the container itself.

cat configuration.json

The API returns something like the following: