Skip to content

Billing exports

The portal can deliver your monthly usage as CSV files, either on a schedule or as a one-off export. This lets you feed Sunet Cloud usage straight into your own finance system instead of waiting for a file to be sent to you.

Open Billing in the top bar to manage exports.

Prices are not configured here

Export jobs control when and where your usage CSVs are delivered, not what anything costs. For current, authoritative rates, see the official Sunet VDC price list.

Scheduled export jobs

A billing job is a saved, recurring export. The Billing page lists your active jobs (and any you have disabled). Each job covers one or more contracts and delivers on a schedule you choose.

Choose New job and fill in four sections.

Basics

  • Job name: a label for the job.
  • Enabled: whether the job runs on its schedule. Turn it off to pause a job without deleting it.

Scope

  • Include all contracts you have access to, or untick that and select specific contracts.
  • Generate one file per contract: when ticked, each contract gets its own CSV for the period. When unticked, a single CSV containing all the selected contracts is produced.

Schedule

A standard five-field cron expression, interpreted in UTC. The default 0 6 1 * * runs at 06:00 on the first day of every month, which suits a monthly billing cycle.

Delivery

Pick how the files are sent:

  • WebDAV: provide the target URL, a username, and a password. The files are uploaded there.
  • Email: provide a recipient address. The files are emailed.

You also set a filename template. These tokens are substituted at delivery time:

Token Replaced with
{contract} the contract number
{year} the period year
{month} the period month
{day} the day the export runs
{date} the export date

For example, billing-{year}-{month}.csv produces billing-2026-06.csv.

Delivering to Sunet Drive over WebDAV

Sunet Drive is a common delivery target. There are two ways to set it up, depending on whether you want to deliver into your own Drive or into a shared upload folder. In both cases the export uploads a single file with PUT and does not create folders, so the destination folder must already exist.

A share link is not a WebDAV URL

Do not paste a public share link (the https://sunet.drive.sunet.se/s/... kind from the Share dialog) straight into the WebDAV URL field. That address is the share web page, not a WebDAV endpoint, and uploads to it fail. Use one of the two methods below instead.

Option 1: your own account

Deliver into your own Drive, authenticating as yourself.

Find your WebDAV URL in Drive: open the Files app and choose Files settings in the bottom left. It has the form:

https://sunet.drive.sunet.se/remote.php/dav/files/<your-username>/

<your-username> is your Drive username, URL-encoded. The @ becomes %40, so kano@sunet.se appears as kano%40sunet.se.

To deliver into a specific folder, create that folder in Drive first, then append its path, URL-encoding any spaces or special characters:

https://sunet.drive.sunet.se/remote.php/dav/files/kano%40sunet.se/Fakturaunderlag/VDC-underlag/

In the job's delivery fields, set this as the WebDAV URL, your Drive username as the username, and an application password as the password.

Use an application password

Generate a dedicated application password for the export rather than using your account password. See Generate an API key (application password).

If you would rather not store personal credentials in the portal, deliver to a public upload link instead. The export authenticates with the link's token rather than an account, so anyone holding the link can write to the folder.

Create the link in Drive:

  1. Open the Files app and go to (or create) the destination folder.
  2. Open the folder's Share panel and create a Share link.
  3. In the link's settings, choose Allow upload and editing. A view-only link is rejected, and "File drop (upload only)" blocks the idempotent overwrite on re-runs, so pick Allow upload and editing.
  4. Copy the link, for example https://sunet.drive.sunet.se/s/aB3xKp9QmZ2rW7t. The token is the part after /s/, here aB3xKp9QmZ2rW7t.

Then set the job's delivery fields:

Field Value
WebDAV URL https://sunet.drive.sunet.se/public.php/webdav/
Username the token, for example aB3xKp9QmZ2rW7t
Password blank, or the link's password if you set one

To deliver into a subfolder of the shared folder, append that path to the URL. As with option 1, the folder must already exist.

Running, editing, and deleting a job

Open a job to see its configuration and its recent runs. From there you can:

  • Run now: run the job immediately for the current period.
  • Run for a specific period: under Manual run, set a year and month and run that period.
  • Edit the job's scope, schedule, or delivery.
  • Delete the job.

Re-runs are safe

Running the same period again is idempotent: it overwrites the previous file in place rather than creating a duplicate. Use this to re-issue a period after a delivery failed.

One-off exports

If you just need a single export and don't want a recurring job, use Run once from the Billing page. It generates and delivers a CSV one time, using a scope, period, and delivery target you specify on the spot, without saving anything.