What is the best practice for how to check if an i...
# ask-ai
q
What is the best practice for how to check if an ingress exists without storing the ingress ID? is there any mechanism for the ingress service to store a manually provided name or ID?
t
Thanks for reaching out, Ari. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! If you want to check whether an ingress exists without holding onto the ingress ID, the easiest way is to use the ListIngress API. This handy API lets you filter ingresses by things like
room_name
or other details you know. You can then go through the list it gives you to find the exact ingress you're looking for. Also, a neat tip: when you create an ingress using the
CreateIngress
API, you can add a name yourself. This name gets saved in the IngressInfo object, so later on, you can use that name to find the ingress easily with the ListIngress API. To make your life simpler, try giving your ingresses clear and unique names when you create them—something like "main-stage-broadcast" or "camera-01-ingress." It really helps keep things organized and makes managing your app a breeze. Sources: Ingress overview | LiveKit Docs | packages/livekit-server-sdk/src/IngressClient.ts | livekit/livekit_ingress.pb.go | src/main/kotlin/io/livekit/server/IngressServiceClient.kt
q
Can you please show me an example of how to create an ingress with a unique name?
t
Here’s a friendly example to help you create an ingress with a unique name using the LiveKit API: Using Node.js SDK Sources: protobufs/livekit_ingress.proto | README.md | packages/livekit-server-sdk/src/IngressClient.ts | Ingress overview | LiveKit Docs
q
Hmm I dont think that example worked.
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!