//This endpoint is called by SPET so no user info $app->get('/mediaForEntityForSpet/:experienceId/:entityId/:entityType', function ($experienceId, $entityId, $entityType) use($app) { $response = MediaService::getMediaForEntityForSpet($experienceId, $entityId, $entityType); Utils::echoResponse($response); }); $app->put('/mediaForEntity/:designerId/:experienceId/:entityId/:entityType', function ($designerId, $experienceId, $entityId, $entityType) use($app) { //Check authentication $rs = UserService::checkAuthentication($app->request->headers->get('apiKey')); if ($rs["status"] != SUCCESS) { Utils::echoResponse($rs); return; } //Get a user sent from client and convert it to a json object $jsonMediaOrder = $app->request->getBody(); $objMediaOrder = json_decode($jsonMediaOrder, true); $response = MediaService::updateMediaForEntity($designerId, $experienceId, $entityId, $entityType, $objMediaOrder["mediaOrder"]); Utils::echoResponse($response); }); $app->get('/mediaLibrary/:designerId', function ($designerId) use($app) { //Check authentication $rs = UserService::checkAuthentication($app->request->headers->get('apiKey')); if ($rs["status"] != SUCCESS) { Utils::echoResponse($rs); return; } $response = MediaService::getMediaLibrary($rs['data']->id, $designerId); Utils::echoResponse($response); }); //compress media $app->post('/mediaCompress', function () use($app) { //Check authentication