def METHOD_NAME(dashboard_id: int, permalink_salt: str, test_client, login_as_admin):
    key = test_client.post(
        f"api/v1/dashboard/{dashboard_id}/permalink", json=STATE
    ).json["key"]
    resp = test_client.get(f"api/v1/dashboard/permalink/{key}")
    assert resp.status_code == 200
    result = resp.json
    dashboard_uuid = result["dashboardId"]
    assert Dashboard.get(dashboard_uuid).id == dashboard_id
    assert result["state"] == STATE
    id_ = decode_permalink_id(key, permalink_salt)
    db.session.query(KeyValueEntry).filter_by(id=id_).delete()
    db.session.commit()