{"info":{"_postman_id":"f3be0a7c-6b76-49ef-aac9-feecd94a8a6a","name":"API Documentation","description":"<html><head></head><body><h1 id=\"documentazione-api-cip\">📄 Documentazione API Cip</h1>\n<p>This template contains a boilerplate for documentation that you can quickly customize and reuse.</p>\n<h2 id=\"🔖-how-to-use-this-template\">🔖 How to use this template</h2>\n<ul>\n<li>Replace the content given brackets (()) with your API's details.</li>\n<li>Tips are formatted in <code>codespan</code> - feel free to read and remove them.</li>\n</ul>\n<hr>\n<p><code>Start with a brief overview of what your API offers.</code></p>\n<p>The ((product name)) provides many API products, tools, and resources that enable you to ((add product value here)).</p>\n<p><code>You can also list the APIs you offer, link to the relevant pages, or do both in this section.</code></p>\n<h2 id=\"getting-started-guide\"><strong>Getting started guide</strong></h2>\n<p><code>List the steps or points required to start using your APIs. Make sure to cover everything required to reach success with your API as quickly as possible.</code></p>\n<p>To start using the ((add APIs here)), you need to -</p>\n<p><code>The points given below are from The Postman API's documentation. You can reference it to write your own getting started guide.</code></p>\n<ul>\n<li>You must use a valid API Key to send requests to the API endpoints. You can get your API key from Postman's <a href=\"https://go.postman.co/settings/me/api-keys\">integrations dashboard</a>.</li>\n<li>The API has <a href=\"https://postman.postman.co/workspace/Collection-Templates~6311738d-2e70-441f-ae12-78caf078c5b7/collection/22517504-e9c28f47-1253-44af-a2f3-20dce4da1f18?ctx=documentation#rate-and-usage-limits\">rate and usage limits</a>.</li>\n<li>The API only responds to HTTPS-secured communications. Any requests sent via HTTP return an HTTP 301 redirect to the corresponding HTTPS resources.</li>\n<li>The API returns request responses in JSON format. When an API request returns an error, it is sent in the JSON response as an error key.</li>\n</ul>\n<h2 id=\"authentication\">Authentication</h2>\n<p><code>Add details on the authorization keys/tokens required, steps that cover how to get them, and the relevant error codes.</code></p>\n<p>The ((product name)) API uses ((add your API's authorization type)) for authentication.</p>\n<p><code>The details given below are from the Postman API's documentation. You can reference it to write your own authentication section.</code></p>\n<p>Postman uses API keys for authentication. You can generate a Postman API key in the <a href=\"https://postman.postman.co/settings/me/api-keys\">API keys</a> section of your Postman account settings.</p>\n<p>You must include an API key in each request to the Postman API with the X-Api-Key request header.</p>\n<h3 id=\"authentication-error-response\">Authentication error response</h3>\n<p>If an API key is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code.</p>\n<h2 id=\"rate-and-usage-limits\">Rate and usage limits</h2>\n<p><code>Use this section to cover your APIs' terms of use. Include API limits, constraints, and relevant error codes, so consumers understand the permitted API usage and practices.</code></p>\n<p><code>The example given below is from The Postman API's documentation. Use it as a reference to write your APIs' terms of use.</code></p>\n<p>API access rate limits apply at a per-API key basis in unit time. The limit is 300 requests per minute. Also, depending on your plan, you may have usage limits. If you exceed either limit, your request will return an HTTP 429 Too Many Requests status code.</p>\n<p>Each API response returns the following set of headers to help you identify your use status:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>X-RateLimit-Limit</code></td>\n<td>The maximum number of requests that the consumer is permitted to make per minute.</td>\n</tr>\n<tr>\n<td><code>X-RateLimit-Remaining</code></td>\n<td>The number of requests remaining in the current rate limit window.</td>\n</tr>\n<tr>\n<td><code>X-RateLimit-Reset</code></td>\n<td>The time at which the current rate limit window resets in UTC epoch seconds.</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"503-response\">503 response</h3>\n<p>An HTTP <code>503</code> response from our servers indicates there is an unexpected spike in API access traffic. The server is usually operational within the next five minutes. If the outage persists or you receive any other form of an HTTP <code>5XX</code> error, <a href=\"https://support.postman.com/hc/en-us/requests/new/\">contact support</a>.</p>\n<h3 id=\"need-some-help\"><strong>Need some help?</strong></h3>\n<p><code>Add links that customers can refer to whenever they need help.</code></p>\n<p>In case you have questions, go through our tutorials ((link to your video or help documentation here)). Or visit our FAQ page ((link to the relevant page)).</p>\n<p>Or you can check out our community forum, there’s a good chance our community has an answer for you. Visit our developer forum ((link to developer forum)) to review topics, ask questions, and learn from others.</p>\n<p><code>You can also document or add links to libraries, code examples, and other resources needed to make a request.</code></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"📄 Documentazione API Cip","slug":"documentazione-api-cip"}],"owner":"27536415","collectionId":"f3be0a7c-6b76-49ef-aac9-feecd94a8a6a","publishedId":"2s93sXdujV","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-06-06T07:03:29.000Z"},"item":[{"name":"User","item":[{"name":"Get user's information by username","id":"496be5a9-0e9a-4df5-be1a-423c64628782","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/users/:username","urlObject":{"path":["users",":username"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>The user's username</p>\n","type":"text/plain"},"type":"any","value":"example","key":"username"}]}},"response":[{"id":"cbeaa435-8b36-492c-adba-7adb1e8d27e1","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":{"raw":"localhost:8080/users/{{ExistingUser}}","host":["localhost"],"port":"8080","path":["users","{{ExistingUser}}"],"query":[{"key":"","value":null,"disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 21 May 2023 10:12:19 GMT"},{"key":"Server","value":"Apache/2.4.54 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.3"},{"key":"Content-Length","value":"209"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"name\": \"Example Name\",\n        \"surname\": \"Example Surname\",\n        \"username\": \"example\",\n        \"bio\": \"This is a short Bio made for the @example user. \",\n        \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n    }\n]"},{"id":"d47abcc7-b25b-4e39-b51c-7e5f8f3d3f22","name":"404 NOT FOUND","originalRequest":{"method":"GET","header":[],"url":{"raw":"localhost:8080/users/{{NonExistingUser}}","host":["localhost"],"port":"8080","path":["users","{{NonExistingUser}}"],"query":[{"key":"","value":null,"disabled":true}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 21 May 2023 10:13:18 GMT"},{"key":"Server","value":"Apache/2.4.54 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.3"},{"key":"Content-Length","value":"2"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[]"}],"_postman_id":"496be5a9-0e9a-4df5-be1a-423c64628782"},{"name":"Get user's list with pagination","id":"7a6842f8-126d-446f-bf9c-62b4f42bab3b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/users/page/:page/size/:size","urlObject":{"path":["users","page",":page","size",":size"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>The page number; it starts from 0</p>\n","type":"text/plain"},"type":"any","value":"0","key":"page"},{"type":"any","value":null,"key":"size"}]}},"response":[{"id":"4f6f4c0b-ca5c-46b8-bb47-b7f2e3076982","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/users/page/{{page}}/size/{{pageSize}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 21 May 2023 10:24:36 GMT"},{"key":"Server","value":"Apache/2.4.54 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.3"},{"key":"Content-Length","value":"2171"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"name\": \"Example Name\",\n        \"surname\": \"Example Surname\",\n        \"username\": \"example\",\n        \"bio\": \"This is a short Bio made for the @example user. \",\n        \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n    },\n    {\n        \"name\": \"Example Name Alexandr\",\n        \"surname\": \"Example Surname\",\n        \"username\": \"exampleAlexandr\",\n        \"bio\": \"This is an example Bio for an example' user. \",\n        \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n    },\n    {\n        \"name\": \"Example Name Andrea\",\n        \"surname\": \"Example Surname\",\n        \"username\": \"exampleAndrea\",\n        \"bio\": \"This is an example Bio for an example' user. \",\n        \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n    },\n    {\n        \"name\": \"Example Name Jessika\",\n        \"surname\": \"Example Surname\",\n        \"username\": \"exampleJessika\",\n        \"bio\": \"This is an example Bio for an example' user. \",\n        \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n    },\n    {\n        \"name\": \"Example Name John\",\n        \"surname\": \"Example Surname\",\n        \"username\": \"exampleJohn\",\n        \"bio\": \"This is an example Bio for an example' user. \",\n        \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n    },\n    {\n        \"name\": \"Example Name Lukas\",\n        \"surname\": \"Example Surname\",\n        \"username\": \"exampleLukas\",\n        \"bio\": \"This is an example Bio for an example' user. \",\n        \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n    },\n    {\n        \"name\": \"Example Name Marcello\",\n        \"surname\": \"Example Surname\",\n        \"username\": \"exampleMarcello\",\n        \"bio\": \"This is an example Bio for an example' user. \",\n        \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n    },\n    {\n        \"name\": \"Example Name Martha\",\n        \"surname\": \"Example Surname\",\n        \"username\": \"exampleMartha\",\n        \"bio\": \"This is an example Bio for an example' user. \",\n        \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n    },\n    {\n        \"name\": \"Example Name Mary\",\n        \"surname\": \"Example Surname\",\n        \"username\": \"exampleMary\",\n        \"bio\": \"This is an example Bio for an example' user. \",\n        \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n    },\n    {\n        \"name\": \"Example Name Miriam\",\n        \"surname\": \"Example Surname\",\n        \"username\": \"exampleMiriam\",\n        \"bio\": \"This is an example Bio for an example' user. \",\n        \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n    }\n]"},{"id":"bf14e7cf-3a0c-4e84-9cdc-7cff04710fa3","name":"404 NOT FOUND","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/users/page/{{pageNotExisting}}/size/{{pageSize}}"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 21 May 2023 10:25:55 GMT"},{"key":"Server","value":"Apache/2.4.54 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.3"},{"key":"Content-Length","value":"2"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[]"}],"_postman_id":"7a6842f8-126d-446f-bf9c-62b4f42bab3b"},{"name":"Search user with pagination","id":"4523e7a7-dbd1-48c9-b716-b0808467509b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/users/s/:query/page/:page/size/:size","urlObject":{"path":["users","s",":query","page",":page","size",":size"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>La stringa che deve essere contenuta negli username degli utenti</p>\n","type":"text/plain"},"type":"any","value":"ma","key":"query"},{"description":{"content":"<p>Il numero della pagina; inizia da 0</p>\n","type":"text/plain"},"type":"any","value":"0","key":"page"},{"description":{"content":"<p>La grandezza della pagina</p>\n","type":"text/plain"},"type":"any","value":"2","key":"size"}]}},"response":[{"id":"58fab6c7-4fe7-4eaa-a126-b1c212d1df37","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:8080/users/s/:query/page/:page/size/:size","host":["http://localhost:8080"],"path":["users","s",":query","page",":page","size",":size"],"variable":[{"key":"query","value":"ma","description":"La stringa che deve essere contenuta negli username degli utenti"},{"key":"page","value":"0","description":"Il numero della pagina; inizia da 0"},{"key":"size","value":"2","description":"La grandezza della pagina"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 04 Jun 2023 10:36:06 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"451"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"username\": \"exampleMarcello\",\n        \"hash_password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\",\n        \"nome\": \"Example Name Marcello\",\n        \"cognome\": \"Example Surname\",\n        \"bio\": \"This is an example Bio for an example' user. \"\n    },\n    {\n        \"username\": \"exampleMartha\",\n        \"hash_password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\",\n        \"nome\": \"Example Name Martha\",\n        \"cognome\": \"Example Surname\",\n        \"bio\": \"This is an example Bio for an example' user. \"\n    }\n]"}],"_postman_id":"4523e7a7-dbd1-48c9-b716-b0808467509b"}],"id":"346a9dca-88d1-4ee7-8725-c7a98cb706e0","description":"<p>Questa cartella contiene le richieste che è possibile fare sulle entità logiche degli utenti.</p>\n","_postman_id":"346a9dca-88d1-4ee7-8725-c7a98cb706e0"},{"name":"Me","item":[{"name":"Register","id":"39deaacb-279f-4eea-9247-03708bf0ff72","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"nome\": \"New Name\",\n    \"cognome\": \"New Surname\",\n    \"username\": \"newusername2\",\n    \"bio\": \"New Bio\",\n    \"hash_password\": \"Hashed Password\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/register","description":"<p>Per registrarsi, l'utente deve fornire un body simile a quello mostrato di sotto. L'username <strong>non</strong> può contenere spazi, e può essere lungo massimo sedici caratteri.</p>\n<p>La password <strong>deve</strong> essere <em>hashata</em> dal client.</p>\n","urlObject":{"path":["register"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"a8ee6c65-b57f-4d0b-9f1d-e998dd90295a","name":"400 BAD REQUEST","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Your Name\",\n    \"surname\": \"Your Surname\",\n    \"username\": \"example\",\n    \"bio\": \"This is my new Bio\",\n    \"password\": \"Hashed Password\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/register"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 21 May 2023 11:31:01 GMT"},{"key":"Server","value":"Apache/2.4.54 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.3"},{"key":"Content-Length","value":"51"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"User 'example' already exists. \"\n}"},{"id":"949dd821-2d35-41f2-b263-da287d2d80b4","name":"200 OK","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"nome\": \"New Name\",\n    \"cognome\": \"New Surname\",\n    \"username\": \"newusername\",\n    \"bio\": \"New Bio\",\n    \"hash_password\": \"Hashed Password\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/register"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 27 May 2023 15:10:01 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"2"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[]"},{"id":"d68ec344-a207-4fc6-8c8d-0a7d83c88b94","name":"400 BODY COULDNT BE VERIFIED","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"nome\": \"New Name\",\n    \"cognome\": \"New Surname\",\n\n    \"bio\": \"New Bio\",\n    \"hash_password\": \"Hashed Password\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/register"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 27 May 2023 15:16:20 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"45"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Body couldn't be verified\"\n}"},{"id":"6b65da9a-8591-4e73-938f-cd8584cf890d","name":"400 USERNAME LONGER THAN 16 CHARS","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"nome\": \"New Name\",\n    \"cognome\": \"New Surname\",\n    \"username\": \"reallylongusername!\",\n    \"bio\": \"New Bio\",\n    \"hash_password\": \"Hashed Password\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/register"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 27 May 2023 15:16:58 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"59"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Username longer than sixteen characters\"\n}"},{"id":"6c914921-3965-4015-a7e3-41ef4c37c205","name":"400 USERNAME CONTAINS SPACES","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"nome\": \"New Name\",\n    \"cognome\": \"New Surname\",\n    \"username\": \"Incorrect Username\",\n    \"bio\": \"New Bio\",\n    \"hash_password\": \"Hashed Password\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/register"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 27 May 2023 15:17:34 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"45"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Username constains spaces\"\n}"},{"id":"f736ed72-147d-4395-abf4-46af9bffebcd","name":"500 DATABASE INTERNAL ERROR","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"nome\": \"New Name\",\n    \"cognome\": \"New Surname\",\n    \"username\": \"newusername\",\n    \"bio\": \"New Bio\",\n    \"hash_password\": \"Hashed Password\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/register"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 27 May 2023 15:26:34 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"43"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Database internal error\"\n}"}],"_postman_id":"39deaacb-279f-4eea-9247-03708bf0ff72"},{"name":"Login","id":"f7dd8385-2a8c-429f-ac8c-815daa010548","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"\",\n    \"hash_password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/login","urlObject":{"path":["login"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"8f3a4476-d9dd-4c1f-bef8-cbfde8040763","name":"404 USER CREDENTIALS NOT FOUND","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"NonExistingUser\",\n    \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/login"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 21 May 2023 15:14:36 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"46"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"User credentials not found\"\n}"},{"id":"cabf822a-66a5-446d-b856-2d2c103d0cb3","name":"200 OK","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"example\",\n    \"password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 23 May 2023 07:10:34 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"228"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"bearer\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImV4YW1wbGUiLCJwYXNzd29yZCI6IjVFODg0ODk4REEyODA0NzE1MUQwRTU2RjhEQzYyOTI3NzM2MDNEMEQ2QUFCQkRENjJBMTFFRjcyMUQxNTQyRDgifQ.JTTtn2EM6X73Ao6SoPg8qUbd_xVNOkW7POLSwX_bUaA\"\n}"}],"_postman_id":"f7dd8385-2a8c-429f-ac8c-815daa010548"}],"id":"4f28c06a-7852-485f-a975-54bc70926ab0","description":"<p>Questa cartella contiene i metodi e gli endpoints con i quali è possibile gestire le informazioni del proprio utente.</p>\n","_postman_id":"4f28c06a-7852-485f-a975-54bc70926ab0"},{"name":"Me (authorization required)","item":[{"name":"Get user's information","id":"180a81b4-99ca-41eb-b112-6acaeaf94b71","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/me","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"06f8e66c-7738-4557-89c9-19ca56a36766","id":"06f8e66c-7738-4557-89c9-19ca56a36766","name":"Me (authorization required)","type":"folder"}},"urlObject":{"path":["me"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"7d1d5006-f5a4-49a7-9fcf-c80ef9ad9334","name":"401 UNABLE TO PARSE BEARER TOKEN","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/me"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 23 May 2023 17:19:29 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"49"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Unable to parse Bearer token\"\n}"},{"id":"a6d81ebb-f5a5-4ded-82d8-9ee009980d5e","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/me"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 27 May 2023 15:45:46 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"131"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"nome\": \"Example Name\",\n        \"cognome\": \"Example Surname\",\n        \"bio\": \"This is a short Bio made for the @example user. \",\n        \"username\": \"example\"\n    }\n]"},{"id":"6d3a6b6a-8b53-48f8-9ac9-5b59bb625dba","name":"400 FAILED TO GET AUTH FIELD","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/me"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 27 May 2023 15:47:17 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"69"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Failes to get Authorization field in HTTP headers\"\n}"},{"id":"3050fe97-15f4-499b-8808-47e4f911acc6","name":"404 USER CREDENTIALS NOT FOUND","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/me"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 27 May 2023 15:52:19 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"56"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Login credentials has not been found\"\n}"}],"_postman_id":"180a81b4-99ca-41eb-b112-6acaeaf94b71"},{"name":"Update user's information","id":"2e41e856-29ea-4c17-bf84-605d3401ef32","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"example\",\n    \"nome\": \"Nome Esempioone Fiero\",\n    \"cognome\": \"Cognome Esempio\",\n    \"bio\": \"Bio Esempio\",\n    \"hash_password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/me","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"06f8e66c-7738-4557-89c9-19ca56a36766","id":"06f8e66c-7738-4557-89c9-19ca56a36766","name":"Me (authorization required)","type":"folder"}},"urlObject":{"path":["me"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"526dd13b-b0ce-4ecb-9764-8aaa655b79b1","name":"200 OK","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"example\",\n    \"nome\": \"Nome Esempioone Fiero\",\n    \"cognome\": \"Cognome Esempio\",\n    \"bio\": \"Bio Esempio, Ciao ragazzi. \",\n    \"hash_password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/me"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 May 2023 08:31:16 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"2"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[]"},{"id":"d193a343-4adb-4910-9d43-cf5c9f01c4d4","name":"400 USERNAME CONTAINS SPACES","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"ex ample\",\n    \"nome\": \"Nome Esempioone Fiero\",\n    \"cognome\": \"Cognome Esempio\",\n    \"bio\": \"Bio Esempio\",\n    \"hash_password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/me"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 May 2023 11:26:22 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"45"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Username constains spaces\"\n}"},{"id":"06c75ddd-123b-4821-ad6b-631f67efc1f6","name":"400 USERNAME LONGER THAN 16 CHARS","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"examplepleplpelpelepelpelpe\",\n    \"nome\": \"Nome Esempioone Fiero\",\n    \"cognome\": \"Cognome Esempio\",\n    \"bio\": \"Bio Esempio\",\n    \"hash_password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/me"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 May 2023 11:26:53 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"59"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Username longer than sixteen characters\"\n}"},{"id":"61755d09-6eee-48f9-bd6b-ec44bb2192dd","name":"400 AUTHORIZATION FIELD MISSING","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"example\",\n    \"nome\": \"Nome Esempioone Fiero\",\n    \"cognome\": \"Cognome Esempio\",\n    \"bio\": \"Bio Esempio\",\n    \"hash_password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/me"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 May 2023 11:27:40 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"69"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Failed to get Authorization field in HTTP headers\"\n}"},{"id":"b1537d0d-1c29-43ff-8dd5-6abf67026cca","name":"409 ALREADY EXISTING","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"exampleSarah\",\n    \"nome\": \"Nome Esempioone Fiero\",\n    \"cognome\": \"Cognome Esempio\",\n    \"bio\": \"Bio Esempio\",\n    \"hash_password\": \"5E884898DA28047151D0E56F8DC6292773603D0D6AABBDD62A11EF721D1542D8\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/me"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 May 2023 11:29:49 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"44"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Item is already existing\"\n}"}],"_postman_id":"2e41e856-29ea-4c17-bf84-605d3401ef32"},{"name":"Delete user's account","id":"5304626b-676d-4a22-a0d0-027c8c43f60c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/me","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"06f8e66c-7738-4557-89c9-19ca56a36766","id":"06f8e66c-7738-4557-89c9-19ca56a36766","name":"Me (authorization required)","type":"folder"}},"urlObject":{"path":["me"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"106e8778-081b-422d-a2d9-6c6a23f9ff84","name":"200 OK","originalRequest":{"method":"DELETE","header":[],"url":"localhost:8080/me"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 30 May 2023 11:44:59 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"2"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[]"}],"_postman_id":"5304626b-676d-4a22-a0d0-027c8c43f60c"},{"name":"get user's feed","id":"05d4fc14-6052-4081-a297-1e449f6d64e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/feed/page/:page/size/:size","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"06f8e66c-7738-4557-89c9-19ca56a36766","id":"06f8e66c-7738-4557-89c9-19ca56a36766","name":"Me (authorization required)","type":"folder"}},"urlObject":{"path":["feed","page",":page","size",":size"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>La pagina; inizia da 0</p>\n","type":"text/plain"},"type":"any","value":"0","key":"page"},{"description":{"content":"<p>La grandezza della pagina</p>\n","type":"text/plain"},"type":"any","value":"10","key":"size"}]}},"response":[],"_postman_id":"05d4fc14-6052-4081-a297-1e449f6d64e7"}],"id":"06f8e66c-7738-4557-89c9-19ca56a36766","description":"<p>Questa cartella raccoglie tutti i metodi <code>Me</code> che richiedono l'autenticazione Bearer.</p>\n<p>Gli errori legati all'autenticazione includono, ma non sono ristretti ai seguenti: <code>LoginCredentialsNotFound</code>, nel caso in cui le credenziali non siano valide per l'accesso; <code>FailedToGetAuthField</code> nel caso in cui il campo <code>Authentication</code> sia mancante.</p>\n<p>Alcuni di questi casi non sono contemplati nelle chiamate di seguito.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"35fe563d-eb09-4bc4-b051-8f085370fba7","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2a836210-7301-403b-aaed-1163d101354a","type":"text/javascript","exec":[""]}}],"_postman_id":"06f8e66c-7738-4557-89c9-19ca56a36766"},{"name":"Post","item":[{"name":"Get post by ID","id":"c4026a4b-d77f-47f3-8041-90c21a34481c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/post/:id","urlObject":{"path":["post",":id"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>The post's ID</p>\n","type":"text/plain"},"type":"any","value":"1","key":"id"}]}},"response":[{"id":"a9d8828a-6db0-490f-8e0d-5890b9b23201","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/post/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 15:10:12 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"129"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"content\": \"Ciao\",\n        \"post_commentato\": null,\n        \"autore\": \"example\",\n        \"data_creazione\": \"2023-06-01 15:00:07\",\n        \"count(`like`.id)\": 0\n    }\n]"},{"id":"667e4fc2-b69b-4d05-b373-f2011dcaf6d8","name":"404 NOT FOUND","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/post/3498"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 15:13:09 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"39"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Item does not exist\"\n}"}],"_postman_id":"c4026a4b-d77f-47f3-8041-90c21a34481c"},{"name":"Get post by user with pagination","id":"49a62f0b-720e-459c-a843-4fb66bf279b7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/user/:username/posts/page/:page/size/:size","urlObject":{"path":["user",":username","posts","page",":page","size",":size"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>The username of the user the posts are needed</p>\n","type":"text/plain"},"type":"any","value":"example","key":"username"},{"description":{"content":"<p>The page number; it starts from 0</p>\n","type":"text/plain"},"type":"any","value":"0","key":"page"},{"type":"any","value":"10","key":"size"}]}},"response":[],"_postman_id":"49a62f0b-720e-459c-a843-4fb66bf279b7"}],"id":"bfdbc014-4186-47a5-bc50-778aecc83466","_postman_id":"bfdbc014-4186-47a5-bc50-778aecc83466","description":""},{"name":"Post (authorization required)","item":[{"name":"Update post's content","id":"d140f6c8-17fa-4a7c-9b02-73cc669b6000","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"new_content\": \"Ciao a tutti\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/post/:id","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"fdc2cdb9-9d3e-43ae-8a1b-b16a86057b18","id":"fdc2cdb9-9d3e-43ae-8a1b-b16a86057b18","name":"Post (authorization required)","type":"folder"}},"urlObject":{"path":["post",":id"],"host":["http://localhost:8080"],"query":[],"variable":[{"type":"any","value":null,"key":"id"}]}},"response":[{"id":"4814ce6c-9003-4bdd-80aa-842bd85775ad","name":"200 OK","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"new_content\": \"Ciao a tutti!\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/post/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 15:24:10 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"2"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[]"},{"id":"6e159cb2-911b-490a-a54b-4c8ec9372d83","name":"404 NOT FOUND","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"new_content\": \"Ciao a tutti!\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/post/2"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 15:24:45 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"39"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Item does not exist\"\n}"},{"id":"ab56d0fe-de80-43d1-b882-c453e056cb3e","name":"400 BAD REQUEST","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:8080/post/1"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 15:25:05 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"45"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Body couldn't be verified\"\n}"},{"id":"c260d9f2-b7a2-44c9-8c6d-b8b995d4a303","name":"401 NOT ALLOWED","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"new_content\": \"Ciao a tutti\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/post/1"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 15:41:30 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"65"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"User is not allowed to perform such operation\"\n}"}],"_postman_id":"d140f6c8-17fa-4a7c-9b02-73cc669b6000"},{"name":"Delete user's content","id":"188c4562-c30d-4ecf-bd8a-3dbd4d4ea83a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/post/:id","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"fdc2cdb9-9d3e-43ae-8a1b-b16a86057b18","id":"fdc2cdb9-9d3e-43ae-8a1b-b16a86057b18","name":"Post (authorization required)","type":"folder"}},"urlObject":{"path":["post",":id"],"host":["http://localhost:8080"],"query":[],"variable":[{"type":"any","value":null,"key":"id"}]}},"response":[{"id":"173b7b10-76a0-4f4f-b9a8-7f1a8d8ec33a","name":"200 OK","originalRequest":{"method":"DELETE","header":[],"url":"localhost:8080/post/5"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 15:45:54 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"2"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[]"},{"id":"ef2f9e59-ec8b-4aba-86e4-d8954167a17d","name":"401 NOT ALLOWED","originalRequest":{"method":"DELETE","header":[],"url":"localhost:8080/post/109485"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 15:46:07 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"65"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"User is not allowed to perform such operation\"\n}"},{"id":"60a5e350-9c3d-4c23-b3c0-e7d97eb7240b","name":"404 NOT FOUND","originalRequest":{"method":"DELETE","header":[],"url":"localhost:8080/post/109485"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 15:46:34 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"39"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Item does not exist\"\n}"}],"_postman_id":"188c4562-c30d-4ecf-bd8a-3dbd4d4ea83a"},{"name":"Create new post","id":"54afe9b3-73db-41b2-a408-27628409d5ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"content\": \"ciao a tutti\",\n    \"post_commentato\": \"null\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/posts","description":"<p>Il campo <code>post_commentato</code>, se nullo, deve essere indicato come <code>\"null\"</code>, e non come <code>null</code>, senza virgolette.</p>\n<p>Nell'esempio di seguito, si nota come il server PHP non sia in grado di riconoscere un campo settato a <code>null</code> da un campo non settato.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"fdc2cdb9-9d3e-43ae-8a1b-b16a86057b18","id":"fdc2cdb9-9d3e-43ae-8a1b-b16a86057b18","name":"Post (authorization required)","type":"folder"}},"urlObject":{"path":["posts"],"host":["http://localhost:8080"],"query":[],"variable":[]}},"response":[{"id":"4dda7fc5-82a1-4239-9f39-0489d5eff62f","name":"200 OK","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"content\": \"ciao a tutti\",\n    \"post_commentato\": \"null\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/posts"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 16:38:55 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"2"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[]"},{"id":"b0cc04b5-6f2f-4299-bdd4-ebce758cf8d0","name":"400 NO AUTHORIZATION FIELD","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"content\": \"ciao a tutti\",\n    \"post_commentato\": \"null\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/posts"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 16:41:00 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"69"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Failed to get Authorization field in HTTP headers\"\n}"},{"id":"21b835f7-4a59-4418-a4b4-350502b012d9","name":"400 BODY CANT BE VERIFIED","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"content\": \"ciao a tutti\",\n    \"post_commentato\": null\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/posts"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 01 Jun 2023 16:42:10 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.5"},{"key":"Content-Length","value":"45"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Body couldn't be verified\"\n}"}],"_postman_id":"54afe9b3-73db-41b2-a408-27628409d5ec"}],"id":"fdc2cdb9-9d3e-43ae-8a1b-b16a86057b18","description":"<p>Questa cartella raccoglie tutti i metodi <code>Post</code> che richiedono l'autenticazione Bearer.</p>\n<p>Gli errori legati all'autenticazione includono, ma non sono ristretti ai seguenti: <code>LoginCredentialsNotFound</code>, nel caso in cui le credenziali non siano valide per l'accesso; <code>FailedToGetAuthField</code> nel caso in cui il campo <code>Authentication</code> sia mancante.</p>\n<p>Alcuni di questi casi non sono contemplati nelle chiamate di seguito.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"622a9ae0-2a8a-45b7-8833-653748233ac3","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"93c2c396-d5aa-4c58-884d-76253feac6dd","type":"text/javascript","exec":[""]}}],"_postman_id":"fdc2cdb9-9d3e-43ae-8a1b-b16a86057b18"},{"name":"Likes","item":[{"name":"Get post's likes","id":"62cf8dbc-d4f6-4c19-9dd8-5cfcf3d66b27","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/post/:id/likes","urlObject":{"path":["post",":id","likes"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>The post's ID the like number is needed</p>\n","type":"text/plain"},"type":"any","value":"4","key":"id"}]}},"response":[{"id":"c1cda76d-f70e-4baa-bd28-7df32c0762e8","name":"404 NOT FOUND","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/post/5/likes"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 02 Jun 2023 17:19:03 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.6"},{"key":"Content-Length","value":"39"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"error_message\": \"Item does not exist\"\n}"},{"id":"f0584604-1263-4fcd-9f01-aa7edee6abd8","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/post/4/likes"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 02 Jun 2023 17:20:10 GMT"},{"key":"Server","value":"Apache/2.4.56 (Debian)"},{"key":"X-Powered-By","value":"PHP/8.2.6"},{"key":"Content-Length","value":"13"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"likes\": 1\n    }\n]"}],"_postman_id":"62cf8dbc-d4f6-4c19-9dd8-5cfcf3d66b27"}],"id":"b02d0388-8cc5-456a-a78f-8c79d583dc02","_postman_id":"b02d0388-8cc5-456a-a78f-8c79d583dc02","description":""},{"name":"Likes (authorization required)","item":[{"name":"Insert like to post","id":"997680ca-cbb4-4afe-8f9a-f29cb5680988","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:8080/post/:id/likes","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"03b82b89-666c-444c-a317-2b4e1510f2fd","id":"03b82b89-666c-444c-a317-2b4e1510f2fd","name":"Likes (authorization required)","type":"folder"}},"urlObject":{"path":["post",":id","likes"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>The ID of the post to like</p>\n","type":"text/plain"},"type":"any","value":"1","key":"id"}]}},"response":[],"_postman_id":"997680ca-cbb4-4afe-8f9a-f29cb5680988"},{"name":"Remove like from post","id":"eea80c46-1798-495b-a406-c85bb4323c2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/post/:id/likes","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"03b82b89-666c-444c-a317-2b4e1510f2fd","id":"03b82b89-666c-444c-a317-2b4e1510f2fd","name":"Likes (authorization required)","type":"folder"}},"urlObject":{"path":["post",":id","likes"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>The post's ID</p>\n","type":"text/plain"},"type":"any","value":"1","key":"id"}]}},"response":[],"_postman_id":"eea80c46-1798-495b-a406-c85bb4323c2c"}],"id":"03b82b89-666c-444c-a317-2b4e1510f2fd","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"948c031f-2306-4861-891f-a0bea3804048","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"d83e9f70-a885-4b0c-9aea-3777208b30f7","type":"text/javascript","exec":[""]}}],"_postman_id":"03b82b89-666c-444c-a317-2b4e1510f2fd","description":""},{"name":"Followers","item":[{"name":"Get followers with pagination","id":"22773023-9712-43e4-a209-4318558a4dc5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/user/:username/followers/page/:page/size/:size","urlObject":{"path":["user",":username","followers","page",":page","size",":size"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>L'username dell'utente</p>\n","type":"text/plain"},"type":"any","value":"example","key":"username"},{"description":{"content":"<p>La pagina; inizia da 0</p>\n","type":"text/plain"},"type":"any","value":"0","key":"page"},{"description":{"content":"<p>La grandezza della pagina</p>\n","type":"text/plain"},"type":"any","value":"10","key":"size"}]}},"response":[],"_postman_id":"22773023-9712-43e4-a209-4318558a4dc5"},{"name":"Is a follower of user","id":"f46505f6-3ed3-47aa-bb63-2cef3977c5a2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/user/:username/followers/is/:follower","urlObject":{"path":["user",":username","followers","is",":follower"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>L'utente del quale si vuole sapere il follower</p>\n","type":"text/plain"},"type":"any","value":"example","key":"username"},{"description":{"content":"<p>Il follower</p>\n","type":"text/plain"},"type":"any","value":"example","key":"follower"}]}},"response":[],"_postman_id":"f46505f6-3ed3-47aa-bb63-2cef3977c5a2"},{"name":"New Request","id":"e5a1c5d2-a601-4862-8df1-af1d0dfe8f36","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"e5a1c5d2-a601-4862-8df1-af1d0dfe8f36"}],"id":"7e4587c8-9e0b-47a0-9c64-1f5c8c3dcd87","_postman_id":"7e4587c8-9e0b-47a0-9c64-1f5c8c3dcd87","description":""},{"name":"Followers (authorization required)","item":[{"name":"Follow  a new user","id":"cffaefe2-57c7-4c83-b75d-dc3915d8b4f1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:8080/users/:username/followers","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"5041acc3-401f-4aa4-8e1d-54135fd15250","id":"5041acc3-401f-4aa4-8e1d-54135fd15250","name":"Followers (authorization required)","type":"folder"}},"urlObject":{"path":["users",":username","followers"],"host":["http://localhost:8080"],"query":[],"variable":[{"description":{"content":"<p>L'utente da seguire</p>\n","type":"text/plain"},"type":"any","value":"example","key":"username"}]}},"response":[],"_postman_id":"cffaefe2-57c7-4c83-b75d-dc3915d8b4f1"},{"name":"Unfollow a user","id":"5acdd0ef-e939-4c9d-9b91-70b056a1ebbc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/users/:username/followers","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"5041acc3-401f-4aa4-8e1d-54135fd15250","id":"5041acc3-401f-4aa4-8e1d-54135fd15250","name":"Followers (authorization required)","type":"folder"}},"urlObject":{"path":["users",":username","followers"],"host":["http://localhost:8080"],"query":[],"variable":[{"type":"any","value":null,"key":"username"}]}},"response":[],"_postman_id":"5acdd0ef-e939-4c9d-9b91-70b056a1ebbc"}],"id":"5041acc3-401f-4aa4-8e1d-54135fd15250","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"event":[{"listen":"prerequest","script":{"id":"8808d4d5-8f72-447a-911e-16f6a1a3efb1","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"01bedc1a-268c-4d0b-b0b3-73a03010991a","type":"text/javascript","exec":[""]}}],"_postman_id":"5041acc3-401f-4aa4-8e1d-54135fd15250","description":""}],"event":[{"listen":"prerequest","script":{"id":"af13ea06-5b3c-4676-8aff-72ce818d8506","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"61b42167-976b-4eda-ab92-ec7323876c04","type":"text/javascript","exec":[""]}}],"variable":[{"key":"url","value":"http://localhost:8080"},{"key":"username","value":"francesco","type":"string","disabled":true},{"key":"page","value":"0","disabled":true},{"key":"pageSize","value":"5","disabled":true},{"key":"secretKey","value":"secret","disabled":true},{"key":"ExistingUser","value":"example","disabled":true}]}