Skip to main content

handle_import

Function handle_import 

Source
pub async fn handle_import(
    req: HttpRequest,
    body: String,
    state: Data<AppState>,
) -> Result<HttpResponse, HaystackError>
Expand description

POST /api/import

Decodes the request body as a grid and adds/updates each row as an entity. Each row must have an id tag with a Ref value. Existing entities are updated; new entities are added. Returns a grid with the count of imported entities.