https://prefect.io logo
Title
w

Will Milner

06/01/2020, 6:40 PM
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

Chris White

06/01/2020, 6:41 PM
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

Will Milner

06/01/2020, 6:47 PM
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

Chris White

06/01/2020, 6:49 PM
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

Will Milner

06/01/2020, 6:50 PM
got it that makes sense. Thanks!
👍 1