/foreign/archives/{id}/inspect
0.2.0Unchanged since publicationInspect a tracked archive and save the report
usersallRuns the same checks as POST /foreign/inspect on the tracked archive using the supplied choices. The report identifies the proposed account, account name, domain and database conflicts, missing PHP versions or services, the order in which to install missing software, and anything the import would skip or leave behind. Inspection takes under a minute regardless of archive size. It reads only metadata, without unpacking the archive or creating an account.
A successful request returns 200 with archive and import, which contains the inspection report. UrbeStack saves the report and choices on the tracked archive. A new inspection replaces the report. If the file size or modification time changes, the tracked archive shows state new, and GET /foreign/archives/{id} still returns the saved report in import. A subsequent scan that detects the change clears the report and preserves the choices. If inspection fails, for example because the file has an invalid archive format or tar cannot read it, UrbeStack returns the error and saves the reason on the tracked archive.
Use as to override the original account name and paths to choose rewrite (the default) or leave for references to the old home path. Use default_mailbox to override the default email address of <name>@<main domain> for the account's own mailbox. Supply only the local part, which UrbeStack converts to lowercase. It can contain 1 to 64 ASCII letters, digits, periods, underscores or hyphens and must begin and end with a letter or digit. Use skip_databases to list up to 100 databases by their names in the archive. Each name can contain 1 to 64 ASCII letters, digits or underscores. Invalid paths, default_mailbox or skip_databases values return 400.
Administrators and resellers can call this operation with a token that has the users scope. Resellers can inspect only their own tracked archives in their home directory.
As a command
Run as root on the serverParameters
idpath ·integer, 1 or moreRequiredasUsernamedefault_mailboxstring, matching ^[a-z0-9]([a-z0-9._-]{0,62}[a-z0-9])?$pathsstring, one of rewrite, leaveskip_databasesarray of string, matching ^[A-Za-z0-9_]{1,64}$Example
See the API overview for how to set $API and $TOKEN.curl -sS -X POST "$API/foreign/archives/1/inspect" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"as": "alice",
"default_mailbox": "text",
"paths": "rewrite",
"skip_databases": [
"text"
]
}'200 OK{
"archive": {
"account": "text",
"changed": true,
"choices": {
"as": "alice",
"default_mailbox": "text",
"paths": "rewrite",
"skip_databases": [
"text"
]
},
"dir": "text",
"error": "Domain 'example.com' already exists",
"id": 1,
"import": {},
"job": {},
"mtime": "text",
"name": "alice",
"owner": "text",
"path": "public_html/index.php",
"present": true,
"read_at": "text",
"read_error": "text",
"seen_at": "text",
"size": 1,
"state": "new",
"summary": {}
},
"import": {}
}Errors
71 errors, each a status and a sentence400'<_>' is not a database name400--archive takes --show, --inspect or --queue, or --file with --job for the import itself400--file is required400<_> is set per domain, on the PHP page's Domains tab, never as a server default400<name> has an owner: move them to the administrator before changing their role400<name> is an administrator: administrators have no home, so nothing to back up400<name> is an administrator: administrators have no system account, so no shell400<user.name> is an administrator: administrators have no home, so no FTP accounts400A new job is queued or running400A subdomain belongs to the same user as its parent400A subdomain cannot have a subdomain as its parent400An administrator has no shell: only a customer has a system account400Cannot demote or suspend the last active administrator400Domain name required400Domain name too long400Domains belong to users with role 'user'400Invalid IPv4 address400Invalid IPv6 address400Invalid PHP version, expected e.g. 8.2400Invalid boolean400Invalid domain name400Invalid email address400Invalid id400Invalid password hash400Invalid password: 8 to 128 printable characters400Invalid port400Invalid role: admin, user or reseller400Invalid setting key400Invalid status400Invalid system password hash400Invalid template name400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Job parameters must be an object400Only a customer has an owner: an administrator or a reseller is the administrator's own400PHP settings must be an object of setting: value400Subdomain '<name>' does not sit under '<parent.name>'400The second factor can only be turned off here; a user enrols from their own page400Unknown PHP version '<version>'400Unknown job type400Username '<value>' is reserved400default_mailbox is the local part of an address under the main domain400paths is rewrite or leave400skip_databases is a list of database names400skip_databases may name at most 100 databases400skip_databases names databases as the archive names them401Authentication required403Cannot read 403Insufficient privileges404Domain '<name>' not found404No archive at 404Parent domain '<parent>' not found404Setting '<key>' not found404User '<name>' not found404User '<owner>' not found409'<alias>' is already a domain here409'<alias>' is already an alias409'<name>' is already an alias here409<login> is the customer's own login409<msg> Nothing was changed.409<name> is being imported (job <job_id>): wait for the job409<name> is being imported already (job <job_id>)409<name> is on the package <p.name> of the reseller <p.owner>: change the package before the move409<name> owns <owned> 409<name> was imported already, as <account>, which is on this server409<who> and its bandwidth for the month is used up: 409<who> and its disk is used up: 409A system account named '<name>' already exists409Domain '<name>' already exists409The FTP account <login> exists already409The package <p.name> allows <limit> 409User '<name>' already existsurbestack.com/docs/api/post-foreign-archives-id-inspect/