<a id="event-methods-endpoints"></a>

# Service Endpoints Auditable Event Methods on Confluent Cloud

An auditable event method is an action or operation on Confluent Cloud endpoint
discovery that generates a message that Confluent Cloud stores as an audit log
record.

Service endpoints provide fully qualified domain names (FQDNs) for connecting to
Confluent Cloud resources such as Apache Kafka® clusters, Schema Registry, and Apache Flink®. This endpoint
discovery service supports discovery of public and private endpoints across
the following connection types:

- Public internet
- PrivateLink
- Virtual private cloud (VPC) peering
- Transit Gateway

| Method name                               | Action triggering an auditable event message                       |
|-------------------------------------------|--------------------------------------------------------------------|
| [ListEndpoints](#list-endpoints-examples) | A request to list service endpoints for Confluent Cloud resources. |

<a id="list-endpoints-examples"></a>

## ListEndpoints

The `ListEndpoints` event is generated by a request to list service endpoints
for Confluent Cloud resources. This operation returns endpoint information for Kafka
clusters, Schema Registry, or Flink based on the specified filters.

The following table summarizes the example scenarios in this section:

| Scenario                              | Filter applied              | Result                         |
|---------------------------------------|-----------------------------|--------------------------------|
| Without filters                       | None                        | 3 endpoints found              |
| With resource ID filter               | Resource ID                 | 2 endpoints found              |
| With gateway and access point filters | Gateway ID, access point ID | 1 endpoint found               |
| Schema Registry endpoints             | Service type, resource ID   | 2 endpoints found              |
| Internal error                        | None (server-side failure)  | Request fails with a 500 error |

To view example event messages, expand the following dropdowns:

### Success: Without filters

```json
{
   "datacontenttype": "application/json",
   "data": {
      "serviceName": "crn://confluent.cloud/",
      "methodName": "ListEndpoints",
      "cloudResources": [
         {
            "scope": {
               "resources": [
                  {
                     "type": "ORGANIZATION",
                     "resourceId": "94b47aa0-ed3a-44da-9460-6cec0c710e84"
                  }
               ]
            },
            "resource": {
               "type": "ENVIRONMENT",
               "resourceId": "env-abc123"
            }
         }
      ],
      "authenticationInfo": {
         "principal": {
            "email": "someone@example.com",
            "confluentUser": {
               "resourceId": "u-abc123"
            }
         },
         "result": "SUCCESS",
         "identity": "crn://confluent.cloud/organization=94b47aa0-ed3a-44da-9460-6cec0c710e84/identity-provider=Confluent/identity=u-abc123"
      },
      "requestMetadata": {
         "requestId": [
            "1085d1cbbb13ca134fe988824212ce26"
         ],
         "clientAddress": [
            {
               "ip": "1.2.3.4"
            }
         ]
      },
      "request": {
         "accessType": "READ_ONLY",
         "data": {
            "environment_id": "env-abc123",
            "service": "KAFKA"
         }
      },
      "result": {
         "status": "SUCCESS",
         "data": {
            "endpoint_count": 3
         }
      }
   }
}
```

### Success: With resource ID filter

```json
{
   "datacontenttype": "application/json",
   "data": {
      "serviceName": "crn://confluent.cloud/",
      "methodName": "ListEndpoints",
      "cloudResources": [
         {
            "scope": {
               "resources": [
                  {
                     "type": "ORGANIZATION",
                     "resourceId": "94b47aa0-ed3a-44da-9460-6cec0c710e84"
                  },
                  {
                     "type": "ENVIRONMENT",
                     "resourceId": "env-abc123"
                  }
               ]
            },
            "resource": {
               "type": "KAFKA_CLUSTER",
               "resourceId": "lkc-xyz789"
            }
         }
      ],
      "authenticationInfo": {
         "principal": {
            "email": "someone@example.com",
            "confluentUser": {
               "resourceId": "u-abc123"
            }
         },
         "result": "SUCCESS",
         "identity": "crn://confluent.cloud/organization=94b47aa0-ed3a-44da-9460-6cec0c710e84/identity-provider=Confluent/identity=u-abc123"
      },
      "requestMetadata": {
         "requestId": [
            "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
         ],
         "clientAddress": [
            {
               "ip": "1.2.3.4"
            }
         ]
      },
      "request": {
         "accessType": "READ_ONLY",
         "data": {
            "environment_id": "env-abc123",
            "service": "KAFKA",
            "resource_id": "lkc-xyz789"
         }
      },
      "result": {
         "status": "SUCCESS",
         "data": {
            "endpoint_count": 2
         }
      }
   }
}
```

### Success: With gateway and access point filters

```json
{
   "datacontenttype": "application/json",
   "data": {
      "serviceName": "crn://confluent.cloud/",
      "methodName": "ListEndpoints",
      "cloudResources": [
         {
            "scope": {
               "resources": [
                  {
                     "type": "ORGANIZATION",
                     "resourceId": "94b47aa0-ed3a-44da-9460-6cec0c710e84"
                  },
                  {
                     "type": "ENVIRONMENT",
                     "resourceId": "env-abc123"
                  },
                  {
                     "type": "GATEWAY",
                     "resourceId": "gw-def456"
                  }
               ]
            },
            "resource": {
               "type": "ACCESS_POINT",
               "resourceId": "ap-ghi789"
            }
         }
      ],
      "authenticationInfo": {
         "principal": {
            "email": "someone@example.com",
            "confluentUser": {
               "resourceId": "u-abc123"
            }
         },
         "result": "SUCCESS",
         "identity": "crn://confluent.cloud/organization=94b47aa0-ed3a-44da-9460-6cec0c710e84/identity-provider=Confluent/identity=u-abc123"
      },
      "requestMetadata": {
         "requestId": [
            "b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7"
         ],
         "clientAddress": [
            {
               "ip": "1.2.3.4"
            }
         ]
      },
      "request": {
         "accessType": "READ_ONLY",
         "data": {
            "environment_id": "env-abc123",
            "service": "KAFKA",
            "gateway_id": "gw-def456",
            "accesspoint_id": "ap-ghi789"
         }
      },
      "result": {
         "status": "SUCCESS",
         "data": {
            "endpoint_count": 1
         }
      }
   }
}
```

### Success: Schema Registry endpoints

```json
{
   "datacontenttype": "application/json",
   "data": {
      "serviceName": "crn://confluent.cloud/",
      "methodName": "ListEndpoints",
      "cloudResources": [
         {
            "scope": {
               "resources": [
                  {
                     "type": "ORGANIZATION",
                     "resourceId": "94b47aa0-ed3a-44da-9460-6cec0c710e84"
                  },
                  {
                     "type": "ENVIRONMENT",
                     "resourceId": "env-abc123"
                  }
               ]
            },
            "resource": {
               "type": "SCHEMA_REGISTRY",
               "resourceId": "lsrc-abc123"
            }
         }
      ],
      "authenticationInfo": {
         "principal": {
            "email": "someone@example.com",
            "confluentUser": {
               "resourceId": "u-abc123"
            }
         },
         "result": "SUCCESS",
         "identity": "crn://confluent.cloud/organization=94b47aa0-ed3a-44da-9460-6cec0c710e84/identity-provider=Confluent/identity=u-abc123"
      },
      "requestMetadata": {
         "requestId": [
            "c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8"
         ],
         "clientAddress": [
            {
               "ip": "1.2.3.4"
            }
         ]
      },
      "request": {
         "accessType": "READ_ONLY",
         "data": {
            "environment_id": "env-abc123",
            "service": "SCHEMA_REGISTRY",
            "resource_id": "lsrc-abc123"
         }
      },
      "result": {
         "status": "SUCCESS",
         "data": {
            "endpoint_count": 2
         }
      }
   }
}
```

### Failure: Internal error

```json
{
   "datacontenttype": "application/json",
   "data": {
      "serviceName": "crn://confluent.cloud/",
      "methodName": "ListEndpoints",
      "cloudResources": [
         {
            "scope": {
               "resources": [
                  {
                     "type": "ORGANIZATION",
                     "resourceId": "94b47aa0-ed3a-44da-9460-6cec0c710e84"
                  }
               ]
            },
            "resource": {
               "type": "ENVIRONMENT",
               "resourceId": "env-abc123"
            }
         }
      ],
      "authenticationInfo": {
         "principal": {
            "email": "someone@example.com",
            "confluentUser": {
               "resourceId": "u-abc123"
            }
         },
         "result": "SUCCESS",
         "identity": "crn://confluent.cloud/organization=94b47aa0-ed3a-44da-9460-6cec0c710e84/identity-provider=Confluent/identity=u-abc123"
      },
      "requestMetadata": {
         "requestId": [
            "d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9"
         ],
         "clientAddress": [
            {
               "ip": "1.2.3.4"
            }
         ]
      },
      "request": {
         "accessType": "READ_ONLY",
         "data": {
            "environment_id": "env-abc123",
            "service": "KAFKA"
         }
      },
      "result": {
         "status": "FAILURE",
         "data": {
            "errors": [
               {
                  "id": "d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9",
                  "status": "500",
                  "detail": "Internal error occurred while retrieving endpoints.",
                  "source": {}
               }
            ]
         }
      }
   }
}
```
