Skip to content

Update pubsub to v1beta2 #414

Description

@ryanseys

The following is a checklist for migrating over to the new v1beta2 pubsub API. It lists the incompatible changes that occurred between the two APIs.

  • All requests now using a new url scheme: https://pubsub.googleapis.com/v1beta2/...

Subscriptions:

  • acknowledge: Move subscription to path parameter from request body.
  • acknowledge: ackId changes to ackIds.
  • create: No longer accepts a name in request body (subscription resource).
  • list: pageSize instead of maxResults.
  • list: project in path parameter.
  • list: no query parameter.
  • list: returns subscriptions instead of subscription in response.
  • pull: subscription moved to path parameter instead of request body.
  • pull: added maxMessages to set max number of messages to pull.
  • pull: response now contains top level receivedMessages and is drastically different response.
  • pullBatch: removed pullBatch.

Topics:

  • create: name now a path parameter instead of in request body.
  • delete: different url scheme for topic name.
  • get: topic name now in path parameter instead of in request body.
  • list: require project in path parameter.
  • list: no query parameter.
  • list: pageSize instead of maxResults.
  • list: returns topics instead of topic in response.
  • publish: topic now a path parameter instead of in request body.
  • publish: request body now takes messages array of messages.
  • publish: response will now return list of messageIds rather than an empty response.
  • publishBatch: removed publishBatch.

NEW:

Activity

  1. tmatsuo commented on Feb 27, 2015

    @tmatsuo
    Contributor

    Great list! Few additions.

    • labels renamed to attributes
    • resource name format changed; /topics/{projectid}/{topicname} to projects/{projectid}/topics/{topicname} and /subscriptions/{projectid}/{subscriptionname} to projects/{projectid}/subscriptions/{subscriptionname}
  2. modified the milestone: Pub/Sub Beta on Feb 28, 2015
  3. added
    api: storageIssues related to the Cloud Storage API.
    api: pubsubIssues related to the Pub/Sub API.
    and removed
    api: storageIssues related to the Cloud Storage API.
    on Mar 3, 2015
  4. self-assigned this
    on Mar 5, 2015
  5. ryanseys commented on Mar 5, 2015

    @ryanseys
    ContributorAuthor

    @tmatsuo So maxResults changed to pageSize, which is documented as "Maximum number of topics to return." Is this the max number of results returned PER PAGE i.e. if I have more results, then it will still give me a page token, or does it mean that it will only show me that many ever? Did this functionality change from the previous API or is it just better (or worsely) documented now?

  6. tmatsuo commented on Mar 6, 2015

    @tmatsuo
    Contributor

    Is this the max number of results returned PER PAGE
    yes, the name of the parameter strongly suggests that.

    if I have more results, then it will still give me a page token
    yes.

    Do you have any suggestions to improve things?

  7. ryanseys commented on Mar 6, 2015

    @ryanseys
    ContributorAuthor

    @tmatsuo I have some feedback. topics/subscriptions/list returns a list of subscription names where as subscriptions/list returns a list of Subscription objects. It would be nice if they both returned Subscription objects if possible.

  8. tmatsuo commented on Mar 6, 2015

    @tmatsuo
    Contributor

    Yes, good eye catching that discrepancy. I think however, this is because topics.subscriptions.list may return subscriptions in other project, and thus the API issuer may not have permission to access them.

  9. ryanseys commented on Mar 7, 2015

    @ryanseys
    ContributorAuthor

    It doesn't make sense that it will show me subscriptions for other projects because we specify a specific project on request. Also why would it show me the names of subscriptions if I don't have access to use them in the first place? This would seem like a violation of permissions. I don't want someone seeing my subscriptions on my project if they don't have access to it.

  10. tmatsuo commented on Mar 7, 2015

    @tmatsuo
    Contributor

    It doesn't make sense that it will show me subscriptions for other projects because we specify a specific project on request.

    Not true. With the bare API, you can create a subscription in project1 attached to a topic in project2.

    This would seem like a violation of permissions. I don't want someone seeing my subscriptions on my project if they don't have access to it.

    When creating that subscription, the creator said explicitly "I subscribe to this topic". So I think seeing only the subscription name with the topic read permission seems OK to me.

    You can't get the internal data of that subscription if you don't have a permission.

  11. 29 remaining items

  12. added a commit that references this issue on Feb 5, 2026
  13. added a commit that references this issue on Feb 23, 2026
  14. added a commit that references this issue on Feb 24, 2026
  15. added a commit that references this issue on Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: pubsubIssues related to the Pub/Sub API.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions