---
title: StationsApi
---
## PureCloud::StationsApi
All URIs are relative to *https://api.mypurecloud.com*
Method | HTTP request | Description
------------- | ------------- | -------------
|[**delete_station_id_associateduser**](StationsApi.html#delete_station_id_associateduser) | **DELETE** /api/v2/stations/{stationId}/associateduser | Unassigns the user assigned to this station|
|[**get_station_id**](StationsApi.html#get_station_id) | **GET** /api/v2/stations/{stationId} | Get station.|
|[**get_stations**](StationsApi.html#get_stations) | **GET** /api/v2/stations | Get the list of available stations.|
{: class="table table-striped"}
## -String** delete_station_id_associateduser(station_id)
Unassigns the user assigned to this station
### Example
~~~ruby
# load the gem
require 'purecloud'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::StationsApi.new
station_id = "station_id_example" # String | Station ID
begin
#Unassigns the user assigned to this station
result = api_instance.delete_station_id_associateduser(station_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling StationsApi->delete_station_id_associateduser: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**station_id** | **String**| Station ID |
{: class="table table-striped"}
### Return type
**String**
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Station**](Station.html) get_station_id(station_id)
Get station.
### Example
~~~ruby
# load the gem
require 'purecloud'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::StationsApi.new
station_id = "station_id_example" # String | Station ID
begin
#Get station.
result = api_instance.get_station_id(station_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling StationsApi->get_station_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**station_id** | **String**| Station ID |
{: class="table table-striped"}
### Return type
[**Station**](Station.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**StationEntityListing**](StationEntityListing.html) get_stations(opts)
Get the list of available stations.
### Example
~~~ruby
# load the gem
require 'purecloud'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::StationsApi.new
opts = {
page_size: 25, # Integer | Page size
page_number: 1, # Integer | Page number
sort_by: "name", # String | Sort by
name: "name_example", # String | Name
line_appearance_id: "line_appearance_id_example" # String | lineAppearanceId
}
begin
#Get the list of available stations.
result = api_instance.get_stations(opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling StationsApi->get_stations: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
**sort_by** | **String**| Sort by | [optional] [default to name]
**name** | **String**| Name | [optional]
**line_appearance_id** | **String**| lineAppearanceId | [optional]
{: class="table table-striped"}
### Return type
[**StationEntityListing**](StationEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json