Accounts and credits
Disabling a reseller tree also disables its descendants and their lines.
Lines
get_line
Returns a line
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
show_columns | string | Comma-separated columns to include |
hide_columns | string | Comma-separated columns to omit |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=get_line&id=1'create_line
Creates a line
Columns of lines
Top-level fields for lines; no required columns; omitting username or password generates a new value
member_id- Id of the user (admin or reseller) who owns the line; empty values default to the user of the API key
username- Line username used by players to sign in; must be unique, and an empty value gets a random 10-character name
password- Line password used by players, stored as plain text; an empty value gets a random 10-character password
last_ip- Last client IP recorded by XUI; stored for XUI compatibility, not used by NexgenStreamer
exp_date- Line expiry date; use no_expire to clear it
admin_enabled- Ban flag set by ban_line and unban_line: 0 means the line is banned and cannot play
enabled- Enabled flag set by disable_line and enable_line: 0 means the line is disabled and cannot play
admin_notes- Administrator notes about the line; stored for XUI compatibility, not used by NexgenStreamer
reseller_notes- Reseller notes about the line; stored for XUI compatibility, not used by NexgenStreamer
bouquet- Content groups (bouquets) the line can watch
allowed_outputs- Stream formats the line may use; with none allowed, playback is refused
max_connections- Maximum number of streams the line can play at the same time; defaults to 1 when left out
is_restreamer- Marks the line as a restreamer; the console flags its connections as restreamer connections
is_trial- Marks the line as a trial line
is_mag- Set to 1 on the line that belongs to a MAG device; the MAG device actions manage it
is_e2- Set to 1 on the line that belongs to an Enigma2 device; the Enigma2 device actions manage it
is_stalker- Stored for XUI compatibility; not used by NexgenStreamer
is_isplock- Locks the line to the network (ASN) it first played from, when ISP lock is turned on in the access rules
allowed_ips- IP lock: when it holds valid entries, the line plays only from those addresses
allowed_ua- User-agent lock: when not empty, the line plays only from these user agents (exact match, case-insensitive)
created_at- When the line was created, set by the server on create_line
pair_id- ID of the parent line whose expiry and content groups are copied to this line when the parent is saved
force_server_id- ID of the forced server for this line; 0 leaves server selection to NexgenStreamer
as_number- ISP number recorded by XUI; the Admin API clears it on save, and NexgenStreamer does not use it
isp_desc- ISP name recorded by XUI; the Admin API clears it on save, and NexgenStreamer does not use it
forced_country- Forced country: the gateway rejects a request when it detects a different country
bypass_ua- Lets the line skip the empty user-agent rule and the blocked user-agent list
play_token- Stored for XUI compatibility; not used by NexgenStreamer
last_expiration_video- Stored for XUI compatibility; not used by NexgenStreamer
package_id- Id of the package last applied to the line
access_token- Stored for XUI compatibility; not used by NexgenStreamer
contact- Customer contact details; stored for XUI compatibility, not used by NexgenStreamer
last_activity- Last activity recorded by XUI; the Admin API never writes it, and NexgenStreamer does not use it
last_activity_array- Last activity details recorded by XUI; the Admin API never writes it, and NexgenStreamer does not use it
updated- Time of the last change to the row, set by the database
danger- Left out of get_line responses; stored for XUI compatibility, not used by NexgenStreamer
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=create_line' \
--data-urlencode 'username=<username>' \
--data-urlencode 'password=<password>' \
--data-urlencode 'max_connections=1' \
--data-urlencode 'exp_date=2027-12-31'edit_line
Updates a line
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
Columns of lines
Top-level fields for lines; no required columns; omitting username or password generates a new value
member_id- Id of the user (admin or reseller) who owns the line; empty values default to the user of the API key
username- Line username used by players to sign in; must be unique, and an empty value gets a random 10-character name
password- Line password used by players, stored as plain text; an empty value gets a random 10-character password
last_ip- Last client IP recorded by XUI; stored for XUI compatibility, not used by NexgenStreamer
exp_date- Line expiry date; use no_expire to clear it
admin_enabled- Ban flag set by ban_line and unban_line: 0 means the line is banned and cannot play
enabled- Enabled flag set by disable_line and enable_line: 0 means the line is disabled and cannot play
admin_notes- Administrator notes about the line; stored for XUI compatibility, not used by NexgenStreamer
reseller_notes- Reseller notes about the line; stored for XUI compatibility, not used by NexgenStreamer
bouquet- Content groups (bouquets) the line can watch
allowed_outputs- Stream formats the line may use; with none allowed, playback is refused
max_connections- Maximum number of streams the line can play at the same time; defaults to 1 when left out
is_restreamer- Marks the line as a restreamer; the console flags its connections as restreamer connections
is_trial- Marks the line as a trial line
is_mag- Set to 1 on the line that belongs to a MAG device; the MAG device actions manage it
is_e2- Set to 1 on the line that belongs to an Enigma2 device; the Enigma2 device actions manage it
is_stalker- Stored for XUI compatibility; not used by NexgenStreamer
is_isplock- Locks the line to the network (ASN) it first played from, when ISP lock is turned on in the access rules
allowed_ips- IP lock: when it holds valid entries, the line plays only from those addresses
allowed_ua- User-agent lock: when not empty, the line plays only from these user agents (exact match, case-insensitive)
created_at- When the line was created, set by the server on create_line
pair_id- ID of the parent line whose expiry and content groups are copied to this line when the parent is saved
force_server_id- ID of the forced server for this line; 0 leaves server selection to NexgenStreamer
as_number- ISP number recorded by XUI; the Admin API clears it on save, and NexgenStreamer does not use it
isp_desc- ISP name recorded by XUI; the Admin API clears it on save, and NexgenStreamer does not use it
forced_country- Forced country: the gateway rejects a request when it detects a different country
bypass_ua- Lets the line skip the empty user-agent rule and the blocked user-agent list
play_token- Stored for XUI compatibility; not used by NexgenStreamer
last_expiration_video- Stored for XUI compatibility; not used by NexgenStreamer
package_id- Id of the package last applied to the line
access_token- Stored for XUI compatibility; not used by NexgenStreamer
contact- Customer contact details; stored for XUI compatibility, not used by NexgenStreamer
last_activity- Last activity recorded by XUI; the Admin API never writes it, and NexgenStreamer does not use it
last_activity_array- Last activity details recorded by XUI; the Admin API never writes it, and NexgenStreamer does not use it
updated- Time of the last change to the row, set by the database
danger- Left out of get_line responses; stored for XUI compatibility, not used by NexgenStreamer
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=edit_line' \
--data-urlencode 'id=1' \
--data-urlencode 'username=<username>' \
--data-urlencode 'password=<password>' \
--data-urlencode 'max_connections=1' \
--data-urlencode 'exp_date=2027-12-31'delete_line
Deletes a line
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=delete_line&id=1'enable_line
Enables a line
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=enable_line&id=1'disable_line
Disables a line
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=disable_line&id=1'ban_line
Bans a line
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=ban_line&id=1'unban_line
Lifts the ban on a line
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=unban_line&id=1'Panel users
get_user
Returns a panel user
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
show_columns | string | Comma-separated columns to include |
hide_columns | string | Comma-separated columns to omit |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=get_user&id=1'create_user
Creates a panel user
Columns of users
Top-level fields for users; required: member_group_id (group_id); group_id is accepted as an alias
username- Unique username for the operator or reseller; an empty value is replaced with a generated username
password- Sign-in password, hashed before storage; leave it empty on edit to keep the current password
email- Email address used for account recovery
ip- Stored for XUI compatibility; not used by NexgenStreamer
date_registered- Registration time set when the API creates the user
last_login- Stored for XUI compatibility; not used by NexgenStreamer
member_group_id- Required ID of the group the user inherits permissions from; group_id is accepted as an alias
credits- Credit balance, with changes recorded in the credits ledger
notes- Notes saved with the reseller record
status- Whether the user account is active
reseller_dns- Stored for XUI compatibility; not used by NexgenStreamer
owner_id- ID of the user who owns this reseller account
override_packages- Custom regular package prices for this reseller
hue- Stored for XUI compatibility; not used by NexgenStreamer
theme- Stored for XUI compatibility; not used by NexgenStreamer
timezone- Time zone used by the console and by the API when parsing dates without a time zone
api_key- Admin API key that acts with the user's permissions
use_sidebar_layout- Stored for XUI compatibility; not used by NexgenStreamer
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=create_user' \
--data-urlencode 'member_group_id=<member_group_id>'edit_user
Updates a panel user
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
Columns of users
Top-level fields for users; required: member_group_id (group_id); group_id is accepted as an alias
username- Unique username for the operator or reseller; an empty value is replaced with a generated username
password- Sign-in password, hashed before storage; leave it empty on edit to keep the current password
email- Email address used for account recovery
ip- Stored for XUI compatibility; not used by NexgenStreamer
date_registered- Registration time set when the API creates the user
last_login- Stored for XUI compatibility; not used by NexgenStreamer
member_group_id- Required ID of the group the user inherits permissions from; group_id is accepted as an alias
credits- Credit balance, with changes recorded in the credits ledger
notes- Notes saved with the reseller record
status- Whether the user account is active
reseller_dns- Stored for XUI compatibility; not used by NexgenStreamer
owner_id- ID of the user who owns this reseller account
override_packages- Custom regular package prices for this reseller
hue- Stored for XUI compatibility; not used by NexgenStreamer
theme- Stored for XUI compatibility; not used by NexgenStreamer
timezone- Time zone used by the console and by the API when parsing dates without a time zone
api_key- Admin API key that acts with the user's permissions
use_sidebar_layout- Stored for XUI compatibility; not used by NexgenStreamer
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=edit_user' \
--data-urlencode 'id=1' \
--data-urlencode 'member_group_id=<member_group_id>'delete_user
Deletes a panel user
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=delete_user&id=1'enable_user
Enables a panel user
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=enable_user&id=1'disable_user
Disables a panel user
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=disable_user&id=1'user_info
Returns the authenticated user and group permissions
| Parameter | Type | Description |
|---|---|---|
show_columns | string | Comma-separated columns to include |
hide_columns | string | Comma-separated columns to omit |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=user_info'Credits
adjust_credits
Adjusts a user’s credit balance without letting it go below zero
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
credits | string | Signed decimal adjustment |
reason | string | Reason recorded in the credit log |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=adjust_credits&id=1&credits=<credits>'Reseller trees
enable_user_tree
Enables a user, its descendants and their lines
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=enable_user_tree&id=1'disable_user_tree
Disables a user, its descendants and their lines
| Parameter | Type | Description |
|---|---|---|
id | integer | Record ID |
curl -sS 'http://<server>/<access_code>/?api_key=<key>&action=disable_user_tree&id=1'
