is the only way to register a flow by calling the ...
# ask-community
w
is the only way to register a flow by calling the register method on the flow on the same server prefect is running on?
c
registering a Flow with a Prefect backend requires access to that backend’s API. For server, it’ll depend on what networking you place around it, but yes the default is that the API is only exposed on the machine it’s running on. For Cloud, you just need internet access to
<http://api.prefect.io|api.prefect.io>
w
for server it's not possible to tell a flow where the server is located, so it's assumed when I call flow.register() I am running that on the server. If I wanted to remotely register a flow it seems I would need to use graphql to do so
c
for server it’s not possible to tell a flow where the server is located
You can tell the flow where the server API is located through your user config file: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/config.toml#L10
it seems I would need to use graphql to do so
all interactions with a Prefect backend are through GraphQL, so even when running on the same machine you’re using the GraphQL API
w
got it that makes sense. Thanks!
👍 1