Pull messages from the server
  • 26 Mar 2024
  • 4 Minutes to read
  • Dark
    Light

Pull messages from the server

  • Dark
    Light

Article summary

Post
/v2/tenants/{tenantId}/projects/{projectId}/subscriptions/{sub}:pull

Pull certain number of messages from the server.

Security
API Key
Header parameter nameAuthorization

AWS Cognito Authorizer. Since there are no custom scopes the ID Token must be used for authorization

Header parameters
Content-Type
stringRequired
Path parameters
tenantId
stringRequired

The RapidIdentity Cloud tenant id

projectId
stringRequired

The project id this service belongs (i.e. sm, idhub, ric)

sub
stringRequired

The queue name.

Body parameters

The number of messages to pull from the queue.

maxMessagesExample

Retrieving up to 5 messages from queue

{
  "maxMessages": 5
}
object
maxMessages
integer Required

The maximum number of messages to return from this request. Must be a positive integer. The Pub/Sub system may return fewer than the number specified

Responses
200

An array of messages

Headers
Content-Type
string
Content-Length
string
Cache-Control
string
Expand All
object
receivedMessages
Array of object (ReceivedMessage)

The messages that were received

object
ackId
string

Optional. This ID can be used to acknowledge the received message.

message
object (PubsubMessage)
data
string (bytes)

Optional. The message data. If this field is empty, the message must contain at least one attribute

A base64-encoded string

attributes
object

Optional. Metadata attributes for this message. If this field is empty, the message must contain non-empty data

messageId
string

Optional. ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value must not be populated by the publisher. Read-Only

publishTime
string (Timestamp)

Optional. The time at which the message was published, populated by the server when the message is published. Read-Only

400

An issue with how the request was formatted

Headers
Content-Type
string
Content-Length
string
Cache-Control
string
Expand All
object
error
object

The error message description

errors
Array of object

The more detailed information about the error message

object
domain
string

The service where the error occured. i.e. sm, idhub

reason
string

The reason for the error based on Identity Automation common error codes

message
string

Additional details about the error

locationType
string

The specific location where the error occurred. i.e. parameter, content

location
string

The higher level location of what was trying to be accessed. i.e. pullMessages, publishMessage

code
string

The http status code

message
string

Additional details about the error

401

The request is not authorized. Ensure you are using an ID Token in your request and it is not expired

Headers
Content-Type
string
Content-Length
string
Cache-Control
string
Expand All
object
error
object

The error message description

errors
Array of object

The more detailed information about the error message

object
domain
string

The service where the error occured. i.e. sm, idhub

reason
string

The reason for the error based on Identity Automation common error codes

message
string

Additional details about the error

locationType
string

The specific location where the error occurred. i.e. parameter, content

location
string

The higher level location of what was trying to be accessed. i.e. pullMessages, publishMessage

code
string

The http status code

message
string

Additional details about the error

403

The authorization token does not have access to the RapidIdentity Cloud Tenant. Ensure the tenantId used for authentication is the same one used in this request.

Headers
Content-Type
string
Content-Length
string
Cache-Control
string
Expand All
object
error
object

The error message description

errors
Array of object

The more detailed information about the error message

object
domain
string

The service where the error occured. i.e. sm, idhub

reason
string

The reason for the error based on Identity Automation common error codes

message
string

Additional details about the error

locationType
string

The specific location where the error occurred. i.e. parameter, content

location
string

The higher level location of what was trying to be accessed. i.e. pullMessages, publishMessage

code
string

The http status code

message
string

Additional details about the error

404

The requested operation failed because a resource associated with the request could not be found

Headers
Content-Type
string
Content-Length
string
Cache-Control
string
Expand All
object
error
object

The error message description

errors
Array of object

The more detailed information about the error message

object
domain
string

The service where the error occured. i.e. sm, idhub

reason
string

The reason for the error based on Identity Automation common error codes

message
string

Additional details about the error

locationType
string

The specific location where the error occurred. i.e. parameter, content

location
string

The higher level location of what was trying to be accessed. i.e. pullMessages, publishMessage

code
string

The http status code

message
string

Additional details about the error

405

The operation must be included and it must be pull

Expand All
object
error
object

The error message description

errors
Array of object

The more detailed information about the error message

object
domain
string

The service where the error occured. i.e. sm, idhub

reason
string

The reason for the error based on Identity Automation common error codes

message
string

Additional details about the error

locationType
string

The specific location where the error occurred. i.e. parameter, content

location
string

The higher level location of what was trying to be accessed. i.e. pullMessages, publishMessage

code
string

The http status code

message
string

Additional details about the error

503

Unable to connect to pubsub service

Headers
Content-Type
string
Content-Length
string
Cache-Control
string
Expand All
object
error
object

The error message description

errors
Array of object

The more detailed information about the error message

object
domain
string

The service where the error occured. i.e. sm, idhub

reason
string

The reason for the error based on Identity Automation common error codes

message
string

Additional details about the error

locationType
string

The specific location where the error occurred. i.e. parameter, content

location
string

The higher level location of what was trying to be accessed. i.e. pullMessages, publishMessage

code
string

The http status code

message
string

Additional details about the error


Was this article helpful?