API Scan Configuration File Samples

The following paragraphs provide JSON samples of API configuration files.

Sample GraphQL Configuration File

The following sample shows a GraphQL configuration file without authentication.

{
    "APIDefinition": "http://<ip_address>:<port>/graphql/",
    "Schemes": [ "http" ],
    "Host": "<ip_address>:<port>",
    "ServicePath": "/graphql/",
    "Type": "GraphQL",
    "Proxy": {
        "Host": "<ip_address>",
        "Port": "<port>",
        "UserName": "<username>",
        "Password": "<password>"
    }
}

Sample gRPC Configuration File

The following sample shows a gRPC configuration file using the TRANSPORT_BEARER AuthProvider type with an explicitly configured token value.

{	
   "APIDefinition": "https://<host_name>:<port>/protos/client.proto",
   "Type": "gRPC",
   "Schemes": [ "https" ], 
   "Host": "<host_name>:<port>", 
   "ServicePath" : "/", 
   "AuthProviders": [
      {
         "Type": "TRANSPORT_BEARER",
         "Value":"<token>"
      }
   ]
}

Sample SOAP Configuration File

The following sample shows a SOAP configuration file using the TRANSPORT_NTLM and MESSAGE_USERNAMETOKEN AuthProvider types.

{	
   "APIDefinition": "https://<host_name>:<port>/wcf/service.svc?singleWsdl", 
   "Type": "SOAP",
   "Schemes": [ "https" ],
   "Host": "<host_name>:<port>",
   "APIVersion": "Mixed",
   "AuthProviders": [
      {
         "Type": "TRANSPORT_NTLM",
         "Username": "<host_name>\\<username>",
         "Password": "<password>",
      },
      {
         "Type": "MESSAGE_USERNAMETOKEN",
         "Username": "<username>",
         "Password": "<password>",
         "UsernameToken": {
            "Type": "TEXT",
            "TimeStamp": "Created",
            "IncludeNonce": true
         },

      }
   ]
}