How to use a Pub/Sub Topic as a target endpoint

I am not sure if I've been doing right, but I want to call a PubSub Topic instead of a URL Endpoint.

The aim of this is validate data from a public API before send to Topic,

Could Someone help me, please!!

Solved Solved
0 1 1,863
1 ACCEPTED SOLUTION

>  I want to call a PubSub Topic instead of a URL Endpoint.

may I reframe that just a bit?  It sounds like you want to use a pubsub url as the target url endpoint. Not “instead of” a target url. But “as” the target url. 

as you know, all the resources managed under google cloud have a restful API. Connecting to a pubsub topic (publishing  content to a topic!) via http is just a matter of using the appropriate url and payload. Here’s the pubsub doc to help you. 

it should be like creating any other API proxy in Apigee. 

there is one flourish: in Apigee x,  you can use the GoogleAuthentication element to manage the authentication to the upstream pubsub endpoint. Search around for this, it will be easy to find details. 

View solution in original post

1 REPLY 1

>  I want to call a PubSub Topic instead of a URL Endpoint.

may I reframe that just a bit?  It sounds like you want to use a pubsub url as the target url endpoint. Not “instead of” a target url. But “as” the target url. 

as you know, all the resources managed under google cloud have a restful API. Connecting to a pubsub topic (publishing  content to a topic!) via http is just a matter of using the appropriate url and payload. Here’s the pubsub doc to help you. 

it should be like creating any other API proxy in Apigee. 

there is one flourish: in Apigee x,  you can use the GoogleAuthentication element to manage the authentication to the upstream pubsub endpoint. Search around for this, it will be easy to find details.