Более внимательно посмотрел на API
https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/pull
, и есть 2 скрытых аргумента. Было бы неплохо, если бы проводник не скрывал их.
Работает, как только я приведу аргументы:
Запрос
POST https://pubsub.googleapis.com/v1/projects/mimic-integration-10-2019/subscriptions/telemetry:pull?key={YOUR_API_KEY}
{"returnImmediately": true, "maxMessages": 10}
Ответ
200 OK
{ "receivedMessages": [{ "ackId": "WBFOBCEhPjA-RVNEUAYWLF1GSFE3GQhoUQ5PXiM_NSAoRRULUxNRXHUCRRBsVTN1B1ENGXN7NSY7UhsCBUcBdF9RGx9ZXH5KAFkEGHZ7ZXNiXBIACkNWVp_9-5a3oQ9vPGm409OgVFXLkN0hZhs9XBJLLD5-PTNFQV5AEkw2BkRJUytDCyo", "сообщение": { "данные": "eyJzbiI6IjIwOjE5OkFCOkY0OjI3OjFCIiwiZGF0YSI6eyJhY2MiOnsieCI6MjYsInkiOjMyLCJ6IjoxMDEyLCJ1bml0IjoibUcifSwiZ3lybyI6eyJ4IjoxMjIwLCJ5IjotNjgzNSwieiI6LTIzMTksInVuaXQiOiJtZGVnL3MifSwibWFnIjp7IngiOjQwLCJ5IjoxLCJ6IjotNCwidW5pdCI6InVUIn0sImxpZ2h0Ijp7InZhbHVlIjoxMzU1NywidW5pdCI6Im1MdXgifSwidGVtcCI6eyJ2YWx1ZSI6NTAwMDAsInVuaXQiOiJtQ2Vsc2l1cyJ9LCJwcmVzc3VyZSI6eyJ2YWx1ZSI6OTg4OTcsInVuaXQiOiJQYXNjYWwifSwiaHVtaWRpdHkiOnsidmFsdWUiOjM5LCJ1bml0IjoiJXJoIn19fQ ==", «атрибутs ": {" projectId ":" mimic -gration-10-2019 "," deviceId ":" mimic1 "," deviceNumId ":" 2683064391811245 "," deviceRegistryId ":" mimic-registry "," deviceRegistryLocation ":" us-central1 "," subFolder ":" "}," messageId ":" 789146468611865 "," publishTime ":" 2019-10-14T13: 49: 47.862Z "}}]}