messaging.broker-core.0.1.49.source-code.swagger.yaml Maven / Gradle / Ivy
swagger: '2.0'
info:
version: 1.0.0
title: Broker Admin API
description: Message Broker Management API
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
schemes:
- https
- http
securityDefinitions:
basicAuth:
type: basic
# Apply to the whole API
security:
- basicAuth: []
basePath: /broker/v1.0
produces:
- application/json
paths:
/queues:
get:
operationId: getAllQueues
summary: Get all queues
description: |
Gets metadata of all the queues in the broker. This includes durable
and non durable queues.
produces:
- application/json
parameters:
- in: query
name: durable
type: boolean
required: false
description: filter queues by durability
responses:
'200':
description: List of queues
schema:
type: array
items:
$ref: '#/definitions/QueueMetadata'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
post:
operationId: createQueue
summary: Creates a queue
consumes:
- application/json
parameters:
- in: body
name: body
description: Queue create request
required: true
schema:
$ref: '#/definitions/QueueCreateRequest'
responses:
'201':
description: Queue created.
schema:
$ref: '#/definitions/QueueCreateResponse'
'400':
description: Bad Request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'415':
description: >-
Unsupported media type. The entity of the request was in a not
supported format.
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
/queues/{name}:
parameters:
- in: path
name: name
type: string
required: true
description: Name of the queue
get:
operationId: getQueue
summary: Get a specific queue
description: Gets metadata of the specified queue.
responses:
'200':
description: Metadata of the queue
schema:
$ref: '#/definitions/QueueMetadata'
'404':
description: Queue not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
delete:
operationId: deleteQueue
summary: Delete the specified queue.
description: >-
Delete the specified queue if the queue exists in the broker and the
query param properties ifUnused and ifEmpty are satisfied.
produces:
- application/json
parameters:
- in: query
name: ifUnused
type: boolean
required: false
default: true
description: >-
If set to true, queue will be deleted only if the queue has no
active consumers.
- in: query
name: ifEmpty
type: boolean
required: false
default: true
description: 'If set to true, queue will be deleted only if the queue is empty.'
responses:
'200':
description: Queue deleted
schema:
$ref: '#/definitions/MessageDeleteResponse'
'400':
description: Bad request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'404':
description: Queue not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
/queues/{name}/consumers:
get:
operationId: getAllConsumersForQueue
summary: Get all consumers of a queue
description: Retrieves all the consumers for the queue
parameters:
- in: path
name: name
type: string
required: true
description: Name of the queue
produces:
- application/json
responses:
'200':
description: Consumers of the queue
schema:
type: array
items:
$ref: '#/definitions/ConsumerMetadata'
'404':
description: Queue not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
/queues/{name}/messages:
parameters:
- in: path
name: name
type: string
required: true
description: Name of the queue
delete:
operationId: purgeMessages
summary: purge messages
description: Purge all messages in the queue
responses:
'200':
description: Queue purged
schema:
$ref: '#/definitions/MessageDeleteResponse'
'404':
description: Queue/Consumer not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
/queues/{name}/consumers/{consumerId}:
parameters:
- in: path
name: name
type: string
required: true
description: Name of the queue
- in: path
name: consumerId
type: integer
required: true
description: Unique consumer identifier
get:
operationId: getConsumer
summary: Get a specific consumer
description: Retrieves a specific consumer for a given queue
produces:
- application/json
responses:
'200':
description: Consumers of the queue
schema:
$ref: '#/definitions/ConsumerMetadata'
'404':
description: Queue/Consumer not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
delete:
operationId: deleteConsumer
summary: delete a consumer
description: Delete a specific consumer from a queue
responses:
'200':
description: Consumer deleted
'404':
description: Queue/Consumer not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
/queues/{name}/bindings:
post:
operationId: createBinding
summary: Create a binding
description: Create a binding for a queue
consumes:
- application/json
parameters:
- in: path
name: name
type: string
required: true
description: Name of the queue to bind to
- in: body
name: body
required: true
description: Payload of binding creation request
schema:
$ref: '#/definitions/BindingCreateRequest'
responses:
'201':
description: Binding created
schema:
$ref: '#/definitions/BindingCreateResponse'
'400':
description: Bad Request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'415':
description: >-
Unsupported media type. The entity of the request was in a not
supported format.
schema:
$ref: '#/definitions/Error'
'404':
description: Exchange not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
/queues/{name}/bindings/{bindingPattern}:
parameters:
- in: path
name: name
type: string
required: true
description: Name of the queue
- in: path
name: bindingPattern
type: string
required: true
description: Binding pattern for the bindings
- in: query
name: filterExpression
type: string
required: false
description: JMS selector relater message filter pattern
delete:
operationId: deleteBinding
summary: Unbind a queue
description: Delete a specific binding
produces:
- application/json
responses:
'200':
description: Binding deleted
'400':
description: Bad request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'404':
description: Binding not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
get:
operationId: getBinding
summary: Retrieve bindings for a queue with specific binding pattern
produces:
- application/json
responses:
'200':
description: Binding info
schema:
$ref: '#/definitions/BindingInfo'
'404':
description: Exchange not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
/queues/{name}/permissions/owner/:
parameters:
- in: path
name: name
type: string
required: true
description: Name of the queue
put:
operationId: changeQueueOwner
summary: Change the owner of the queue
parameters:
- in: body
name: Change owner request
required: true
description: Payload with the name of the new owner username
schema:
$ref: '#/definitions/ChangeOwnerRequest'
consumes:
- application/json
produces:
- application/json
responses:
'204':
description: Queue owner updated.
'400':
description: Bad Request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'415':
description: >-
Unsupported media type. The entity of the request was in a not
supported format.
schema:
$ref: '#/definitions/Error'
'409':
description: Duplicate resource
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication Data is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
'403':
description: Requested action unauthorized.
schema:
$ref: '#/definitions/Error'
/queues/{name}/permissions/actions/{action}/groups:
parameters:
- in: path
name: name
type: string
required: true
description: Name of the queue.
- in: path
name: action
type: string
required: true
description: Name of the action.
post:
operationId: addQueueActionUserGroups
summary: Add new user group(s) for a particular action on the queue.
description: Grant queue permission for new user group(s).
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
required: true
description: Payload with set of user groups.
schema:
$ref: '#/definitions/UserGroupList'
responses:
'200':
description: User groups added.
schema:
$ref: '#/definitions/ResponseMessage'
'400':
description: Bad Request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'415':
description: >-
Unsupported media type. The entity of the request was in a not
supported format.
schema:
$ref: '#/definitions/Error'
'409':
description: Duplicate resource
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication Data is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
'403':
description: Requested action unauthorized.
schema:
$ref: '#/definitions/Error'
/queues/{queueName}/permissions/actions/{action}/groups/{groupName}:
parameters:
- in: path
name: queueName
type: string
required: true
description: Name of the queue.
- in: path
name: action
type: string
required: true
description: Name of the action.
- in: path
name: groupName
type: string
required: true
description: Name of the user group
delete:
operationId: deleteQueueUserGroup
summary: Remove permission to an action from a user group for a queue.
description: Revoke permissions for a user group from invoking a particular action on a specific queue.
produces:
- application/json
responses:
'200':
description: User group removed.
schema:
$ref: '#/definitions/ResponseMessage'
'400':
description: Bad Request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'415':
description: >-
Unsupported media type. The entity of the request was in a not
supported format.
schema:
$ref: '#/definitions/Error'
'409':
description: Duplicate resource
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication Data is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
'403':
description: Requested action unauthorized.
schema:
$ref: '#/definitions/Error'
/exchanges:
get:
operationId: getAllExchanges
summary: Get all exchanges
description: Retrieves all the exchanges in the broker
produces:
- application/json
responses:
'200':
description: List of exchanges
schema:
type: array
items:
$ref: '#/definitions/ExchangeMetadata'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
post:
operationId: createExchange
summary: Create an exchange
consumes:
- application/json
parameters:
- in: body
name: body
description: Exchange create request
required: true
schema:
$ref: '#/definitions/ExchangeCreateRequest'
responses:
'201':
description: Exchange created
schema:
$ref: '#/definitions/ExchangeCreateResponse'
'400':
description: Bad Request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'415':
description: >-
Unsupported media type. The entity of the request was in a not
supported format.
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
/exchanges/{name}:
parameters:
- in: path
name: name
type: string
required: true
description: Name of the exchange.
get:
operationId: getExchange
summary: Get a specific exchange
description: Retrieves the exchange metadata for the specific exchange
produces:
- application/json
responses:
'200':
description: Metadata of the exchange
schema:
$ref: '#/definitions/ExchangeMetadata'
'404':
description: Exchange not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
delete:
operationId: deleteExchange
summary: Delete exchnage
description: Delete the exchange with the specified exchange name
parameters:
- in: query
name: ifUnused
type: boolean
required: false
description: Delete if the exchange has no bindings.
default: true
responses:
'200':
description: Exchange deleted
'400':
description: Bad request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'404':
description: Exchange not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
/exchanges/{name}/bindings:
parameters:
- in: path
name: name
type: string
required: true
description: Name of the exchange.
get:
operationId: getAllBindingsForExchange
summary: Get bindings of a exchange
description: Retrieves the bindings set of the exchange
produces:
- application/json
responses:
'200':
description: List of Bindings
schema:
type: array
items:
$ref: '#/definitions/BindingSetInfo'
'404':
description: Exchange not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication information is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
/exchanges/{name}/permissions/owner/:
parameters:
- in: path
name: name
type: string
required: true
description: Name of the exchange
put:
operationId: changeExchangeOwner
summary: Change the owner of the exchange
parameters:
- in: body
name: Change owner request
required: true
description: Payload with the name of the new owner username
schema:
$ref: '#/definitions/ChangeOwnerRequest'
consumes:
- application/json
produces:
- application/json
responses:
'204':
description: Exchange owner updated.
'400':
description: Bad Request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'415':
description: >-
Unsupported media type. The entity of the request was in a not
supported format.
schema:
$ref: '#/definitions/Error'
'409':
description: Duplicate resource
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication Data is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
'403':
description: Requested action unauthorized.
schema:
$ref: '#/definitions/Error'
/exchanges/{name}/permissions/actions/{action}/groups:
parameters:
- in: path
name: name
type: string
required: true
description: Name of the exchange.
- in: path
name: action
type: string
required: true
description: Name of the action.
post:
operationId: addExchangeActionUserGroups
summary: Add new user group(s) for a particular action on the exchange.
description: Grant exchange permission for new user group(s).
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
required: true
description: Payload with set of user groups.
schema:
$ref: '#/definitions/UserGroupList'
responses:
'200':
description: User groups added.
schema:
$ref: '#/definitions/ResponseMessage'
'400':
description: Bad Request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'415':
description: >-
Unsupported media type. The entity of the request was in a not
supported format.
schema:
$ref: '#/definitions/Error'
'409':
description: Duplicate resource
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication Data is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
'403':
description: Requested action unauthorized.
schema:
$ref: '#/definitions/Error'
/exchanges/{exchangeName}/permissions/actions/{action}/groups/{groupName}:
parameters:
- in: path
name: exchangeName
type: string
required: true
description: Name of the exchange.
- in: path
name: action
type: string
required: true
description: Name of the action.
- in: path
name: groupName
type: string
required: true
description: Name of the user group
delete:
operationId: deleteExchangeUserGroup
summary: Remove permission to an action from a user group for an exchange.
description: Revoke permissions for a user group from invoking a particular action on a specific exchange.
produces:
- application/json
responses:
'200':
description: User group removed.
schema:
$ref: '#/definitions/ResponseMessage'
'400':
description: Bad Request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'415':
description: >-
Unsupported media type. The entity of the request was in a not
supported format.
schema:
$ref: '#/definitions/Error'
'409':
description: Duplicate resource
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication Data is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
'403':
description: Requested action unauthorized.
schema:
$ref: '#/definitions/Error'
/scopes:
get:
operationId: getAllScopes
summary: Get all scopes
description: Retrieves all scopes
produces:
- application/json
responses:
'200':
description: List of Scopes
schema:
type: array
items:
$ref: '#/definitions/Scope'
'401':
description: Authentication Data is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
/scopes/{name}:
get:
operationId: getScope
summary: Get a scope
description: Retrieves scope for given scope name
parameters:
- in: path
name: name
type: string
required: true
description: Name of the scope
produces:
- application/json
responses:
'200':
description: Scope
schema:
$ref: '#/definitions/Scope'
'404':
description: Scope not found
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication Data is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
put:
operationId: updateScope
summary: Update a scope
description: Update given scope
consumes:
- application/json
parameters:
- in: path
name: name
type: string
required: true
description: Name of the scope needs to update
- in: body
name: body
required: true
description: Payload of scope update request
schema:
$ref: '#/definitions/ScopeUpdateRequest'
responses:
'200':
description: Scope updated
schema:
$ref: '#/definitions/ScopeUpdateResponse'
'400':
description: Bad Request. Invalid request or validation error.
schema:
$ref: '#/definitions/Error'
'401':
description: Authentication Data is missing or invalid
headers:
WWW_Authenticate:
type: string
schema:
$ref: '#/definitions/Error'
'404':
description: Scope key not found
schema:
$ref: '#/definitions/Error'
'415':
description: >-
Unsupported media type. The entity of the request was in a not
supported format.
schema:
$ref: '#/definitions/Error'
definitions:
ConsumerMetadata:
title: Consumer Metadata
type: object
required:
- id
- consumerTag
- flowEnabled
- isExclusive
properties:
id:
type: integer
description: unique id of the consumer
consumerTag:
type: string
description: identifier given by the channel
isExclusive:
type: boolean
description: State whether only this consumer can consume from the queue.
flowEnabled:
type: boolean
description: State whether the consumers is actively consuming messages
QueueCreateRequest:
title: Queue Create Request
type: object
required:
- name
- durable
- autoDelete
properties:
name:
type: string
description: Name of the queue to be created
durable:
type: boolean
description: 'True if the queue is durable, false otherwise'
autoDelete:
type: boolean
description: deletes the queue when there are no consumers for the queue.
QueueMetadata:
title: Queue Metadata
type: object
required:
- name
- consumerCount
- durable
- capacity
- size
- autoDelete
properties:
name:
type: string
description: Name of the queue. This is a unique value
consumerCount:
type: integer
description: >-
number of active consumers assigned to the queue. Messages will be
dispatched in a round robing manner to the consumers.
durable:
type: boolean
description: >-
durability of the queue. True if the queue is durable and false
otherwise. Durable queues will survive node failures.
capacity:
type: integer
description: >-
Maximum number of messages the queue can hold. Durable queues are
unbounded and will specify the integer max value (2,147,483,647) as
the capacity.
size:
type: integer
description: Number of messages in the queue.
autoDelete:
type: boolean
description: >-
If set to true queue will get deleted once all the consumers of the
queue get disconnected.
owner:
type: string
description: Queue owner
permissions:
type: array
description: Queue action User groups permissions
items:
$ref : '#/definitions/ActionUserGroupsMapping'
QueueCreateResponse:
title: Queue Create Response
type: object
required:
- message
properties:
message:
type: string
description: Response message with status of the queue create operation.
ExchangeMetadata:
title: Exchange Metadata
type: object
properties:
name:
type: string
description: Name of the exchange
type:
type: string
description: 'Type of exchange. for instance amq.direct, amq.topic'
durable:
type: boolean
description: True if the exchange is durable and false otherwise
owner:
type: string
description: Queue owner
permissions:
type: array
description: Queue action User groups permissions
items:
$ref : '#/definitions/ActionUserGroupsMapping'
ExchangeCreateRequest:
title: Exchange Create Request
type: object
required:
- name
- type
- durable
properties:
name:
type: string
description: Name of the exchange. This should be a unique value
type:
type: string
description: Type of exchange
durable:
type: boolean
description: States whether the exchange is durable or not
ExchangeCreateResponse:
title: Exchange Create Response
type: object
required:
- message
properties:
message:
type: string
description: Response message with status of the exchange create operation.
ExchangeUpdateRequest:
title: Exchange Authorization Update Request
type: object
properties:
owner:
type: string
description: Owner of exchange
authorizedUserGroups:
type: array
description: Exchange action User groups mappings
items:
$ref : '#/definitions/ActionUserGroupsMapping'
ExchangeUpdateResponse:
title: Exchange Authorization Update Response
type: object
required:
- message
properties:
message:
type: string
description: Response message with status of the Exchange authorization update operation.
BindingSetInfo:
title: Bindings for a given routing pattern
type: object
properties:
bindingPattern:
type: string
description: Binding pattern used for routing messages
bindings:
type: array
description: Set of bindings for a given routing key
items:
type: object
properties:
queueName:
type: string
description: Bound queue name
filterExpression:
type: string
description: JMS selector relater message filter pattern
BindingInfo:
title: Binding Information
type: object
required:
- bindingPattern
properties:
bindingPattern:
type: string
description: Routing pattern of the binding
queueName:
type: string
description: Bound queue name
filterExpression:
type: string
description: message filtering expression
BindingCreateRequest:
title: Binding Create Request
type: object
required:
- bindingPattern
- exchangeName
properties:
bindingPattern:
type: string
description: Binding pattern that should routing keys
exchangeName:
type: string
description: Name of the exchange to bind to
filterExpression:
type: string
description: JMS selector relater message filter pattern
BindingCreateResponse:
title: Binding Create Response
type: object
required:
- message
properties:
message:
type: string
description: Response message with status of the binding create operation.
MessageDeleteResponse:
title: Queue Purge Response
type: object
required:
- numberOfMessagesDeleted
properties:
numberOfMessagesDeleted:
type: integer
description: Response message with number of messages deleted.
Scope:
title: Scope
type: object
required:
- name
- userGroups
properties:
name:
type: string
description: Scope name
authoriedUserGroups:
type: array
description: User groups of the scope
items:
type: string
description: User group
ScopeUpdateRequest:
title: User Groups Delete Requet
type: object
required:
- userGroups
properties:
userGroups:
type: array
description: Set of user groups for a scope
items:
type: string
description: user group
ScopeUpdateResponse:
title: User Group Delete Response
type: object
required:
- message
properties:
message:
type: string
description: Response message with status of the user groups delete operation.
Error:
title: Error Response
required:
- code
- message
properties:
code:
type: integer
format: int64
message:
type: string
description: Error message.
ActionUserGroupsMapping:
title: Resource action user groups permissions
type: object
required:
- permissions
properties:
action:
type: string
description: Resource action
userGroups:
type: array
description: Set of user groups for a scope
items:
type: string
description: User group
UserGroupList:
title: User group array.
type: object
required:
- userGroups
properties:
userGroups:
type: array
description: Set of user groups.
items:
type: string
description: Name of the user group.
ResponseMessage:
title: General response message
type: object
required:
- message
properties:
message:
type: string
description: Descriptive response message.
ChangeOwnerRequest:
title: Change owner of a Resource.
type: object
required:
- owner
properties:
owner:
type: string
description: Username of the new owner
© 2015 - 2024 Weber Informatics LLC | Privacy Policy