{"info":{"_postman_id":"2616cbd1-9c2e-4c60-a6b6-3ce1d4d09b11","name":"DGSIN-2526-30 - Eurovision Entries API","description":"<html><head></head><body><p>Colección de tests para la API de eurovision-entries. Cubre todos los métodos de la tabla azul (POST/GET/PUT/DELETE tanto en la colección como en el recurso concreto) y los códigos de estado relevantes (200, 201, 204, 400, 404, 405, 409, 422).</p>\n<p><strong>IMPORTANTE: ejecutar los tests en orden</strong> mediante el Collection Runner. Los tests son secuenciales: algunos crean datos que otros consultan/modifican/borran.</p>\n<p>Autor: Marco Tenorio Cortés - DGSIN 2025/2026 - Equipo 30</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"11195387","collectionId":"2616cbd1-9c2e-4c60-a6b6-3ce1d4d09b11","publishedId":"2sBXqNne64","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-05-11T16:19:47.000Z"},"item":[{"name":"01 - GET all entries filtered by year (200)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", () => {","    pm.response.to.have.status(200);","});","","pm.test(\"Response is an array\", () => {","    const data = pm.response.json();","    pm.expect(data).to.be.an('array');","});","","pm.test(\"Array is not empty\", () => {","    const data = pm.response.json();","    pm.expect(data.length).to.be.greaterThan(0);","});","","pm.test(\"Each entry has the expected fields\", () => {","    const data = pm.response.json();","    pm.expect(data[0]).to.have.property('country-code');","    pm.expect(data[0]).to.have.property('edition-year');","    pm.expect(data[0]).to.have.property('artist');","    pm.expect(data[0]).to.have.property('song-title');","    pm.expect(data[0]).to.have.property('final-position');","});","","pm.test(\"All entries belong to year 2023\", () => {","    const data = pm.response.json();","    data.forEach(entry => {","        pm.expect(entry['edition-year']).to.eql(2023);","    });","});"],"type":"text/javascript","id":"8df52ed4-978c-4e1d-a1f2-aef2e853de61"}}],"id":"f55828ad-e147-463c-bad4-55607d8d0759","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries?edition-year=2023","description":"<p>Lista todas las participaciones del año 2023. Filtramos para no traer 1735 documentos.</p>\n","urlObject":{"path":["api","v1","eurovision-entries"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[{"key":"edition-year","value":"2023"}],"variable":[]}},"response":[],"_postman_id":"f55828ad-e147-463c-bad4-55607d8d0759"},{"name":"02 - GET entry by country and year (200)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", () => {","    pm.response.to.have.status(200);","});","","pm.test(\"Returns Loreen's Tattoo (winner of Eurovision 2023)\", () => {","    const data = pm.response.json();","    pm.expect(data['country-code']).to.eql('se');","    pm.expect(data['edition-year']).to.eql(2023);","    pm.expect(data['artist']).to.eql('Loreen');","    pm.expect(data['final-position']).to.eql(1);","});","","pm.test(\"Response has all expected fields\", () => {","    const data = pm.response.json();","    pm.expect(data).to.have.property('song-title');","    pm.expect(data).to.have.property('total-points');","});"],"type":"text/javascript","id":"19fed7e4-4ab5-4125-83d5-ca14c0e33b33"}}],"id":"b96ecac9-2727-4057-82c0-3ffdcd6a0567","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries/se/2023","description":"<p>Recupera la participación de Suecia (Loreen - Tattoo) en Eurovisión 2023.</p>\n","urlObject":{"path":["api","v1","eurovision-entries","se","2023"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"b96ecac9-2727-4057-82c0-3ffdcd6a0567"},{"name":"03 - GET non-existing entry (404)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 404\", () => {","    pm.response.to.have.status(404);","});"],"type":"text/javascript","id":"7c2b54cf-9b58-4028-a435-8bd99cff8d0e"}}],"id":"46c1a682-cc9e-4581-a7be-47c86a8234aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries/xx/9999","description":"<p>Intenta recuperar una entrada que no existe. Debe devolver 404.</p>\n","urlObject":{"path":["api","v1","eurovision-entries","xx","9999"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"46c1a682-cc9e-4581-a7be-47c86a8234aa"},{"name":"04 - GET loadInitialData","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200 or 201\", () => {","    pm.expect([200, 201]).to.include(pm.response.code);","});","","pm.test(\"Response message mentions entries\", () => {","    pm.expect(pm.response.text().toLowerCase()).to.match(/entries|database/);","});"],"type":"text/javascript","id":"e59ba806-dba3-465d-a2bf-caf3ebe93ce9"}}],"id":"51913ce1-eb4b-4ea6-8fda-930c70048109","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries/loadInitialData","description":"<p>Carga datos iniciales si la BD está vacía. Como ya hay 1735 registros, devolverá un mensaje informativo.</p>\n","urlObject":{"path":["api","v1","eurovision-entries","loadInitialData"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"51913ce1-eb4b-4ea6-8fda-930c70048109"},{"name":"05 - POST new entry (201)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 201\", () => {","    pm.response.to.have.status(201);","});"],"type":"text/javascript","id":"1b3dd2d3-bc7b-4e9e-95a3-5f8ecd9ea79a"}}],"id":"0566e59e-6c75-4f90-895a-e8319f524761","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"country-code\": \"es\",\n  \"edition-year\": 2024,\n  \"artist\": \"Nebulossa\",\n  \"song-title\": \"Zorra\",\n  \"final-position\": 22,\n  \"total-points\": 30,\n  \"performance-language\": \"Spanish\"\n}"},"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries","description":"<p>Crea una nueva entrada (España en Eurovisión 2024 con Nebulossa). No existe en el dataset cargado, así que se creará.</p>\n","urlObject":{"path":["api","v1","eurovision-entries"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"0566e59e-6c75-4f90-895a-e8319f524761"},{"name":"06 - GET created entry to verify POST (200)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", () => {","    pm.response.to.have.status(200);","});","","pm.test(\"The created entry exists with correct data\", () => {","    const data = pm.response.json();","    pm.expect(data['country-code']).to.eql('es');","    pm.expect(data['edition-year']).to.eql(2024);","    pm.expect(data['artist']).to.eql('Nebulossa');","    pm.expect(data['song-title']).to.eql('Zorra');","    pm.expect(data['final-position']).to.eql(22);","});"],"type":"text/javascript","id":"f16f1faf-80a9-4490-bb50-48aa6f7562e8"}}],"id":"b77c3a1f-d252-4930-b4e4-bbc295cac768","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries/es/2024","description":"<p>Verifica que la entrada que acabamos de crear con POST realmente se persistió.</p>\n","urlObject":{"path":["api","v1","eurovision-entries","es","2024"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"b77c3a1f-d252-4930-b4e4-bbc295cac768"},{"name":"07 - POST duplicate entry (409)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 409 (Conflict)\", () => {","    pm.response.to.have.status(409);","});"],"type":"text/javascript","id":"a24959bc-cfd5-4589-9ea4-7c1287e23705"}}],"id":"c04f4a1f-4374-4355-abbe-dd5286b641e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"country-code\": \"es\",\n  \"edition-year\": 2024,\n  \"artist\": \"Nebulossa\",\n  \"song-title\": \"Zorra\",\n  \"final-position\": 22,\n  \"total-points\": 30,\n  \"performance-language\": \"Spanish\"\n}"},"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries","description":"<p>Intenta crear la MISMA entrada de nuevo. Debe fallar con 409 (Conflict).</p>\n","urlObject":{"path":["api","v1","eurovision-entries"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"c04f4a1f-4374-4355-abbe-dd5286b641e2"},{"name":"08 - POST incomplete entry (422)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 422 (Unprocessable Entity)\", () => {","    pm.response.to.have.status(422);","});"],"type":"text/javascript","id":"24a5a18c-477e-4e9e-a4a6-43866756d098"}}],"id":"43595e33-df33-49a6-8f03-a07c6ba7e209","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"country-code\": \"fr\",\n  \"edition-year\": 2024\n}"},"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries","description":"<p>POST sin todos los campos obligatorios (faltan artist, song-title, final-position). Debe devolver 422.</p>\n","urlObject":{"path":["api","v1","eurovision-entries"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"43595e33-df33-49a6-8f03-a07c6ba7e209"},{"name":"09 - PUT update entry (200)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", () => {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","id":"b2bc79e0-75ab-4e3f-b1d4-a3f8bd54c7f7"}}],"id":"0b3d6a0c-c489-4d98-9613-039ae25752f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"artist\": \"Nebulossa\",\n  \"song-title\": \"Zorra (versión actualizada)\",\n  \"final-position\": 22,\n  \"total-points\": 30,\n  \"performance-language\": \"Spanish\"\n}"},"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries/es/2024","description":"<p>Actualiza la canción de la entrada creada antes.</p>\n","urlObject":{"path":["api","v1","eurovision-entries","es","2024"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"0b3d6a0c-c489-4d98-9613-039ae25752f6"},{"name":"10 - GET to verify PUT update (200)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", () => {","    pm.response.to.have.status(200);","});","","pm.test(\"The song-title was updated\", () => {","    const data = pm.response.json();","    pm.expect(data['song-title']).to.include('versión actualizada');","});"],"type":"text/javascript","id":"0e878e95-3cd0-4fe3-b7e6-2ed4cbc89b27"}}],"id":"f542294f-2fe5-474e-91bb-ab22655cd358","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries/es/2024","description":"<p>Verifica que la actualización con PUT funcionó.</p>\n","urlObject":{"path":["api","v1","eurovision-entries","es","2024"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"f542294f-2fe5-474e-91bb-ab22655cd358"},{"name":"11 - PUT with inconsistent URL and body (400)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 400 (Bad Request)\", () => {","    pm.response.to.have.status(400);","});"],"type":"text/javascript","id":"d4c75cbd-dbf4-42d5-abe6-844bbb1bf601"}}],"id":"3688b1e1-60dc-429f-8191-a60abebd8bd8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"country-code\": \"fr\",\n  \"edition-year\": 2024,\n  \"artist\": \"Otro Artista\",\n  \"song-title\": \"Otra Canción\",\n  \"final-position\": 1\n}"},"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries/es/2024","description":"<p>PUT donde el country-code de la URL ('es') NO coincide con el del body ('fr'). Debe devolver 400.</p>\n","urlObject":{"path":["api","v1","eurovision-entries","es","2024"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"3688b1e1-60dc-429f-8191-a60abebd8bd8"},{"name":"12 - POST to specific resource (405)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 405 (Method Not Allowed)\", () => {","    pm.response.to.have.status(405);","});"],"type":"text/javascript","id":"609b02e0-b9f2-490e-badf-de8ba3806f8a"}}],"id":"ac822f85-9aa6-46b3-87f8-8341f5ce82f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{}"},"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries/se/2023","description":"<p>POST a un recurso concreto no está permitido según la tabla azul. Debe devolver 405.</p>\n","urlObject":{"path":["api","v1","eurovision-entries","se","2023"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ac822f85-9aa6-46b3-87f8-8341f5ce82f6"},{"name":"13 - PUT to collection (405)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 405 (Method Not Allowed)\", () => {","    pm.response.to.have.status(405);","});"],"type":"text/javascript","id":"d2cb92f0-3ae2-41fa-bfc9-4998c545ff5a"}}],"id":"1ea1e838-d91c-4df8-bb3a-c607a263c6ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{}"},"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries","description":"<p>PUT a la colección completa no está permitido según la tabla azul. Debe devolver 405.</p>\n","urlObject":{"path":["api","v1","eurovision-entries"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"1ea1e838-d91c-4df8-bb3a-c607a263c6ed"},{"name":"14 - DELETE entry (204)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 204 (No Content)\", () => {","    pm.response.to.have.status(204);","});"],"type":"text/javascript","id":"da9b2c05-6981-49d2-ad58-53b3861400c2"}}],"id":"69b71c4f-75cd-41ee-8171-3e13d8c1926c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries/es/2024","description":"<p>Borra la entrada que creamos antes (Nebulossa 2024).</p>\n","urlObject":{"path":["api","v1","eurovision-entries","es","2024"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"69b71c4f-75cd-41ee-8171-3e13d8c1926c"},{"name":"15 - GET deleted entry confirms 404","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 404 (entry no longer exists)\", () => {","    pm.response.to.have.status(404);","});"],"type":"text/javascript","id":"8a6acc8e-3bdf-4dc3-9821-49fd0fd88f46"}}],"id":"a1f3c635-1bdc-41b5-9bde-d8182e949004","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries/es/2024","description":"<p>Verifica que la entrada borrada ya no existe (404).</p>\n","urlObject":{"path":["api","v1","eurovision-entries","es","2024"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a1f3c635-1bdc-41b5-9bde-d8182e949004"},{"name":"16 - DELETE non-existing entry (404)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 404\", () => {","    pm.response.to.have.status(404);","});"],"type":"text/javascript","id":"0bc944d6-1a5c-4bc4-9d6a-14d3831f2417"}}],"id":"ce814a38-07de-46f5-84e2-3d7b9e2a40d6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries/xx/9999","description":"<p>Intenta borrar una entrada que no existe. Debe devolver 404.</p>\n","urlObject":{"path":["api","v1","eurovision-entries","xx","9999"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ce814a38-07de-46f5-84e2-3d7b9e2a40d6"},{"name":"17 - DELETE all entries (204) ⚠️ DESHABILITADO","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 204\", () => {","    pm.response.to.have.status(204);","});"],"type":"text/javascript","id":"70645019-e68b-4525-9348-01881bea9024"}}],"id":"a4dbb27f-44a4-424f-bdbc-bdef4423b9be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://dgsin-2526-30-backend.ew.r.appspot.com/api/v1/eurovision-entries","description":"<p>⚠️ PELIGRO: Este test borra TODA la colección. Deshabilítalo en el Collection Runner. Solo ejecutar de forma manual cuando quieras probar el reset completo (después llama a loadInitialData para repoblar).</p>\n","urlObject":{"path":["api","v1","eurovision-entries"],"host":["https://dgsin-2526-30-backend.ew.r.appspot.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"a4dbb27f-44a4-424f-bdbc-bdef4423b9be"}],"variable":[{"key":"base_url","value":"https://dgsin-2526-30-backend.ew.r.appspot.com","type":"string"}]}