2N® IP Audio Manager HTTP REST API Manual

Swagger UI

2N® IP Audio Manager REST HTTP API
 v1 

[ Base URL: /api/v1 ]

Info

Simple description of HTTP REST API for IP Audio Manager control. File can be viewed using http://editor.swagger.io/

Address

Url API is versioned, using https, url looks like folowing: https://server_address/api/v1/endpoint, where

  • server_address – ip address of server
  • endpoint – description in Paths sections.

HTTP

The following HTTP command set is used for server communication:

  • GET – list of objects
  • PUT – object parameter change
  • POST – object creation or action assignment
  • DELETE – object deletion

Data structure

Server request

Structure of request:

{
  "data":   ...
}

Every request is packed in "data" object. If there is a remark Read only in parameter description, parameter can only by accesed via GET command, but it is not possible to modify this parameter using POST or PUT.

Server response

Response structure:

{
  "data":   ...
}

Everey response is packed in "data" object.

{
  "meta": 
    {
      "code": 200
    },
  "data": ...,
  "pagination": 
    {
      "next_url": "...",
      "next_max_id": "13872296"
    }
  }

Errors

  • 401 – not authtorized (user is not logged in)
  • 403 – no rights (logged user has insufficient rights for this operation)
  • 500 and more – errors

Structure looks like folowing:

{
  "data": {
    number:123456
    messagge:"example"
  }
}
  • messagge – detailed description of the error
  • number – error number (can be used in client for viewing localized description to user)

Authentization

Authentication is based on tokens that are transmitted in a cookie. The client sends the /login request including its login name and password. If authentication is valid, the server sets the cookie in the browser. From now on, the client (browser) will send all requests to the server with this cookie and the server will validate the token in the cookie. If the token is invalid, the server returns error 401. When the /logout request is sent, the token will be deleted from the database If a user logs in via multiple browsers (via more PCs or one PC with multiple suppliers' browsers) at the same time, there are more tokens for one user in the database at a moment. Logging out of one browser the user is not logged out of the others. The token for a session is deleted automatically from the database after the logged-in user keeps idle for 60 minutes.

Version Number and Tags

not implmented

Not implemented on the server.

user

Objects for authorization and user settings.

Returns user settings.

Parameters

NameDescription
token *
string
(header)

Security token

Responses

CodeDescription
200

Returns user settings.

{
  "localization": 0,
  "show_weekends": true,
  "name": "string",
  "sunday_first": true
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

User login.

Parameters

NameDescription
token *
string
(header)

Security token

user *
object
(body)
{
  "login": "string",
  "password": "string"
}

Responses

CodeDescription
200

Returns user settings

{
  "localization": 0,
  "show_weekends": true,
  "name": "string",
  "sunday_first": true
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

User logout.

Parameters

NameDescription
token *
string
(header)

Security token

Responses

CodeDescription
200

User was logged out.

401

Not authorized.

Change user settings.

Parameters

NameDescription
token *
string
(header)

Security token

user *
object
(body)
{
  "login": "string",
  "password": "string"
}

Responses

CodeDescription
200

Returns user settings.

{
  "localization": 0,
  "show_weekends": true,
  "name": "string",
  "sunday_first": true
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

scheduler

Objects for controling the scheduler.

Delete day plan.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

Responses

CodeDescription
200

Day plan deleted.

"Unknown Type: null"
401

Not authorized.

403

Insufficent rights.

500

Error

{
  "messagge": "string",
  "number": "string"
}

Remove destinations from day plan.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

destinations *
array[object]
(body)

List of removed destinations.

[
  {
    "type": 0,
    "id": 0,
    "name": "string"
  }
]

Responses

CodeDescription
200

Destinations removed, returns list of day plan destinations.

[
  {
    "type": 0,
    "id": 0,
    "name": "string"
  }
]
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Delete day plan exception.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

exceptionId *
string
(path)

Exception Id.

Responses

CodeDescription
200

Day plan exception deleted.

"Unknown Type: null"
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Delete day plan record.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

recordId *
string
(path)

Record id

Responses

CodeDescription
200

Day plan record deleted.

"Unknown Type: null"
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Delete holiday.

Parameters

NameDescription
holidayId *
integer
(path)

Holiday id.

Responses

CodeDescription
200

Holiday deleted.

"Unknown Type: null"
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns day plans in month.

Parameters

NameDescription
token *
string
(header)

Security token

year *
string
(path)

rok

month *
string
(path)

mesic

Responses

CodeDescription
200

Array of day events.

[
  {
    "date": 0,
    "dayPlans": [
      {
        "id": 0,
        "name": "string",
        "color": 0,
        "priority": 0,
        "exception": 0
      }
    ]
  }
]
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns array of day plans events in a week.

Parameters

NameDescription
year *
string
(path)

year

week *
string
(path)

week

Responses

CodeDescription
200

Array of day plans events.

[
  {
    "date": "string",
    "items": [
      {
        "record": {
          "id": 0,
          "time_hour": 0,
          "time_min": 0,
          "command": {
            "type": 0,
            "par": 0,
            "name": "string"
          }
        },
        "day_plan": {
          "id": 0,
          "name": "string",
          "color": 0,
          "priority": 0,
          "exception": 0
        }
      }
    ]
  }
]
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns day plans.

Parameters

No parameters

Responses

CodeDescription
200

Array of day plans.

[
  {
    "id": 0,
    "name": "string",
    "color": 0,
    "priority": 0,
    "repeater": {
      "day_type": 0,
      "day_par": 0,
      "week_type": 0,
      "week_par": 0,
      "interval_type": 0,
      "start_date": "string",
      "end_date": "string",
      "counter": 0
    },
    "records": [
      {
        "id": 0,
        "time_hour": 0,
        "time_min": 0,
        "command": {
          "type": 0,
          "par": 0,
          "name": "string"
        }
      }
    ],
    "destinations": [
      {
        "type": 0,
        "id": 0,
        "name": "string"
      }
    ],
    "exceptions": [
      {
        "id": 0,
        "day": 0,
        "month": 0,
        "year": 0,
        "is_negative": true
      }
    ]
  }
]
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns detail of day plan.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

Responses

CodeDescription
200

Detail of day plan.

{
  "id": 0,
  "name": "string",
  "color": 0,
  "priority": 0,
  "repeater": {
    "day_type": 0,
    "day_par": 0,
    "week_type": 0,
    "week_par": 0,
    "interval_type": 0,
    "start_date": "string",
    "end_date": "string",
    "counter": 0
  },
  "records": [
    {
      "id": 0,
      "time_hour": 0,
      "time_min": 0,
      "command": {
        "type": 0,
        "par": 0,
        "name": "string"
      }
    }
  ],
  "destinations": [
    {
      "type": 0,
      "id": 0,
      "name": "string"
    }
  ],
  "exceptions": [
    {
      "id": 0,
      "day": 0,
      "month": 0,
      "year": 0,
      "is_negative": true
    }
  ]
}
401

Not authorized.

403

Insufficent rights.

500

Error

{
  "messagge": "string",
  "number": "string"
}

Returns day plan destinations.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

Responses

CodeDescription
200

Returns day plan destinations.

[
  {
    "type": 0,
    "id": 0,
    "name": "string"
  }
]
401

Not authorized.

403

Insufficent rights.

500

Error

{
  "messagge": "string",
  "number": "string"
}

Returns day plan exceptions.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

Responses

CodeDescription
200

Array of day plan destinations.

[
  {
    "id": 0,
    "day": 0,
    "month": 0,
    "year": 0,
    "is_negative": true
  }
]
401

Not authorized.

403

Insufficent rights.

500

Error

{
  "messagge": "string",
  "number": "string"
}

Returns detail of day plan exception.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

exceptionId *
string
(path)

Exception id.

Responses

CodeDescription
200

Detail of day plan exception.

{
  "id": 0,
  "day": 0,
  "month": 0,
  "year": 0,
  "is_negative": true
}
401

Not authorized.

403

Insufficent rights.

500

Error

{
  "messagge": "string",
  "number": "string"
}

Returns day plan records.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

Responses

CodeDescription
200

Array of day plan records.

[
  {
    "id": 0,
    "time_hour": 0,
    "time_min": 0,
    "command": {
      "type": 0,
      "par": 0,
      "name": "string"
    }
  }
]
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns detail of day plan record.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

recordId *
string
(path)

Record id

Responses

CodeDescription
200

Detail of day plan record.

{
  "id": 0,
  "time_hour": 0,
  "time_min": 0,
  "command": {
    "type": 0,
    "par": 0,
    "name": "string"
  }
}
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns list of possible commands.

Parameters

No parameters

Responses

CodeDescription
200

List of commands.

[
  {
    "type": 0,
    "par": 0,
    "name": "string"
  }
]
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns list of zones. Zones are located in a tree, there can be another zone in zone.

Parameters

No parameters

Responses

CodeDescription
200

List of zones.

{
  "id": 0,
  "name": "string",
  "zones": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "destinations": [
    {
      "type": 0,
      "id": 0,
      "name": "string"
    }
  ]
}
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns list of holidays.

Parameters

No parameters

Responses

CodeDescription
200

List of holidays.

[
  {
    "id": 0,
    "day": 0,
    "month": 0,
    "year": 0
  }
]
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns detail of holiday.

Parameters

NameDescription
holidayId *
integer
(path)

Holiday id

Responses

CodeDescription
200

Detail of holiday.

{
  "id": 0,
  "day": 0,
  "month": 0,
  "year": 0
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Creates day plan.

Parameters

NameDescription
name *
object
(body)

Day plan name.

{
  "id": 0,
  "name": "string",
  "color": 0,
  "priority": 0,
  "repeater": {
    "day_type": 0,
    "day_par": 0,
    "week_type": 0,
    "week_par": 0,
    "interval_type": 0,
    "start_date": "string",
    "end_date": "string",
    "counter": 0
  }
}

Responses

CodeDescription
200

Day plan crated, returns its details.

{
  "id": 0,
  "name": "string",
  "color": 0,
  "priority": 0,
  "repeater": {
    "day_type": 0,
    "day_par": 0,
    "week_type": 0,
    "week_par": 0,
    "interval_type": 0,
    "start_date": "string",
    "end_date": "string",
    "counter": 0
  },
  "records": [
    {
      "id": 0,
      "time_hour": 0,
      "time_min": 0,
      "command": {
        "type": 0,
        "par": 0,
        "name": "string"
      }
    }
  ],
  "destinations": [
    {
      "type": 0,
      "id": 0,
      "name": "string"
    }
  ],
  "exceptions": [
    {
      "id": 0,
      "day": 0,
      "month": 0,
      "year": 0,
      "is_negative": true
    }
  ]
}
401

Neautorizován.

403

Insufficent rights.

500

Error

{
  "messagge": "string",
  "number": "string"
}

Creates day plan exception.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

exception *
object
(body)

Exception.

{
  "id": 0,
  "day": 0,
  "month": 0,
  "year": 0,
  "is_negative": true
}

Responses

CodeDescription
200

Excepion created, returns its detail.

{
  "id": 0,
  "day": 0,
  "month": 0,
  "year": 0,
  "is_negative": true
}
401

Not authorized.

403

Insufficent rights.

500

Error

{
  "messagge": "string",
  "number": "string"
}

Creates record in day plan.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id

settings *
object
(body)

Record settings

{
  "id": 0,
  "time_hour": 0,
  "time_min": 0,
  "command": {
    "type": 0,
    "par": 0,
    "name": "string"
  }
}

Responses

CodeDescription
200

Record created, returns its detail.

{
  "id": 0,
  "time_hour": 0,
  "time_min": 0,
  "command": {
    "type": 0,
    "par": 0,
    "name": "string"
  }
}
401

Not authorized.

403

Insufficent rights.

500

Error

{
  "messagge": "string",
  "number": "string"
}

Create holiday.

Parameters

NameDescription
createHoliday *
object
(body)

Holiday settings

{
  "id": 0,
  "day": 0,
  "month": 0,
  "year": 0
}

Responses

CodeDescription
200

Create new holiday.

{
  "id": 0,
  "day": 0,
  "month": 0,
  "year": 0
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Change day plan settings.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

dayPlan
object
(body)

plan

{
  "id": 0,
  "name": "string",
  "color": 0,
  "priority": 0,
  "repeater": {
    "day_type": 0,
    "day_par": 0,
    "week_type": 0,
    "week_par": 0,
    "interval_type": 0,
    "start_date": "string",
    "end_date": "string",
    "counter": 0
  }
}

Responses

CodeDescription
200

Day plan changed, returns its detail.

{
  "id": 0,
  "name": "string",
  "color": 0,
  "priority": 0,
  "repeater": {
    "day_type": 0,
    "day_par": 0,
    "week_type": 0,
    "week_par": 0,
    "interval_type": 0,
    "start_date": "string",
    "end_date": "string",
    "counter": 0
  },
  "records": [
    {
      "id": 0,
      "time_hour": 0,
      "time_min": 0,
      "command": {
        "type": 0,
        "par": 0,
        "name": "string"
      }
    }
  ],
  "destinations": [
    {
      "type": 0,
      "id": 0,
      "name": "string"
    }
  ],
  "exceptions": [
    {
      "id": 0,
      "day": 0,
      "month": 0,
      "year": 0,
      "is_negative": true
    }
  ]
}
401

Not authorized.

403

Insufficent rights.

500

Error

{
  "messagge": "string",
  "number": "string"
}

Insert destinations to day plan.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

destinations *
array[object]
(body)

List of inserted destinations.

[
  {
    "type": 0,
    "id": 0,
    "name": "string"
  }
]

Responses

CodeDescription
200

Destinations inserted, returns list of day plan destinations.

[
  {
    "type": 0,
    "id": 0,
    "name": "string"
  }
]
401

Not authorized.

403

Insufficent rights.

500

Error

{
  "messagge": "string",
  "number": "string"
}

Change day plan exception settings.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

exceptionId *
string
(path)

Exception Id.

exception *
object
(body)

Exception.

{
  "id": 0,
  "day": 0,
  "month": 0,
  "year": 0,
  "is_negative": true
}

Responses

CodeDescription
200

Exception changed, returns its detail.

{
  "id": 0,
  "day": 0,
  "month": 0,
  "year": 0,
  "is_negative": true
}
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Chenge day plan record.

Parameters

NameDescription
dayplanId *
string
(path)

Day plan id.

recordId *
string
(path)

Record id

Responses

CodeDescription
200

Record changes, returns its detail.

{
  "id": 0,
  "time_hour": 0,
  "time_min": 0,
  "command": {
    "type": 0,
    "par": 0,
    "name": "string"
  }
}
401

Not authorized.

403

Insufficent rights.

500

Error

{
  "messagge": "string",
  "number": "string"
}

Change holiday settings.

Parameters

NameDescription
holidayId *
integer
(path)

Holiday id

editHoliday *
object
(body)
{
  "id": 0,
  "day": 0,
  "month": 0,
  "year": 0
}

Responses

CodeDescription
200

Holiday changed, return its detail.

{
  "id": 0,
  "day": 0,
  "month": 0,
  "year": 0
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

session

Object for controling sessions.

Delete session.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Session was deleted.

401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Delete session source.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

sourceId *
integer
(path)

Source ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Source was deleted.

401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Delete session destination.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

destinationId *
integer
(path)

Destination ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Destination was deleted.

401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns list of zones. Zones are located in a tree, there can be another zone in zone.

Parameters

No parameters

Responses

CodeDescription
200

List of zones.

{
  "id": 0,
  "name": "string",
  "zones": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "destinations": [
    {
      "type": 0,
      "id": 0,
      "name": "string"
    }
  ]
}
401

Not authorized.

403

Insufficent rights.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns the list of all Sessions

Parameters

NameDescription
token *
string
(header)

Security token

Responses

CodeDescription
200

List of Sessions.

[
  {
    "id": 0,
    "name": "string",
    "volume": 0,
    "balance": 0,
    "fade_time": 0,
    "active": true,
    "muted": true,
    "priority": 0,
    "channel": 0,
    "state": "string",
    "sources": [
      {
        "source_id": 0,
        "session_id": 0,
        "name": "string",
        "type": "string",
        "id": 0,
        "volume": 0,
        "balance": 0,
        "fade_time": 0,
        "active": true,
        "muted": true,
        "shuffle": true,
        "repeat": true,
        "state": "string",
        "play_state": "string"
      }
    ],
    "destinations": [
      {
        "dest_id": 0,
        "session_id": 0,
        "name": "string",
        "type": "string",
        "id": 0,
        "active": true,
        "state": "string"
      }
    ]
  }
]
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns properties of a specific Session.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Session properties.

{
  "id": 0,
  "name": "string",
  "volume": 0,
  "balance": 0,
  "fade_time": 0,
  "active": true,
  "muted": true,
  "priority": 0,
  "channel": 0,
  "state": "string",
  "sources": [
    {
      "source_id": 0,
      "session_id": 0,
      "name": "string",
      "type": "string",
      "id": 0,
      "volume": 0,
      "balance": 0,
      "fade_time": 0,
      "active": true,
      "muted": true,
      "shuffle": true,
      "repeat": true,
      "state": "string",
      "play_state": "string"
    }
  ],
  "destinations": [
    {
      "dest_id": 0,
      "session_id": 0,
      "name": "string",
      "type": "string",
      "id": 0,
      "active": true,
      "state": "string"
    }
  ]
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns the list of all sources of the given Session.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

token *
string
(header)

Security token

Responses

CodeDescription
200

List of sources.

[
  {
    "source_id": 0,
    "session_id": 0,
    "name": "string",
    "type": "string",
    "id": 0,
    "volume": 0,
    "balance": 0,
    "fade_time": 0,
    "active": true,
    "muted": true,
    "shuffle": true,
    "repeat": true,
    "state": "string",
    "play_state": "string"
  }
]
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns the properties of a specific source.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

sourceId *
integer
(path)

Source ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Source properties.

{
  "source_id": 0,
  "session_id": 0,
  "name": "string",
  "type": "string",
  "id": 0,
  "volume": 0,
  "balance": 0,
  "fade_time": 0,
  "active": true,
  "muted": true,
  "shuffle": true,
  "repeat": true,
  "state": "string",
  "play_state": "string"
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns the list of all destinations of the given Session.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

token *
string
(header)

Security token

Responses

CodeDescription
200

List of destinations.

[
  {
    "dest_id": 0,
    "session_id": 0,
    "name": "string",
    "type": "string",
    "id": 0,
    "active": true,
    "state": "string"
  }
]
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns the properties of a specific destination.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

destinationId *
integer
(path)

Destination ID

token *
string
(header)

Security token

Responses

CodeDescription
200

destination properties.

{
  "dest_id": 0,
  "session_id": 0,
  "name": "string",
  "type": "string",
  "id": 0,
  "active": true,
  "state": "string"
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Returns the list of playlists.

Parameters

NameDescription
token *
string
(header)

Security token

Responses

CodeDescription
200

destination properties.

[
  {
    "id": 0,
    "name": "string"
  }
]
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Creates a new Session

Parameters

NameDescription
session *
object
(body)

New session parameters

{
  "id": 0,
  "name": "string",
  "volume": 0,
  "balance": 0,
  "fade_time": 0,
  "active": true,
  "muted": true,
  "priority": 0,
  "channel": 0,
  "state": "string",
  "sources": [
    {
      "source_id": 0,
      "session_id": 0,
      "name": "string",
      "type": "string",
      "id": 0,
      "volume": 0,
      "balance": 0,
      "fade_time": 0,
      "active": true,
      "muted": true,
      "shuffle": true,
      "repeat": true,
      "state": "string",
      "play_state": "string"
    }
  ],
  "destinations": [
    {
      "dest_id": 0,
      "session_id": 0,
      "name": "string",
      "type": "string",
      "id": 0,
      "active": true,
      "state": "string"
    }
  ]
}
token *
string
(header)

Security token

Responses

CodeDescription
200

New session properties

{
  "id": 0,
  "name": "string",
  "volume": 0,
  "balance": 0,
  "fade_time": 0,
  "active": true,
  "muted": true,
  "priority": 0,
  "channel": 0,
  "state": "string",
  "sources": [
    {
      "source_id": 0,
      "session_id": 0,
      "name": "string",
      "type": "string",
      "id": 0,
      "volume": 0,
      "balance": 0,
      "fade_time": 0,
      "active": true,
      "muted": true,
      "shuffle": true,
      "repeat": true,
      "state": "string",
      "play_state": "string"
    }
  ],
  "destinations": [
    {
      "dest_id": 0,
      "session_id": 0,
      "name": "string",
      "type": "string",
      "id": 0,
      "active": true,
      "state": "string"
    }
  ]
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Creates a new source in the given Session

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

source *
object
(body)

New source parameters

{
  "source_id": 0,
  "session_id": 0,
  "name": "string",
  "type": "string",
  "id": 0,
  "volume": 0,
  "balance": 0,
  "fade_time": 0,
  "active": true,
  "muted": true,
  "shuffle": true,
  "repeat": true,
  "state": "string",
  "play_state": "string"
}
token *
string
(header)

Security token

Responses

CodeDescription
200

New source properties

{
  "source_id": 0,
  "session_id": 0,
  "name": "string",
  "type": "string",
  "id": 0,
  "volume": 0,
  "balance": 0,
  "fade_time": 0,
  "active": true,
  "muted": true,
  "shuffle": true,
  "repeat": true,
  "state": "string",
  "play_state": "string"
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Creates a new destination in the given Session

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

destination *
object
(body)

New destination parameters

{
  "dest_id": 0,
  "session_id": 0,
  "name": "string",
  "type": "string",
  "id": 0,
  "active": true,
  "state": "string"
}
token *
string
(header)

Security token

Responses

CodeDescription
200

New destination properties

{
  "dest_id": 0,
  "session_id": 0,
  "name": "string",
  "type": "string",
  "id": 0,
  "active": true,
  "state": "string"
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Changes the Session parameters

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

session *
object
(body)

Session parameters.

{
  "id": 0,
  "name": "string",
  "volume": 0,
  "balance": 0,
  "fade_time": 0,
  "active": true,
  "muted": true,
  "priority": 0,
  "channel": 0,
  "state": "string",
  "sources": [
    {
      "source_id": 0,
      "session_id": 0,
      "name": "string",
      "type": "string",
      "id": 0,
      "volume": 0,
      "balance": 0,
      "fade_time": 0,
      "active": true,
      "muted": true,
      "shuffle": true,
      "repeat": true,
      "state": "string",
      "play_state": "string"
    }
  ],
  "destinations": [
    {
      "dest_id": 0,
      "session_id": 0,
      "name": "string",
      "type": "string",
      "id": 0,
      "active": true,
      "state": "string"
    }
  ]
}
token *
string
(header)

Security token

Responses

CodeDescription
200

Session properties.

{
  "id": 0,
  "name": "string",
  "volume": 0,
  "balance": 0,
  "fade_time": 0,
  "active": true,
  "muted": true,
  "priority": 0,
  "channel": 0,
  "state": "string",
  "sources": [
    {
      "source_id": 0,
      "session_id": 0,
      "name": "string",
      "type": "string",
      "id": 0,
      "volume": 0,
      "balance": 0,
      "fade_time": 0,
      "active": true,
      "muted": true,
      "shuffle": true,
      "repeat": true,
      "state": "string",
      "play_state": "string"
    }
  ],
  "destinations": [
    {
      "dest_id": 0,
      "session_id": 0,
      "name": "string",
      "type": "string",
      "id": 0,
      "active": true,
      "state": "string"
    }
  ]
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Execute PLAY action of a specific Session.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Session was started.

401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Execute STOP action of a specific Session.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Session was stopped.

401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Change source parameters.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

sourceId *
integer
(path)

Source ID

source *
object
(body)

Source parameters

{
  "source_id": 0,
  "session_id": 0,
  "name": "string",
  "type": "string",
  "id": 0,
  "volume": 0,
  "balance": 0,
  "fade_time": 0,
  "active": true,
  "muted": true,
  "shuffle": true,
  "repeat": true,
  "state": "string",
  "play_state": "string"
}
token *
string
(header)

Security token

Responses

CodeDescription
200

Source properties.

{
  "source_id": 0,
  "session_id": 0,
  "name": "string",
  "type": "string",
  "id": 0,
  "volume": 0,
  "balance": 0,
  "fade_time": 0,
  "active": true,
  "muted": true,
  "shuffle": true,
  "repeat": true,
  "state": "string",
  "play_state": "string"
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Execute PLAY action of a specific source of the given Session.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

sourceId *
integer
(path)

Source ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Source was started.

401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Execute STOP action of a specific source of the given Session.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

sourceId *
integer
(path)

Source ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Source was stopped.

401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Execute PAUSE action of a specific source of the given Session.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

sourceId *
integer
(path)

Source ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Source was paused.

401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Execute NEXT action of a specific source of the given Session.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

sourceId *
integer
(path)

Source ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Next action was executed.

401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Execute PREV action of a specific source of the given Session.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

sourceId *
integer
(path)

Source ID

token *
string
(header)

Security token

Responses

CodeDescription
200

Prev action was executed.

401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}

Change destination parameters.

Parameters

NameDescription
sessionId *
integer
(path)

Session ID

destinationId *
integer
(path)

Destination ID

destination *
object
(body)

Destination parameters

{
  "dest_id": 0,
  "session_id": 0,
  "name": "string",
  "type": "string",
  "id": 0,
  "active": true,
  "state": "string"
}
token *
string
(header)

Security token

Responses

CodeDescription
200

Destination properties.

{
  "dest_id": 0,
  "session_id": 0,
  "name": "string",
  "type": "string",
  "id": 0,
  "active": true,
  "state": "string"
}
401

Not authorized.

500

Error.

{
  "messagge": "string",
  "number": "string"
}