When to use this endpoint

Use Assets_restoreMultiple for the bulk Restore Archived Assets action. It does not restore rows that were soft-deleted with deleted=1.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session. The handler requires login or an established tenant database context and performs no additional Asset-page or role-permission check unless the page says otherwise.

Every query and write uses the authenticated tenant’s tables. CRM1 and CRM2 may hide actions through client-side permissions that these collection routes do not repeat.

Parameters

ParameterTypeRequiredDescription
idsJSON array stringYesArchived asset IDs, processed internally in groups of 100. Supply positive decimal IDs only.

Example request

$result = FM_api('Assets_restoreMultiple', [
	'ids' => json_encode(['4821', '4822']),
]);

Example response

{
  "ok": 1
}

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.
{"error":"missing or invalid parameter: ids"}The key is absent. Invalid decoded values are not safely normalized.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Only rows with archived=1 are selected. The route returns success when none match.
  • It sets archived=0; it does not change the separate active flag.

Side effects

  • Writes an unarchive history entry, refreshes last_edited, and sets edited_uuid to Assets_restoreMultiple.
  • Deletes matching assets rows from the tenant deletion log so mobile synchronization no longer treats the archive as a deletion.

See it in Fieldmotion

CRM1

The CRM1 Assets archive view calls this route from its bulk restore action.

CRM2

Open Assets, display archived rows, select them, and choose Restore Archive Assets.

Related endpoints