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.
Checklist
Section titled “Checklist”| If your integration… | See |
|---|---|
| authenticates with an API key, or reads or rotates it | 1. API keys are replaced by API tokens |
| changes its own password, email or 2FA settings | 2. Account actions that need a signed-in session |
| defines roles in code or infrastructure-as-code | 3. Permissions removed |
| manages server default credentials or network-device site defaults | 4. Endpoints removed |
| adds delegates to users | 5. Adding a delegate |
creates servers with POST /servers | 6. Server creation and registration |
| monitors jobs or reads device credentials | 7. Response fields removed |
reads, writes, backs up or restores configuration with /config | 8. Configuration |
| creates or deletes network devices, changes a user’s sign-in provider, or sets cleanup policies / site-controller one-liners | 9. Stricter requests |
| checks exact HTTP status codes | 10. Success status codes |
| uses an SDK generated from the OpenAPI spec | For SDK users |
Breaking changes
Section titled “Breaking changes”1. API keys are replaced by API tokens
Section titled “1. API keys are replaced by API tokens”Removed: GET /user/api-key and POST /user/actions/regenerate-api-key.
New: /user/api-tokens. A user can hold several tokens.
| Operation | Endpoint |
|---|---|
| List, get | GET /user/api-tokens, GET /user/api-tokens/{apiTokenId} |
| Settings and what a new token may grant | GET /user/api-tokens/settings |
| Create | POST /user/api-tokens |
| Regenerate | POST /user/api-tokens/{apiTokenId}/actions/regenerate |
| Delete | DELETE /user/api-tokens/{apiTokenId} |
- A token value starts with
msat_and is sent asAuthorization: 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.apiTokenDefaultValidityDurationis only the default that is offered. - A token has a
scope(accountby default;systemneeds theglobal_token_writepermission) and apermissionsdocument that limits what it can do. - Each token reports a
status(active,expiring,expiredorpaused) and alastUsedTimestamp.
Tokens can only be managed from a signed-in session.
- Calling
/user/api-tokens*with an API key or token returns401 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 returns403 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.
| Rule | What happens |
|---|---|
| Expiry | The token keeps the key’s expiry. A key that had no expiry now expires at upgrade time plus apiTokenDefaultValidityDuration (default 1 year). |
| Owner inactivity | A 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 delete | The 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:
apiKeyValidityDurationis removed fromAccount,AccountConfig,User,UserConfiguration,UpdateAccount,UpdateUserand the current user (GET /user). It is ignored when sent toPATCH /accounts/{id}/configorPATCH /users/{id}/config.apiKeyVisibilityis 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
apiTokenOwnerInactivityDurationto fit (see section 8). - Plan token rotation as a signed-in step.
- Stop sending
apiKeyValidityDuration. - Watch for the
user_api_token_expiredanduser_api_token_pausedevents, or setapiTokenNotificationEmailsto 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-passwordPOST /user/actions/initiate-email-changePOST /user/actions/2fa-generatePOST /user/actions/2fa-enablePOST /user/actions/2fa-disablePOST /user/actions/regenerate-jwt-salt
Action: call them from a signed-in session, not with a key or token.
3. Permissions removed
Section titled “3. Permissions removed”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_writeafc_read afc_write bgp_templates_readbgp_templates_write cloudinit_read cloudinit_writecontainer_platform_read container_platform_write cron_jobs_readcron_jobs_write datacenter_read datacenter_writedatalake_read datalake_write dataset_readdataset_write datastore_read datastore_writefranchises_write maintenance_read maintenance_writemetalcloud_access monitoring_agent_read monitoring_agent_writeprices_read prices_write resources_writesites_read sites_write skip_authenticatorskip_user_limits subscriptions_prices_write subscriptions_readsubscriptions_server_id_write subscriptions_write suspend_reasons_readsuspend_reasons_write threshold_read threshold_writeThe 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-credentialsGET,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-secretsGET /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:
usernameandpasswordinPOST /servers, orPOST /servers/{id}/actions/update-ipmi-credentials. - Network devices:
/network-devices/{id}/secrets.
5. Adding a delegate
Section titled “5. Adding a delegate”| Request | |
|---|---|
| Removed | POST /users/{userId}/actions/add-delegate/{delegateId} |
| Use | POST /users/{userId}/actions/add-delegate with a JSON body |
The body takes exactly one of:
userId— the ID of the delegateuserEmail— the email of the delegate
Sending both or neither returns 400.
Action: move the delegate ID from the path into the body.
6. Server creation and registration
Section titled “6. Server creation and registration”POST /servers accepts two new optional fields: serverStatus and redfishPort. serverStatus decides what
the call does.
serverStatus | What the call does | Response |
|---|---|---|
omitted or registering | Creates the server and starts registration | serverId, serverUUID, serialNumber, jobInfo, links |
planned or registration_ready | Creates the server record only | serverId, revision, links |
Registration of a server that was created without it is a separate action. Both actions require If-Match.
| Action | Allowed from | Result |
|---|---|---|
POST /servers/{id}/actions/set-registration-ready | planned | Status becomes registration_ready |
POST /servers/{id}/actions/register | planned, registration_ready | Starts 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 /serverswithoutserverStatusneeds no change. Do not callregisterafterwards; registration has already started. - To record a server ahead of time, create it with
serverStatus: plannedand callregisterwhen it is ready.
7. Response fields removed
Section titled “7. Response fields removed”| Object | Removed fields | Typical impact |
|---|---|---|
Job, JobArchive | type, exception, extraInfo | Job monitors that display or parse job errors |
NetworkDeviceCredentials | host, port, datacenter, driver, hostname | Tools that read connection details from the credentials endpoint |
NetworkDeviceControllerCredentials | everything except username and password (incl. snmpPassword, apiUsername, apiPassword) | As above |
PlatformConfiguration | powerDNS, BSIAdminURLRoot, repoURLRootMaster, uploads, storageConfig | Configuration 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).
8. Configuration
Section titled “8. Configuration”Authentication configuration (/config/auth, schema Users) has new settings:
| Setting | Default | Meaning |
|---|---|---|
maxFailedLoginAttemptsPerIp | 0 (off) | Failed logins from one IP address before it is temporarily blocked |
apiTokenDefaultValidityDuration | 1 year, in seconds | Validity offered for a new token |
apiTokensMaxPerUser | 10 | Tokens a user may hold |
apiTokenOwnerInactivityDuration | 90 days, in seconds | Time without an owner sign-in before the owner’s tokens are paused; 0 turns it off |
apiTokenExpiryWarningDays | 7 | Days before expiry at which a token is reported as expiring |
apiTokenNotificationEmails | [] | Addresses that receive a daily digest of expiring, expired and paused tokens |
requireEmailVerification | false | Whether a new built-in user must verify their email first |
PUT /config/authreplaces 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.apiKeyVisibilityis no longer a setting. It is ignored when sent.apiKeyValidityDurationis still present inUsers, but it does not control token lifetime.GET /confignever returns secrets. APUT /config/auththat leaves out the LDAP bind password, the CAPTCHA secret keys or the SAML service-provider private key keeps the stored values.oidc.clientSecretis the exception: when the body has anoidcsection,clientSecretmust be present as a string, or the call returns400 oidc.clientSecret: clientSecret must be a string. A body copied fromGETtherefore 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.
9. Stricter requests
Section titled “9. Stricter requests”DELETE /network-devices/{id}requires anIf-Matchheader. Without it the call returns428. Read the device first and send its revision.skipRaidActionsaccepts onlyprovisioningandcleanup.registrationis rejected (create/update server cleanup policy).secondIpis 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,hp5950andjunos18.POST /network-devicesrejects them with400. The accepted names arearista_eos,brocade,cisco_aci51,cisco_ndfc,cumulus_linux,dummy,junos,nexus9000,nvidia_dpu,nvidia_ufm,os_10,sonic_enterpriseandvmware_vds. - A user cannot change their own sign-in provider.
PATCH /users/{id}/configwith a differentprovideron your own account returns403 You can't change your own sign-in provider.An administrator has to do it.
10. Success status codes changed
Section titled “10. Success status codes changed”| Operation | v7.5 | v8.0 |
|---|---|---|
POST /firmware/baseline | 200 | 201 |
POST /firmware/binary | 200 | 201 |
POST /firmware/catalog | 200 | 201 |
POST /servers/{id}/actions/syslog-subscribe | 204 | 202 |
Action: treat any 2xx as success rather than checking for an exact code.
For SDK users
Section titled “For SDK users”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 /serversresponse type: the spec documentsCreateServerResponse(serverId,revision,links). When registration starts, the response also carriesserverUUID,serialNumberandjobInfo, which a typed client does not expose. Read them from the raw response, or get the UUID and serial number fromGET /servers/{id}.- Add delegate signature:
addUserDelegatetakes a body (AddUserDelegate) instead of adelegateIdpath parameter. - Configuration properties change from
objectto their real type (string, integer, boolean). They are inUsers,UsersProvider,Saml,Oidc,LdapServer,*ProfileMapping,GroupMapping,Branding,BrandingBase,Logo,Favicon,SyslogRule,RateLimitingConfig,LicenseMicroserviceandMicroservicesAuth. The data on the wire is the same. - Renamed response schemas:
GET /userreturnsCurrentUser, which holdsaccessibleResourcesandroleAccessibleResources.User(used byGET /users/{id}) does not have them.- Firmware upgrade actions return
FirmwareJobInfo(addsrefusedComponents). PATCH …/vm-instances/{id}/configreturnsVMInstanceConfiguration.
- Named response schemas removed:
ExtensionCredentials(GET /extensions/{id}/siteConfig/{siteId}/credentials) andInstancesPowerState(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.endpointInstanceGroupEndpointInstancesMaxCountandallocationSourceIdonSubnet,IpandIpRange. Clients that ignore unknown fields are not affected. NetworkDeviceDriverenum has fewer values (see section 9).
Relaxed in v8.0
Section titled “Relaxed in v8.0”These changes do not break clients:
If-Matchis not required onPATCH /dns-zones/{id},PUT /os-templates/{id},PUT /template-assets/{id},PATCH /users/{id}/meta,DELETE /external-systems/{id},DELETE /external-connections/{id}andDELETE /external-connections/{id}/interfaces/{interfaceId}.- These fields are not required:
JobInfo.jobGroupId,UpdateServerIpmiCredentials.updateOnServer,GenerateSiteControllerOneliner.msTunnelSecret,ExtensionInfrastructureLogicalNetwork.profileLabelandFirmwareMinimumVersion.componentName.
New in the v8.0 API
Section titled “New in the v8.0 API”- 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/tokenand/user/cli-login/{userCode}(withapproveanddenyactions). - Service accounts:
POST /service-accounts/actions/sign-inexchanges a token from the OIDC provider for a session token. It is off untiloidc.serviceAccountAudienceis 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) andGET /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.isBundleandfilter.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.