Saltar al contenido principal
Contenido

Reseller API

Usuarios de un revendedor, sus límites y sus periodos de consumo. Se sirve en el host de la Reseller API con la API key del revendedor.

Respuesta literal del contrato congelado

GET/users

Listar usuarios

Devuelve todos los usuarios del revendedor.

El campo api_key de cada usuario va vacío por defecto: las claves ya no se guardan de forma legible.

Autenticación
HTTP Basic con la API key del revendedor
Servidor
https://reseller.cdnify.lat
En CDNify
Mismo comportamiento que antes
Equivalente en la API v2

Respuestas

  • 200Correctoapplication/json

    Campos (15)
    Respuestas resellerListUsers 200
    CampoTipoObligatorioReglas
    usersarray<object>Sí
    users[].idstringSí
    • Patrón: ^u[0-9a-f]{9}$
    users[].emailstringSí
    users[].api_keystringSí
    users[].createdstringSí
    users[].accounting_idstringSí
    users[].bandwidth_usagestring | numberSí
    users[].bandwidth_limitstring | numberSí
    users[].resource_limitinteger | stringSí
    users[].customstringSí
    • Puede ser null
    users[].reset_intervalinteger | stringSí
    users[].usage_periodintegerSí
    users[].last_reset_datestringSí
    users[].next_reset_datestringSí
    • Puede ser null
    users[].rolesarray<string>Sí
    Ejemplo
    {
      "users": [
        {
          "id": "u0a1b2c3d4",
          "email": "customer@example.com",
          "api_key": "SYNTHETIC-USER-API-KEY-0000000000000000000000000000",
          "created": "2026-01-15T10:00:00+00:00",
          "accounting_id": "ACC-1001",
          "bandwidth_usage": "12.50000",
          "bandwidth_limit": "100",
          "resource_limit": 5,
          "custom": null,
          "reset_interval": 30,
          "usage_period": 3,
          "last_reset_date": "2026-01-01T00:00:00+00:00",
          "next_reset_date": "2026-01-31T00:00:00+00:00",
          "roles": [
            "ROLE_USER"
          ]
        }
      ]
    }
  • 401No autenticado

    Cabeceras: WWW-Authenticate: Basic realm="Secured Area"

curl
curl 'https://reseller.cdnify.lat/users' \
  -u "$CDNIFY_RESELLER_API_KEY:x"
POST/users

Crear un usuario

Crea un usuario del revendedor con sus límites. La respuesta incluye la API key del usuario nuevo.

Autenticación
HTTP Basic con la API key del revendedor
Servidor
https://reseller.cdnify.lat
En CDNify
Mismo comportamiento que antes
Equivalente en la API v2

Cuerpo de la petición

Tipos de contenido: application/x-www-form-urlencoded

Cuerpo de la petición resellerCreateUser
CampoTipoObligatorioReglas
emailstringSí
  • Formato: email
passwordstringSí
  • Al menos 1 caracteres
reset_intervalinteger | stringNo
resource_limitinteger | stringNo
  • Mínimo 0
bandwidth_limitnumber | stringNo
  • Mínimo 0
accounting_idstringNo
customstringNo
Ejemplo
{
  "email": "customer@example.com",
  "password": "synthetic-password",
  "bandwidth_limit": 100,
  "resource_limit": 5,
  "reset_interval": 30,
  "accounting_id": "ACC-1001"
}

Respuestas

  • 201Creadoapplication/json

    Campos (15)
    Respuestas resellerCreateUser 201
    CampoTipoObligatorioReglas
    usersarray<object>Sí
    users[].idstringSí
    • Patrón: ^u[0-9a-f]{9}$
    users[].emailstringSí
    users[].api_keystringSí
    users[].createdstringSí
    users[].accounting_idstringSí
    users[].bandwidth_usagestring | numberSí
    users[].bandwidth_limitstring | numberSí
    users[].resource_limitinteger | stringSí
    users[].customstringSí
    • Puede ser null
    users[].reset_intervalinteger | stringSí
    users[].usage_periodintegerSí
    users[].last_reset_datestringSí
    users[].next_reset_datestringSí
    • Puede ser null
    users[].rolesarray<string>Sí
    Ejemplo
    {
      "users": [
        {
          "id": "u0a1b2c3d4",
          "email": "customer@example.com",
          "api_key": "SYNTHETIC-USER-API-KEY-0000000000000000000000000000",
          "created": "2026-01-15T10:00:00+00:00",
          "accounting_id": "ACC-1001",
          "bandwidth_usage": 0,
          "bandwidth_limit": "100",
          "resource_limit": "5",
          "custom": null,
          "reset_interval": "30",
          "usage_period": 0,
          "last_reset_date": "2026-01-01T00:00:00+00:00",
          "next_reset_date": "2026-01-31T00:00:00+00:00",
          "roles": [
            "ROLE_USER"
          ]
        }
      ]
    }
  • 400Petición incorrectaapplication/json

    Campos (2)
    Respuestas resellerCreateUser 400
    CampoTipoObligatorioReglas
    usersarraySí
    • Como máximo 0 elementos
    errorstringSí
    Ejemplo: email
    {
      "users": [],
      "error": "Invalid user email address"
    }
    Ejemplo: password
    {
      "users": [],
      "error": "Invalid password"
    }
    Ejemplo: duplicate
    {
      "users": [],
      "error": "Duplicate email address"
    }
    Ejemplo: bandwidth
    {
      "users": [],
      "error": "Invalid bandwidth limit"
    }
    Ejemplo: resources
    {
      "users": [],
      "error": "Invalid resource limit"
    }
  • 401No autenticado

    Cabeceras: WWW-Authenticate: Basic realm="Secured Area"

curl
curl -X POST 'https://reseller.cdnify.lat/users' \
  -u "$CDNIFY_RESELLER_API_KEY:x" \
  --data-urlencode 'email=customer@example.com' \
  --data-urlencode 'password=synthetic-password' \
  --data-urlencode 'bandwidth_limit=100' \
  --data-urlencode 'resource_limit=5' \
  --data-urlencode 'reset_interval=30' \
  --data-urlencode 'accounting_id=ACC-1001'
GET/users/{user}

Obtener un usuario

Devuelve un usuario, por ID o por dirección de correo.

El campo api_key va vacío por defecto: las claves ya no se guardan de forma legible.

Autenticación
HTTP Basic con la API key del revendedor
Servidor
https://reseller.cdnify.lat
En CDNify
Mismo comportamiento que antes
Equivalente en la API v2

Parámetros

Parámetros resellerGetUser
NombreEnTipoObligatorioReglas
userRutastringSí
emailConsultastringNo

Respuestas

  • 200Correctoapplication/json

    Campos (15)
    Respuestas resellerGetUser 200
    CampoTipoObligatorioReglas
    usersarray<object>Sí
    users[].idstringSí
    • Patrón: ^u[0-9a-f]{9}$
    users[].emailstringSí
    users[].api_keystringSí
    users[].createdstringSí
    users[].accounting_idstringSí
    users[].bandwidth_usagestring | numberSí
    users[].bandwidth_limitstring | numberSí
    users[].resource_limitinteger | stringSí
    users[].customstringSí
    • Puede ser null
    users[].reset_intervalinteger | stringSí
    users[].usage_periodintegerSí
    users[].last_reset_datestringSí
    users[].next_reset_datestringSí
    • Puede ser null
    users[].rolesarray<string>Sí
    Ejemplo
    {
      "users": [
        {
          "id": "u0a1b2c3d4",
          "email": "customer@example.com",
          "api_key": "SYNTHETIC-USER-API-KEY-0000000000000000000000000000",
          "created": "2026-01-15T10:00:00+00:00",
          "accounting_id": "ACC-1001",
          "bandwidth_usage": "12.50000",
          "bandwidth_limit": "100",
          "resource_limit": 5,
          "custom": null,
          "reset_interval": 30,
          "usage_period": 3,
          "last_reset_date": "2026-01-01T00:00:00+00:00",
          "next_reset_date": "2026-01-31T00:00:00+00:00",
          "roles": [
            "ROLE_USER"
          ]
        }
      ]
    }
  • 401No autenticado

    Cabeceras: WWW-Authenticate: Basic realm="Secured Area"

  • 404No encontradoapplication/json

    Ejemplo
    []
curl
curl 'https://reseller.cdnify.lat/users/u0a1b2c3d4' \
  -u "$CDNIFY_RESELLER_API_KEY:x"
PATCH/users/{user}

Modificar un usuario

Cambia la dirección de correo, los límites o el intervalo de reinicio de un usuario.

Autenticación
HTTP Basic con la API key del revendedor
Servidor
https://reseller.cdnify.lat
En CDNify
Mismo contrato, con un defecto corregido
Equivalente en la API v2
Sin equivalente en la API v2

Parámetros

Parámetros resellerUpdateUser
NombreEnTipoObligatorioReglas
userRutastringSí

Cuerpo de la petición

Tipos de contenido: application/x-www-form-urlencoded

Cuerpo de la petición resellerUpdateUser
CampoTipoObligatorioReglas
passwordstringNo
reset_intervalinteger | stringNo
resource_limitinteger | stringNo
bandwidth_limitnumber | stringNo
accounting_idstringNo
customstringNo
Ejemplo
{
  "bandwidth_limit": 250
}

Respuestas

  • 200Correctoapplication/json

    Campos (15)
    Respuestas resellerUpdateUser 200
    CampoTipoObligatorioReglas
    usersarray<object>Sí
    users[].idstringSí
    • Patrón: ^u[0-9a-f]{9}$
    users[].emailstringSí
    users[].api_keystringSí
    users[].createdstringSí
    users[].accounting_idstringSí
    users[].bandwidth_usagestring | numberSí
    users[].bandwidth_limitstring | numberSí
    users[].resource_limitinteger | stringSí
    users[].customstringSí
    • Puede ser null
    users[].reset_intervalinteger | stringSí
    users[].usage_periodintegerSí
    users[].last_reset_datestringSí
    users[].next_reset_datestringSí
    • Puede ser null
    users[].rolesarray<string>Sí
    Ejemplo
    {
      "users": [
        {
          "id": "u0a1b2c3d4",
          "email": "customer@example.com",
          "api_key": "SYNTHETIC-USER-API-KEY-0000000000000000000000000000",
          "created": "2026-01-15T10:00:00+00:00",
          "accounting_id": "ACC-1001",
          "bandwidth_usage": "12.50000",
          "bandwidth_limit": "250",
          "resource_limit": 5,
          "custom": null,
          "reset_interval": 30,
          "usage_period": 3,
          "last_reset_date": "2026-01-01T00:00:00+00:00",
          "next_reset_date": "2026-01-31T00:00:00+00:00",
          "roles": [
            "ROLE_USER"
          ]
        }
      ]
    }
  • 401No autenticado

    Cabeceras: WWW-Authenticate: Basic realm="Secured Area"

  • 404No encontradoapplication/json

    Ejemplo
    []
  • 500Error interno del servidortext/html

curl
curl -X PATCH 'https://reseller.cdnify.lat/users/u0a1b2c3d4' \
  -u "$CDNIFY_RESELLER_API_KEY:x" \
  --data-urlencode 'bandwidth_limit=250'
DELETE/users/{user}

Eliminar un usuario

Elimina un usuario del revendedor.

Autenticación
HTTP Basic con la API key del revendedor
Servidor
https://reseller.cdnify.lat
En CDNify
Mismo comportamiento que antes
Equivalente en la API v2
Sin equivalente en la API v2

Parámetros

Parámetros resellerDeleteUser
NombreEnTipoObligatorioReglas
userRutastringSí

Respuestas

  • 204Sin contenido

  • 401No autenticado

    Cabeceras: WWW-Authenticate: Basic realm="Secured Area"

curl
curl -X DELETE 'https://reseller.cdnify.lat/users/u0a1b2c3d4' \
  -u "$CDNIFY_RESELLER_API_KEY:x"
GET/users/{user}/bandwidth_history

Historial de ancho de banda de un usuario

Devuelve los periodos de consumo de un usuario con el ancho de banda de cada uno.

Autenticación
HTTP Basic con la API key del revendedor
Servidor
https://reseller.cdnify.lat
En CDNify
Mismo comportamiento que antes
Equivalente en la API v2

Parámetros

Parámetros resellerGetBandwidthHistory
NombreEnTipoObligatorioReglas
userRutastringSí

Respuestas

  • 200Correctoapplication/json

    Campos (7)
    Respuestas resellerGetBandwidthHistory 200
    CampoTipoObligatorioReglas
    historyarray<object>Sí
    history[].usage_periodintegerSí
    history[].startstringSí
    history[].endstringSí
    history[].limitstring | numberSí
    history[].usagestring | numberSí
    history[].customstringSí
    • Puede ser null
    Ejemplo
    {
      "history": [
        {
          "usage_period": 2,
          "start": "2025-12-01T00:00:00+00:00",
          "end": "2026-01-01T00:00:00+00:00",
          "limit": "100.00000",
          "usage": "37.25000",
          "custom": null
        }
      ]
    }
  • 401No autenticado

    Cabeceras: WWW-Authenticate: Basic realm="Secured Area"

  • 404No encontradoapplication/json

    Ejemplo
    []
curl
curl 'https://reseller.cdnify.lat/users/u0a1b2c3d4/bandwidth_history' \
  -u "$CDNIFY_RESELLER_API_KEY:x"
POST/users/{user}/reset_usage

Reiniciar el consumo de un usuario

Cierra el periodo de consumo actual de un usuario y empieza uno nuevo a cero.

Autenticación
HTTP Basic con la API key del revendedor
Servidor
https://reseller.cdnify.lat
En CDNify
Mismo comportamiento que antes
Equivalente en la API v2
Sin equivalente en la API v2

Parámetros

Parámetros resellerResetUsage
NombreEnTipoObligatorioReglas
userRutastringSí

Respuestas

  • 200Correctoapplication/json

    Campos (15)
    Respuestas resellerResetUsage 200
    CampoTipoObligatorioReglas
    usersarray<object>Sí
    users[].idstringSí
    • Patrón: ^u[0-9a-f]{9}$
    users[].emailstringSí
    users[].api_keystringSí
    users[].createdstringSí
    users[].accounting_idstringSí
    users[].bandwidth_usagestring | numberSí
    users[].bandwidth_limitstring | numberSí
    users[].resource_limitinteger | stringSí
    users[].customstringSí
    • Puede ser null
    users[].reset_intervalinteger | stringSí
    users[].usage_periodintegerSí
    users[].last_reset_datestringSí
    users[].next_reset_datestringSí
    • Puede ser null
    users[].rolesarray<string>Sí
    Ejemplo
    {
      "users": [
        {
          "id": "u0a1b2c3d4",
          "email": "customer@example.com",
          "api_key": "SYNTHETIC-USER-API-KEY-0000000000000000000000000000",
          "created": "2026-01-15T10:00:00+00:00",
          "accounting_id": "ACC-1001",
          "bandwidth_usage": 0,
          "bandwidth_limit": "100",
          "resource_limit": 5,
          "custom": null,
          "reset_interval": 30,
          "usage_period": 4,
          "last_reset_date": "2026-01-01T00:00:00+00:00",
          "next_reset_date": "2026-01-31T00:00:00+00:00",
          "roles": [
            "ROLE_USER"
          ]
        }
      ]
    }
  • 401No autenticado

    Cabeceras: WWW-Authenticate: Basic realm="Secured Area"

  • 404No encontradoapplication/json

    Ejemplo
    []
curl
curl -X POST 'https://reseller.cdnify.lat/users/u0a1b2c3d4/reset_usage' \
  -u "$CDNIFY_RESELLER_API_KEY:x"