openapi: 3.0.2
x-explorer-enabled: false
x-samples-languages:
- curl
- node
- java
- javascript
- python
- go
info:
title: Routing - Queue Metrics
description: 'Queue Metrics are statistical measures related to the operation of a contact center match queue, such as the
number of agents that are ready, the number of agents that are busy, and the expected wait time. A match queue is used
to identify a pool of contact center agents for which Customer engagements can be matched and routed.
'
contact:
name: Avaya API Team
url: https://developers.avayacloud.com/onecloud-ccaas
email: apiteam@avaya.com
license:
name: Avaya Software Development Kit (SDK) Software License Terms
url: http://support.avaya.com/css/P8/documents/101038288
version: 1.0.1
tags:
- name: Queue Metrics
description: 'Metrics associated with a routing queue.
'
servers:
- url: '{protocol}://{server}{basePath}'
description: Open API
variables:
protocol:
enum:
- https
default: https
server:
default: HOST-REGION.api.avayacloud.com
basePath:
default: /api/queue-metrics/v1
- url: '{protocol}://{server}:{port}'
description: Internal API
variables:
protocol:
enum:
- http
- https
default: http
server:
default: vrc-metrics-aggregator-service
port:
enum:
- '80'
- '443'
default: '80'
paths:
/accounts/{accountId}/queues/{queueId}/channels/{channelId}/metrics:
get:
tags:
- Queue Metrics
summary: Request Metrics
description: "Request to obtain metrics for a match queue. \n\nThe client will send a request for metrics for the specified\
\ queue, channel, attributes and priority, upon successful calculation of the metrics the server will respond back\
\ with a list of the calculated queue metrics. \n\nQueue metrics are statistical measures related to the operation\
\ of a contact center queue. These metrics include measures related to engagements that are queued, and to the agents\
\ that staff the queue.\n"
operationId: getMetricsRequestPriorityAttributesOptional
parameters:
- $ref: '#/components/parameters/accountId'
- $ref: '#/components/parameters/queueId'
- $ref: '#/components/parameters/channelId'
- $ref: '#/components/parameters/attributes'
- $ref: '#/components/parameters/priority'
responses:
'200':
description: Returned Metrics.
content:
application/json:
schema:
$ref: '#/components/schemas/SynchronousMetricsResponse'
examples:
MetricsResponse:
$ref: '#/components/examples/MetricsResponse'
MetricsQueueResponse:
$ref: '#/components/examples/MetricsQueueResponse'
MetricsDefaultResponse:
$ref: '#/components/examples/MetricsDefaultResponse'
'400':
description: 'Constraint violation in the request.
Reasons such as Queue can''t be null, Attributes can''t be empty in a queue, Attributes must contain 10 or less
attributes.
'
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
examples:
default:
$ref: '#/components/examples/ErrorConstraintViolation'
'401':
description: Unauthorized.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
examples:
default:
$ref: '#/components/examples/ErrorUnauthorized'
'403':
description: Forbidden.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
examples:
default:
$ref: '#/components/examples/ErrorForbidden'
'404':
description: Not Found.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
examples:
default:
$ref: '#/components/examples/ErrorNotFound'
'500':
description: Internal Server Error.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
examples:
default:
$ref: '#/components/examples/ErrorInternalServerError'
security:
- {}
- BearerAuth: []
AppKey: []
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
description: This API uses Bearer Token Authorization Flow
bearerFormat: JWT
AppKey:
type: apiKey
in: header
name: appkey
description: This API needs an appKey as header
parameters:
accountId:
name: accountId
in: path
description: The unique 6 character internal id that represents the customer account
required: true
schema:
type: string
minLength: 6
maxLength: 6
pattern: ^[a-zA-Z]{6}$
example: ABCDEF
queueId:
name: queueId
in: path
description: The unique uuid of the queue. Only valid Contact Center Queue Id's are accepted
required: true
schema:
type: string
minLength: 36
maxLength: 36
pattern: ^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$
example: bea76b16-5aff-4cd6-8db0-5d8d649dd865
channelId:
name: channelId
in: path
description: The id representing the Contact Center Channel. Only valid Contact Center Channel Id's are accepted. See
Channel page in CCaaS Fundamentals section of Developer Guides for a list of supported Channel Id's.
required: true
schema:
type: string
minLength: 3
maxLength: 256
example: Voice
attributes:
name: attributes
in: query
description: Attributes are used to describe the skills of the agents. A max of 10 attributes per queue are allowed,
and the Attribute format must follow the 'X.X' style, for example 'CategoryName.AttributeName'. Engagements are typically
routed to a suitable agent that shares the same attribute combination that make up a queue. Queue metrics results
for queues with attributes may be less favorable than queue metrics without attributes, as only a subset of the agent
pool may be configured to handle requests with the additional attributes.
required: false
schema:
type: array
items:
type: string
maxLength: 256
minItems: 0
maxItems: 10
example:
- Language.English
- Product.Landline
priority:
name: priority
in: query
description: The priority of this queue request. The smaller the number meaning the higher the priority.
required: false
schema:
type: integer
format: int32
minimum: 1
maximum: 10
example: 3
schemas:
SynchronousMetricsResponse:
description: The synchronous metrics response.
type: object
required:
- accountId
- matchQueue
properties:
accountId:
description: The unique 6 character internal id that represents the customer account
type: string
matchQueue:
$ref: '#/components/schemas/MatchQueue'
metricType:
description: The type of metrics returned, default or calculated based on attributes
type: string
enum:
- QUEUE
- SPECIALIZED_QUEUE
- DEFAULT
metrics:
description: The queue metrics that were requested.
type: array
items:
$ref: '#/components/schemas/Metrics'
MatchQueue:
description: The Match Queue defines the properties that are used in the matching of engagements against a pool of contact
center agents.
type: object
required:
- queueId
- channelId
properties:
queueId:
description: The unique uuid of the queue. Only valid Contact Center Queue Id's are accepted.
type: string
minLength: 36
maxLength: 36
pattern: ^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$
channelId:
description: The id representing the Contact Center Channel. Only valid Contact Center Channel Id's are accepted.
See Channel page in CCaaS Fundamentals section of Developer Guides for a list of supported Channel Id's.
type: string
minLength: 3
maxLength: 256
attributes:
description: 'Attributes are used to describe the skills of the agents. A max of 10 attributes per queue are allowed,
and the Attribute format must follow the ''X.X'' style, for example ''CategoryName.AttributeName''. Engagements
are typically routed to a suitable agent that shares the same attribute combination that make up a queue. Queue
metrics results for queues with attributes may be less favorable than queue metrics without attributes, as only
a subset of the agent pool may be configured to handle requests with the additional attributes.
'
type: array
minItems: 0
maxItems: 10
items:
type: string
minLength: 3
maxLength: 101
pattern: ^[^\s|\[\*`/?=;,.\]]([^\[\*`/?=;,.\]]{0,48}[^\s|\[\*`/?=;,.\]])?\.[^\s|\[\*`/?=;,.\]]([^\[\*`/?=;,.\]]{0,48}[^\s|\[\*`/?=;,.\]])?$
priority:
description: 'Represents the priority of the Engagements for the requested queue, channel and attributes. If ''Priority''
is not specified then the Engagement metrics returned will be an aggregate of all the Engagements across all priorities
currently in Queue. If ''Priority'' is specified then the Engagement metrics returned are for engagements with
the specified Priority in that Queue. Metrics for higher priority requests against a queue will have more favorable
queue metrics (e.g. lower queue wait times). Match requests made with a higher priority will be handled before
lower priority requests. The smaller the number meaning the higher the priority.
'
type: integer
format: int32
minimum: 1
maximum: 10
Metrics:
description: The metrics relating to the queue.
type: object
required:
- metricName
- metricValue
properties:
metricName:
description: The name of the metric eg. AgentStaffedCount, ExpectedWaitTime. See Queue Metrics table in Developer
Guides for list of available metrics.
type: string
metricValue:
description: The corresponding value of the metric e.g. value of 10 for AgentStaffedCount. See Queue Metrics table
in Developer Guides for possible values for each metric.
type: string
Problem:
type: object
description: 'Problem Detail as a way to carry machine-readable details of errors in a HTTP response to avoid
the need to define new error response formats for HTTP APIs RFC 7807
'
properties:
type:
type: string
format: uri
description: 'An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable
documentation for the problem type (e.g., using HTML).
'
default: about:blank
example: https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#constraint-violation
title:
type: string
description: 'A short, summary of the problem type. Written in english and readable for engineers (usually not suited
for non technical stakeholders and not localized).
'
example: Service Unavailable
nullable: true
status:
type: integer
format: int32
description: 'The HTTP status code generated by the origin server for this occurrence of the problem.
'
minimum: 100
maximum: 600
exclusiveMaximum: true
example: 503
nullable: true
detail:
type: string
description: 'A human readable explanation specific to this occurrence of the problem.
'
example: Connection to database timed out
nullable: true
instance:
type: string
format: uri
description: 'An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further
information if dereferenced.
'
nullable: true
violations:
type: array
description: 'A list of violations that occurred as a result of invalid data provided as part of a request.
'
nullable: true
items:
type: object
properties:
field:
type: string
description: 'The name of the field in the request that caused the violation. This can be the name of a path
parameter, query parameter, or a field within the request body.
'
example: accountId
message:
type: string
description: 'A human readable explanation specific to this occurrence of the violation.
'
example: must match "^[a-zA-Z]{6}$"
code:
type: integer
format: int32
description: 'The violation code generated by the server for this occurrence of the violation. Use this code
when implementing any error handling logic instead of the message, as the message can change.
'
example: 20006
example:
- field: emailAddress
message: must not be null
code: 20002
- field: accountId
message: must match "^[a-zA-Z]{6}$"
code: 20006
examples:
MetricsResponse:
description: Metrics response example.
value:
accountId: ABCDEF
matchQueue:
queueId: bea76b16-5aff-4cd6-8db0-5d8d649dd865
channelId: Voice
attributes:
- Language.English
- Product.Landline
priority: 3
metricType: SPECIALIZED_QUEUE
metrics:
- metricName: agentStaffedCount
metricValue: '10'
- metricName: agentReadyCount
metricValue: '5'
- metricName: agentBusyCount
metricValue: '5'
- metricName: waitingEngagementCount
metricValue: '2'
- metricName: processingEngagementCount
metricValue: '3'
- metricName: oldestEngagementWaiting
metricValue: '30'
- metricName: rollingASA
metricValue: '10'
- metricName: queueOccupancy
metricValue: '100'
- metricName: expectedWaitTime
metricValue: '10'
MetricsQueueResponse:
description: Queue based metrics response, calculated metrics will be available soon.
value:
accountId: ABCDEF
matchQueue:
queueId: bea76b16-5aff-4cd6-8db0-5d8d649dd865
channelId: Voice
attributes:
- Language.English
- Product.Landline
priority: 3
metricType: QUEUE
metrics:
- metricName: agentStaffedCount
metricValue: '0'
- metricName: agentReadyCount
metricValue: '0'
- metricName: agentBusyCount
metricValue: '0'
- metricName: waitingEngagementCount
metricValue: '0'
- metricName: processingEngagementCount
metricValue: '0'
- metricName: oldestEngagementWaiting
metricValue: '0'
- metricName: rollingASA
metricValue: '0'
- metricName: queueOccupancy
metricValue: '0'
- metricName: expectedWaitTime
metricValue: '9999'
MetricsDefaultResponse:
description: Default metrics response.
value:
accountId: ABCDEF
matchQueue:
queueId: bea76b16-5aff-4cd6-8db0-5d8d649dd865
channelId: Voice
attributes:
- Language.English
- Product.Landline
priority: 3
metricType: DEFAULT
metrics:
- metricName: agentStaffedCount
metricValue: '0'
- metricName: agentReadyCount
metricValue: '0'
- metricName: agentBusyCount
metricValue: '0'
- metricName: waitingEngagementCount
metricValue: '0'
- metricName: processingEngagementCount
metricValue: '0'
- metricName: oldestEngagementWaiting
metricValue: '0'
- metricName: rollingASA
metricValue: '0'
- metricName: queueOccupancy
metricValue: '0'
- metricName: expectedWaitTime
metricValue: '9999'
ErrorConstraintViolation:
description: Constraint Violation
value:
type: https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#constraint-violation
title: Constraint Violation
status: 400
detail: A problem that indicates a syntactically correct, yet semantically illegal request. The Server can not process
this request until the client resolves the semantic errors described in the violations section.
violations:
- field: channelId
message: size must be between 3 and 256
code: 20003
ErrorUnauthorized:
description: Unauthorized
value:
type: https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#unauthorized
title: Unauthorized
status: 401
detail: This operation requires authentication. See https://developers.avayacloud.com/onecloud-ccaas/docs/how-to-authenticate-with-ccaas-apis
ErrorForbidden:
description: Forbidden
value:
type: https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#forbidden
title: Forbidden
status: 403
detail: According to the access control policy the current user and/or accountId does not have permission to access
this resource.
ErrorNotFound:
description: Not Found
value:
type: https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#not-found
title: Not Found
status: 404
detail: Either there is no API method associated with the URL path of the request, or the request refers to one or
more resources that were not found.
ErrorInternalServerError:
description: Server Error
value:
type: https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#server-error
title: Server Error
status: 500
detail: An internal server error was encountered.