Skip to content

API upgrade guide from v7.5.x to v8.0

MetalCloud v8.0 changes the REST API (v2) in ways that can break existing scripts, integrations and generated SDKs. This page lists what an API client has to change when moving from v7.5.4 to v8.0. Review it before upgrading a controller that is used by automation.

Most integrations are affected by only a few of these changes. Use the checklist to find the ones that apply to you.

If your integration…See
authenticates with an API key, or reads or rotates it1. API keys are replaced by API tokens
changes its own password, email or 2FA settings2. Account actions that need a signed-in session
defines roles in code or infrastructure-as-code3. Permissions removed
manages server default credentials or network-device site defaults4. Endpoints removed
adds delegates to users5. Adding a delegate
creates servers with POST /servers6. Server creation and registration
monitors jobs or reads device credentials7. Response fields removed
reads, writes, backs up or restores configuration with /config8. Configuration
creates or deletes network devices, changes a user’s sign-in provider, or sets cleanup policies / site-controller one-liners9. Stricter requests
checks exact HTTP status codes10. Success status codes
uses an SDK generated from the OpenAPI specFor SDK users

Removed: GET /user/api-key and POST /user/actions/regenerate-api-key.

New: /user/api-tokens. A user can hold several tokens.

OperationEndpoint
List, getGET /user/api-tokens, GET /user/api-tokens/{apiTokenId}
Settings and what a new token may grantGET /user/api-tokens/settings
CreatePOST /user/api-tokens
RegeneratePOST /user/api-tokens/{apiTokenId}/actions/regenerate
DeleteDELETE /user/api-tokens/{apiTokenId}
  • A token value starts with msat_ and is sent as Authorization: Bearer <token>. It is returned only once, in the create or regenerate response.
  • Every token has its own required expiresTimestamp, at most 5 years ahead. apiTokenDefaultValidityDuration is only the default that is offered.
  • A token has a scope (account by default; system needs the global_token_write permission) and a permissions document that limits what it can do.
  • Each token reports a status (active, expiring, expired or paused) and a lastUsedTimestamp.

Tokens can only be managed from a signed-in session.

  • Calling /user/api-tokens* with an API key or token returns 401 Authorization with API token not allowed.
  • Create and regenerate also need a fresh identity check: call POST /user/actions/reauthenticate (password, plus the authenticator code when 2FA is on). It allows one create or regenerate within 5 minutes; without it the call returns 403 reauthentication_required.
  • Automation can therefore not rotate its own credential.

API keys created before v8.0 keep authenticating, with limits. At upgrade each key becomes a token named API key (isLegacy: true) with the same value and the same access as its owner.

RuleWhat happens
ExpiryThe token keeps the key’s expiry. A key that had no expiry now expires at upgrade time plus apiTokenDefaultValidityDuration (default 1 year).
Owner inactivityA token is paused when its owner has not signed in for apiTokenOwnerInactivityDuration (default 90 days; 0 turns the rule off). API calls do not count as a sign-in. The request returns 401 API token is paused because its owner hasn't signed in within the allowed period.
Regenerate or deleteThe old key value stops working. Regenerate returns a new msat_ token.

The inactivity rule applies to every token, not only to converted keys. Service accounts that never sign in are paused after the inactivity period.

Fields removed:

  • apiKeyValidityDuration is removed from Account, AccountConfig, User, UserConfiguration, UpdateAccount, UpdateUser and the current user (GET /user). It is ignored when sent to PATCH /accounts/{id}/config or PATCH /users/{id}/config.
  • apiKeyVisibility is removed from the authentication configuration (Users).

Action:

  • Remove calls that read or regenerate the key.
  • Check when each converted key expires (GET /user/api-tokens) and replace it with a token before then.
  • For unattended service accounts, either have the owner sign in within the inactivity period or set apiTokenOwnerInactivityDuration to fit (see section 8).
  • Plan token rotation as a signed-in step.
  • Stop sending apiKeyValidityDuration.
  • Watch for the user_api_token_expired and user_api_token_paused events, or set apiTokenNotificationEmails to receive a daily digest.

2. Account actions that need a signed-in session

Section titled “2. Account actions that need a signed-in session”

These endpoints refuse an API key or token with 401 Authorization with API token not allowed.:

  • POST /user/actions/change-password
  • POST /user/actions/initiate-email-change
  • POST /user/actions/2fa-generate
  • POST /user/actions/2fa-enable
  • POST /user/actions/2fa-disable
  • POST /user/actions/regenerate-jwt-salt

Action: call them from a signed-in session, not with a key or token.

These permissions do not exist in v8.0. CreateRole and EditRole reject them with 400, and the upgrade removes them from existing custom roles.

admin_access admin_maintenance_read admin_maintenance_write
afc_read afc_write bgp_templates_read
bgp_templates_write cloudinit_read cloudinit_write
container_platform_read container_platform_write cron_jobs_read
cron_jobs_write datacenter_read datacenter_write
datalake_read datalake_write dataset_read
dataset_write datastore_read datastore_write
franchises_write maintenance_read maintenance_write
metalcloud_access monitoring_agent_read monitoring_agent_write
prices_read prices_write resources_write
sites_read sites_write skip_authenticator
skip_user_limits subscriptions_prices_write subscriptions_read
subscriptions_server_id_write subscriptions_write suspend_reasons_read
suspend_reasons_write threshold_read threshold_write

The site permissions are site_read and site_write (singular).

Action: remove these names from role definitions before applying them to v8.0, and review custom roles after the upgrade.

4. Endpoints removed without a direct replacement

Section titled “4. Endpoints removed without a direct replacement”

Server default credentials:

  • GET, POST /servers/default-credentials
  • GET, PATCH, DELETE /servers/default-credentials/{id}
  • GET /servers/default-credentials/{id}/credentials

Network-device site defaults:

  • GET /network-devices/defaults/{siteId}
  • GET /network-devices/default-secrets
  • GET /network-devices/health-monitoring-filter

Three of these calls answer 400 Validation failed (numeric string is expected) instead of 404, because the path is matched as an ID (for example /servers/{id}): GET /servers/default-credentials, GET /network-devices/default-secrets and GET /network-devices/health-monitoring-filter. Treat that error from these paths as “endpoint removed”.

Action: remove these calls from provisioning and switch-onboarding scripts, and set credentials per object:

  • Servers: username and password in POST /servers, or POST /servers/{id}/actions/update-ipmi-credentials.
  • Network devices: /network-devices/{id}/secrets.
Request
RemovedPOST /users/{userId}/actions/add-delegate/{delegateId}
UsePOST /users/{userId}/actions/add-delegate with a JSON body

The body takes exactly one of:

  • userId — the ID of the delegate
  • userEmail — the email of the delegate

Sending both or neither returns 400.

Action: move the delegate ID from the path into the body.

POST /servers accepts two new optional fields: serverStatus and redfishPort. serverStatus decides what the call does.

serverStatusWhat the call doesResponse
omitted or registeringCreates the server and starts registrationserverId, serverUUID, serialNumber, jobInfo, links
planned or registration_readyCreates the server record onlyserverId, revision, links

Registration of a server that was created without it is a separate action. Both actions require If-Match.

ActionAllowed fromResult
POST /servers/{id}/actions/set-registration-readyplannedStatus becomes registration_ready
POST /servers/{id}/actions/registerplanned, registration_readyStarts registration and returns the job

Calling either action on a server in another status returns 400. register also returns 400 when the server has no management address.

Action:

  • A client that sends POST /servers without serverStatus needs no change. Do not call register afterwards; registration has already started.
  • To record a server ahead of time, create it with serverStatus: planned and call register when it is ready.
ObjectRemoved fieldsTypical impact
Job, JobArchivetype, exception, extraInfoJob monitors that display or parse job errors
NetworkDeviceCredentialshost, port, datacenter, driver, hostnameTools that read connection details from the credentials endpoint
NetworkDeviceControllerCredentialseverything except username and password (incl. snmpPassword, apiUsername, apiPassword)As above
PlatformConfigurationpowerDNS, BSIAdminURLRoot, repoURLRootMaster, uploads, storageConfigConfiguration backup and restore tooling (see section 8)

Action: stop reading these fields.

  • Job errors: GET /jobs/{jobId}/exceptions.
  • Device connection details: GET /network-devices/{id} (managementAddress, managementPort, driver, identifierString, siteId).

Authentication configuration (/config/auth, schema Users) has new settings:

SettingDefaultMeaning
maxFailedLoginAttemptsPerIp0 (off)Failed logins from one IP address before it is temporarily blocked
apiTokenDefaultValidityDuration1 year, in secondsValidity offered for a new token
apiTokensMaxPerUser10Tokens a user may hold
apiTokenOwnerInactivityDuration90 days, in secondsTime without an owner sign-in before the owner’s tokens are paused; 0 turns it off
apiTokenExpiryWarningDays7Days before expiry at which a token is reported as expiring
apiTokenNotificationEmails[]Addresses that receive a daily digest of expiring, expired and paused tokens
requireEmailVerificationfalseWhether a new built-in user must verify their email first
  • PUT /config/auth replaces the whole section. Settings left out of the body are set to their defaults, so writing back a configuration saved before v8.0 resets the token settings.
  • apiKeyVisibility is no longer a setting. It is ignored when sent.
  • apiKeyValidityDuration is still present in Users, but it does not control token lifetime.
  • GET /config never returns secrets. A PUT /config/auth that leaves out the LDAP bind password, the CAPTCHA secret keys or the SAML service-provider private key keeps the stored values.
  • oidc.clientSecret is the exception: when the body has an oidc section, clientSecret must be present as a string, or the call returns 400 oidc.clientSecret: clientSecret must be a string. A body copied from GET therefore fails until it is added. An empty string keeps the stored secret.

Platform configuration (/config/platform) rejects removed sections. A PUT or PATCH that contains powerDNS, BSIAdminURLRoot, repoURLRootMaster, uploads or storageConfig returns 400.

Action:

  • After upgrading, read the configuration from v8.0, change it, add oidc.clientSecret, and write that back.
  • Do not restore a configuration saved before v8.0 unchanged. Remove the five platform sections from it first, and add the token settings you want to keep.
  • DELETE /network-devices/{id} requires an If-Match header. Without it the call returns 428. Read the device first and send its revision.
  • skipRaidActions accepts only provisioning and cleanup. registration is rejected (create/update server cleanup policy).
  • secondIp is removed from the site-controller one-liner request (GenerateSiteControllerOneliner) and is rejected when sent.
  • Network-device driver names removed: cumulus42, dell_s4000, dell_s4048, dell_s6010, hp5800, hp5900, hp5950 and junos18. POST /network-devices rejects them with 400. The accepted names are arista_eos, brocade, cisco_aci51, cisco_ndfc, cumulus_linux, dummy, junos, nexus9000, nvidia_dpu, nvidia_ufm, os_10, sonic_enterprise and vmware_vds.
  • A user cannot change their own sign-in provider. PATCH /users/{id}/config with a different provider on your own account returns 403 You can't change your own sign-in provider. An administrator has to do it.
Operationv7.5v8.0
POST /firmware/baseline200201
POST /firmware/binary200201
POST /firmware/catalog200201
POST /servers/{id}/actions/syslog-subscribe204202

Action: treat any 2xx as success rather than checking for an exact code.

If you generate a client from the OpenAPI spec (/api/v2/swagger-yaml), regenerate it against v8.0. Beyond the changes above, expect these type changes:

  • Security scheme renamed: apiKey → apiToken (still a Bearer header). Generated clients that set credentials by scheme name need the new name.
  • POST /servers response type: the spec documents CreateServerResponse (serverId, revision, links). When registration starts, the response also carries serverUUID, serialNumber and jobInfo, which a typed client does not expose. Read them from the raw response, or get the UUID and serial number from GET /servers/{id}.
  • Add delegate signature: addUserDelegate takes a body (AddUserDelegate) instead of a delegateId path parameter.
  • Configuration properties change from object to their real type (string, integer, boolean). They are in Users, UsersProvider, Saml, Oidc, LdapServer, *ProfileMapping, GroupMapping, Branding, BrandingBase, Logo, Favicon, SyslogRule, RateLimitingConfig, LicenseMicroservice and MicroservicesAuth. The data on the wire is the same.
  • Renamed response schemas:
    • GET /user returns CurrentUser, which holds accessibleResources and roleAccessibleResources. User (used by GET /users/{id}) does not have them.
    • Firmware upgrade actions return FirmwareJobInfo (adds refusedComponents).
    • PATCH …/vm-instances/{id}/config returns VMInstanceConfiguration.
  • Named response schemas removed: ExtensionCredentials (GET /extensions/{id}/siteConfig/{siteId}/credentials) and InstancesPowerState (POST /infrastructures/{id}/actions/power-get) are plain maps (variable name → value, instance ID → on / off / unknown).
  • New required response fields, for example FirmwareBinaryResponse.isBundle, LicenseAllowance.VCores, QuotaProfileLimits.endpointInstanceGroupEndpointInstancesMaxCount and allocationSourceId on Subnet, Ip and IpRange. Clients that ignore unknown fields are not affected.
  • NetworkDeviceDriver enum has fewer values (see section 9).

These changes do not break clients:

  • If-Match is not required on PATCH /dns-zones/{id}, PUT /os-templates/{id}, PUT /template-assets/{id}, PATCH /users/{id}/meta, DELETE /external-systems/{id}, DELETE /external-connections/{id} and DELETE /external-connections/{id}/interfaces/{interfaceId}.
  • These fields are not required: JobInfo.jobGroupId, UpdateServerIpmiCredentials.updateOnServer, GenerateSiteControllerOneliner.msTunnelSecret, ExtensionInfrastructureLogicalNetwork.profileLabel and FirmwareMinimumVersion.componentName.
  • API tokens: /user/api-tokens, plus re-authentication (/user/actions/reauthenticate, with OIDC and SAML variants).
  • Sign-in for command-line clients, approved in the browser: POST /cli-login, POST /cli-login/token and /user/cli-login/{userCode} (with approve and deny actions).
  • Service accounts: POST /service-accounts/actions/sign-in exchanges a token from the OIDC provider for a session token. It is off until oidc.serviceAccountAudience is set in the authentication configuration.
  • IPAM allocation providers and sources: /ipam/allocation-providers (with tasks) and /ipam/allocation-sources.
  • Server lifecycle actions: register, set-registration-ready, cleanup, replace, replacement-candidates.
  • Special-purpose tags: /special-purpose-tags.
  • Monitoring: /system-monitors (with alerts) and GET /service-monitor.
  • Infrastructure network connections: GET /infrastructures/{id}/config/networking/connections.
  • Other: GET /authentication/saml/metadata, GET /network-devices/{id}/drift-detection/status, POST /network-fabric-interconnects/{id}/actions/render, POST /servers/{id}/firmware/actions/search-dry-run, PUT /firmware/binary/{id}.
  • New list filters, including filter.connectivityError, filter.healthMonitoringEnabled, filter.firmwareScheduledUpgradesEnabled, filter.config.deploySkip, filter.isBundle and filter.componentClass.
  • New permissions: extension_credentials_read, global_token_write, network_device_controller_credentials_read, network_profile_allowed_for_user_read, network_profile_allowed_for_user_write, network_profile_allow_specific_vlan_ids, network_profile_mark_as_public, special_purpose_tags_read, special_purpose_tags_write, users_and_permissions_read, external_ipam_read, external_ipam_write.
  • New event types: server firmware upgrade and bundle events, system_monitor_alert, API token lifecycle events (user_api_token_*), command-line sign-in events (user_cli_login_approved, user_cli_login_denied), user_service_account_signed_in, server_skipped_during_deploy, and network-device connectivity error/restored events.