swagger: '2.0' info: title: wazo-agentd description: Agent service version: '1.0' license: name: GPL v3 url: http://www.gnu.org/licenses/gpl.txt contact: name: Wazo Dev Team url: https://wazo-platform.org/ email: dev@wazo.community x-logo: url: https://wazo-platform.org/images/logo-black.svg backgroundColor: '#FAFAFA' altText: Wazo Logo x-xivo-name: agentd x-xivo-port: 9493 schemes: - http securityDefinitions: wazo_auth_token: type: apiKey name: X-Auth-Token in: header security: - wazo_auth_token: [] basePath: /1.0 consumes: - application/json produces: - application/json definitions: Error: title: Error properties: error: type: string description: Error identifier StatusSummary: type: object properties: bus_consumer: $ref: '#/definitions/ComponentWithStatus' service_token: $ref: '#/definitions/ComponentWithStatus' ComponentWithStatus: type: object properties: status: $ref: '#/definitions/StatusValue' StatusValue: type: string enum: - fail - ok AgentStatus: title: Agent status properties: id: type: integer format: int32 description: Agent's ID tenant_uuid: type: string format: uuid description: Tenant's UUID origin_uuid: type: string format: uuid description: Wazo's UUID number: type: string description: Agent's number logged: type: boolean description: True if the agent is logged, else false paused: type: boolean description: True if the agent is paused, else false paused_reason: type: string description: The reason of the agent pause extension: type: string description: The extension on which the agent is logged, or null if the agent is not logged context: type: string description: The context on which the agent is logged, or null if the agent is not logged state_interface: type: string description: The interface (e.g. SIP/alice) to determine if the agent is in use or not queues: type: array description: The agent status for each queue items: $ref: '#/definitions/AgentQueueStatus' AgentQueueStatus: properties: id: type: integer description: Queue's ID name: type: string description: Queue's name display_name: type: string description: Queue's display name logged: type: boolean description: True if the agent is logged on this queue, else false paused: type: boolean description: True if the agent is paused on this queue, else false paused_reason: type: string description: The reason of the agent pause LoginInfo: title: Login information properties: extension: type: string description: Extension context: type: string description: Context endpoint: type: string description: Name of the endpoint, in the format `interface/name` e.g `PJSIP/alice`. Must be a valid endpoint for the extension and context. UserAgentLoginInfo: title: Login information properties: line_id: type: integer description: ID of the line where the agent should be logged Queue: title: Queue properties: queue_id: type: integer description: Queue's ID AgentPauseReason: title: Pause reason information properties: reason: type: string description: Pause Reason paths: /agents/by-id/{agent_id}: get: summary: Get agent status. description: '**Required ACL:** `agentd.agents.by-id.{agent_id}.read`' operationId: get_agent_by_id tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentID' responses: '200': description: The agent status schema: $ref: '#/definitions/AgentStatus' '404': description: Agent does not exist schema: $ref: '#/definitions/Error' /agents/by-number/{agent_number}: get: summary: Get agent status. description: '**Required ACL:** `agentd.agents.by-number.{agent_number}.read`' operationId: get_agent_by_number tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentNumber' responses: '200': description: The agent status schema: $ref: '#/definitions/AgentStatus' '404': description: Agent does not exist schema: $ref: '#/definitions/Error' /agents/by-id/{agent_id}/login: post: summary: Log an agent. description: '**Required ACL:** `agentd.agents.by-id.{agent_id}.login.create`' operationId: login_agent_by_id tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentID' - name: body in: body description: The extension and context on which to log the agent required: true schema: $ref: '#/definitions/LoginInfo' responses: '204': description: The operation was performed successfully '400': description: The context and extension are not in the same tenant as the agent schema: $ref: '#/definitions/Error' '404': description: Agent, extension, context or endpoint does not exist schema: $ref: '#/definitions/Error' '409': description: Agent is already logged or another agent is already logged on this extension and context schema: $ref: '#/definitions/Error' /agents/by-number/{agent_number}/login: post: summary: Log an agent. description: '**Required ACL:** `agentd.agents.by-number.{agent_number}.login.create`' operationId: login_agent_by_number tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentNumber' - name: body in: body description: The extension and context on which to log the agent required: true schema: $ref: '#/definitions/LoginInfo' responses: '204': description: The operation was performed successfully '400': description: The context and extension are not in the same tenant as the agent schema: $ref: '#/definitions/Error' '404': description: Agent, extension, context or endpoint does not exist schema: $ref: '#/definitions/Error' '409': description: Agent is already logged or another agent is already logged on this extension and context schema: $ref: '#/definitions/Error' /users/me/agents: get: summary: Get agent status of the user holding the authentication token. description: '**Required ACL:** `agentd.users.me.agents.read`' operationId: get_user_agent tags: - agents - users parameters: - $ref: '#/parameters/tenantuuid' responses: '200': description: The agent status schema: $ref: '#/definitions/AgentStatus' '404': description: Agent does not exist schema: $ref: '#/definitions/Error' /users/me/agents/login: post: summary: Log the agent of the user holding the authentication token description: '**Required ACL:** `agentd.users.me.agents.login.create`' operationId: login_user_agent tags: - agents - users parameters: - $ref: '#/parameters/tenantuuid' - name: body in: body description: The line on which to log the agent required: true schema: $ref: '#/definitions/UserAgentLoginInfo' responses: '204': description: The operation was performed successfully '400': description: The user does not own the line; or the token has no user; or wrong tenant; or the user has no agent schema: $ref: '#/definitions/Error' '409': description: Agent is already logged or another agent is already logged on this line schema: $ref: '#/definitions/Error' /agents/by-id/{agent_id}/logoff: post: summary: Logoff an agent. description: '**Required ACL:** `agentd.agents.by-id.{agent_id}.logoff.create`' operationId: logoff_agent_by_id tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentID' responses: '204': description: The operation was performed successfully '409': description: Agent does not exist or is not logged schema: $ref: '#/definitions/Error' /agents/by-number/{agent_number}/logoff: post: summary: Logoff an agent. description: '**Required ACL:** `agentd.agents.by-number.{agent_number}.logoff.create`' operationId: logoff_agent_by_number tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentNumber' responses: '204': description: The operation was performed successfully '409': description: Agent does not exist or is not logged schema: $ref: '#/definitions/Error' /users/me/agents/logoff: post: summary: Logoff the agent of the user holding the authentication token description: '**Required ACL:** `agentd.users.me.agents.logoff.create`' operationId: logoff_user_agent tags: - agents - users parameters: - $ref: '#/parameters/tenantuuid' responses: '204': description: The operation was performed successfully '400': description: The token has no user; or wrong tenant; or the user has no agent schema: $ref: '#/definitions/Error' '409': description: Agent is already logged or another agent is already logged on this line schema: $ref: '#/definitions/Error' /agents/by-number/{agent_number}/pause: post: summary: Pause an agent. description: '**Required ACL:** `agentd.agents.by-number.{agent_number}.pause.create`' operationId: pause_agent_by_number tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentNumber' - name: body in: body description: The reason for pausing the agent required: false schema: $ref: '#/definitions/AgentPauseReason' responses: '204': description: The operation was performed successfully '404': description: Agent does not exist schema: $ref: '#/definitions/Error' '409': description: Agent is not logged schema: $ref: '#/definitions/Error' /users/me/agents/pause: post: summary: Pause the agent of the user holding the authentication token description: '**Required ACL:** `agentd.users.me.agents.pause.create`' operationId: pause_user_agent tags: - agents - users parameters: - $ref: '#/parameters/tenantuuid' - name: body in: body description: The reason for pausing the agent required: false schema: $ref: '#/definitions/AgentPauseReason' responses: '204': description: The operation was performed successfully '400': description: The token has no user; or wrong tenant; or the user has no agent schema: $ref: '#/definitions/Error' '409': description: Agent is already logged or another agent is already logged on this line schema: $ref: '#/definitions/Error' /agents/by-number/{agent_number}/unpause: post: summary: Unpause an agent. description: '**Required ACL:** `agentd.agents.by-number.{agent_number}.unpause.create`' operationId: unpause_agent_by_number tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentNumber' responses: '204': description: The operation was performed successfully '404': description: Agent does not exist schema: $ref: '#/definitions/Error' '409': description: Agent is not logged schema: $ref: '#/definitions/Error' /users/me/agents/unpause: post: summary: Unpause the agent of the user holding the authentication token description: '**Required ACL:** `agentd.users.me.agents.unpause.create`' operationId: unpause_user_agent tags: - agents - users parameters: - $ref: '#/parameters/tenantuuid' responses: '204': description: The operation was performed successfully '400': description: The token has no user; or wrong tenant; or the user has no agent schema: $ref: '#/definitions/Error' '409': description: Agent is already logged or another agent is already logged on this line schema: $ref: '#/definitions/Error' /agents/by-id/{agent_id}/add: post: summary: Add agent to a queue. description: '**Required ACL:** `agentd.agents.by-id.{agent_id}.add.create`' operationId: add_agent_by_id tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentID' - name: body in: body description: The queue to add the agent to required: true schema: $ref: '#/definitions/Queue' responses: '204': description: The operation was performed successfully '400': description: The agent and the queue are not in the same tenant schema: $ref: '#/definitions/Error' '404': description: Agent or queue does not exist schema: $ref: '#/definitions/Error' '409': description: Agent is already a member of the queue schema: $ref: '#/definitions/Error' /agents/by-id/{agent_id}/remove: post: summary: Remove agent from a queue. description: '**Required ACL:** `agentd.agents.by-id.{agent_id}.remove.create`' operationId: remove_agent_by_id tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentID' - name: body in: body description: The queue to remove the agent from required: true schema: $ref: '#/definitions/Queue' responses: '204': description: The operation was performed successfully '404': description: Agent or queue does not exist schema: $ref: '#/definitions/Error' '409': description: Agent is not a member of the queue schema: $ref: '#/definitions/Error' /agents/{agent_id}/queues/{queue_id}/login: put: summary: Login agent to queue description: '**Required ACL:** `agentd.agents.{agent_id}.queues.{queue_id}.login.update`' operationId: login_agent_to_queue tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentID' - $ref: '#/parameters/QueueID' responses: '204': description: The operation was performed successfully '400': description: The agent and the queue are not in the same tenant schema: $ref: '#/definitions/Error' '404': description: Agent or queue does not exist schema: $ref: '#/definitions/Error' '409': description: Agent is not logged schema: $ref: '#/definitions/Error' /users/me/agents/queues/{queue_id}/login: put: summary: Login user agent to queue description: '**Required ACL:** `agentd.users.me.agents.queues.{queue_id}.login.update`' operationId: user_agent_login_to_queue tags: - agents - users parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/QueueID' responses: '204': description: The operation was performed successfully '400': description: The token has no user; or wrong tenant; or the user has no agent schema: $ref: '#/definitions/Error' '404': description: Agent or queue does not exist schema: $ref: '#/definitions/Error' '409': description: Agent is not logged schema: $ref: '#/definitions/Error' /agents/{agent_id}/queues/{queue_id}/logoff: put: summary: Logoff agent from queue description: '**Required ACL:** `agentd.agents.{agent_id}.queues.{queue_id}.logoff.update`' operationId: logoff_agent_from_queue tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/AgentID' - $ref: '#/parameters/QueueID' responses: '204': description: The operation was performed successfully '400': description: The agent and the queue are not in the same tenant schema: $ref: '#/definitions/Error' '404': description: Agent or queue does not exist schema: $ref: '#/definitions/Error' '409': description: Agent is not logged schema: $ref: '#/definitions/Error' /users/me/agents/queues/{queue_id}/logoff: put: summary: Logoff user agent from queue description: '**Required ACL:** `agentd.users.me.agents.queues.{queue_id}.logoff.update`' operationId: user_agent_logoff_from_queue tags: - agents - users parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/QueueID' responses: '204': description: The operation was performed successfully '400': description: The token has no user; or wrong tenant; or the user has no agent schema: $ref: '#/definitions/Error' '404': description: Agent or queue does not exist schema: $ref: '#/definitions/Error' '409': description: Agent is not logged schema: $ref: '#/definitions/Error' /agents: get: summary: Get the status of all agents. description: '**Required ACL:** `agentd.agents.read`' operationId: get_agents tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - $ref: '#/parameters/recurse' responses: '200': description: A list of agent status schema: $ref: '#/definitions/AgentStatus' /agents/logoff: post: summary: Logoff all agents. description: '**Required ACL:** `agentd.agents.logoff.create`' operationId: logoff_agents tags: - agents parameters: - $ref: '#/parameters/tenantuuid' responses: '204': description: The operation was performed succesfully /agents/relog: post: summary: Relog all agents. description: '**Required ACL:** `agentd.agents.relog.create` Relog all agents which are currently logged.' operationId: relog_agents tags: - agents parameters: - $ref: '#/parameters/tenantuuid' - name: all_queues in: query type: boolean description: If true, relog each agent into all of its assigned queues, restoring membership for queues from which the agent was previously logged off individually. default: false required: false responses: '204': description: The operation was performed succesfully /status: get: summary: Get the status of wazo-agentd. description: '**Required ACL:** `agentd.status.read`' operationId: get_status tags: - status responses: '200': description: The internal status of wazo-agentd schema: $ref: '#/definitions/StatusSummary' parameters: AgentID: name: agent_id in: path type: integer required: true description: Agent's ID QueueID: name: queue_id in: path type: integer required: true description: Queue's ID recurse: name: recurse in: query type: boolean description: Should the query include sub-tenants default: false required: false tenantuuid: name: Wazo-Tenant type: string in: header description: The tenant's UUID, defining the ownership of a given resource. required: false AgentNumber: name: agent_number in: path description: Agent's number required: true type: string x-apievangelist-source: harvested_from: https://github.com/wazo-platform/wazo-agentd assembly: base plugin api.yml deep-merged with all plugin api.yml fragments, reproducing what the running service serves at /api/agentd/1.0/api/api.yml (see wazo_agentd/plugins/api/http.py — xivo.chain_map.ChainMap) spec_version: Swagger 2.0 (as published by Wazo) harvested: '2026-08-17'