{
  "info": {
    "_postman_id": "a782471e-2136-47a4-8f11-48c2b7892eb4",
    "name": "hexabot (REST)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "34338008"
  },
  "item": [
    {
      "name": "analytics (4)",
      "item": [
        {
          "name": "messages",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/botstats/messages",
              "host": ["{{BASE_URL}}"],
              "path": ["botstats", "messages"]
            }
          },
          "response": []
        },
        {
          "name": "datum",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/botstats/datum?type=new_users",
              "host": ["{{BASE_URL}}"],
              "path": ["botstats", "datum"],
              "query": [
                {
                  "key": "type",
                  "value": "new_users"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "conversation",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/botstats/conversation",
              "host": ["{{BASE_URL}}"],
              "path": ["botstats", "conversation"]
            }
          },
          "response": []
        },
        {
          "name": "audience",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/botstats/audiance",
              "host": ["{{BASE_URL}}"],
              "path": ["botstats", "audiance"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "attachment (3)",
      "item": [
        {
          "name": "UPLOAD",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": ["pm.setDynamicId();"],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file",
                  "type": "file",
                  "src": []
                }
              ]
            },
            "url": {
              "raw": "{{BASE_URL}}/attachment/upload",
              "host": ["{{BASE_URL}}"],
              "path": ["attachment", "upload"]
            }
          },
          "response": []
        },
        {
          "name": "COUNT",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/attachment/count",
              "host": ["{{BASE_URL}}"],
              "path": ["attachment", "count"]
            }
          },
          "response": []
        },
        {
          "name": "DOWNLOAD",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/attachment/{{ATTACHMENT_UPLOAD_VALID_ID}}",
              "host": ["{{BASE_URL}}"],
              "path": ["attachment", "{{ATTACHMENT_UPLOAD_VALID_ID}}"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "chat (7) > (34)",
      "item": [
        {
          "name": "category (6)",
          "item": [
            {
              "name": "CREATE",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"label\": \"label2\",\n    \"builtin\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/category",
                  "host": ["{{BASE_URL}}"],
                  "path": ["category"]
                }
              },
              "response": []
            },
            {
              "name": "COUNT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/category/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["category", "count"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/category",
                  "host": ["{{BASE_URL}}"],
                  "path": ["category"]
                }
              },
              "response": []
            },
            {
              "name": "findOneById",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/category/{{CATEGORY_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["category", "{{CATEGORY_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "UPDATE",
              "request": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"label\": \"label3\",\n    \"builtin\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/category/{{CATEGORY_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["category", "{{CATEGORY_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "deleteById",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/category/{{CATEGORY_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["category", "{{CATEGORY_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "block (5)",
          "item": [
            {
              "name": "CREATE",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"name\": \"textMessage\",\n    \"patterns\": [\n        \"Hi\"\n    ],\n    \"trigger_channels\": [],\n    \"message\": [\n        \"Hi back !\"\n    ],\n    \"category\": \"{{CATEGORY_VALID_ID}}\",\n    \"position\": {\n      \"x\": 0,\n      \"y\": 0\n    }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/block",
                  "host": ["{{BASE_URL}}"],
                  "path": ["block"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/block",
                  "host": ["{{BASE_URL}}"],
                  "path": ["block"]
                }
              },
              "response": []
            },
            {
              "name": "findOneById",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/block/{{BLOCK_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["block", "{{BLOCK_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "UPDATE",
              "request": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"label\": \"label3\",\n    \"builtin\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/block/{{BLOCK_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["block", "{{BLOCK_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "deleteById",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/block/{{BLOCK_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["block", "{{BLOCK_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "context-var (6)",
          "item": [
            {
              "name": "CREATE",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"label\": \"false\",\n    \"name\": \"test\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/contextVar",
                  "host": ["{{BASE_URL}}"],
                  "path": ["contextVar"]
                }
              },
              "response": []
            },
            {
              "name": "COUNT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/contextVar/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["contextVar", "count"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/contextVar",
                  "host": ["{{BASE_URL}}"],
                  "path": ["contextVar"]
                }
              },
              "response": []
            },
            {
              "name": "findOneById",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/contextVar/{{CONTEXTVAR_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["contextVar", "{{CONTEXTVAR_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "UPDATE",
              "request": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"label\": \"false\",\n    \"name\": \"test\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/contextVar/{{CONTEXTVAR_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["contextVar", "{{CONTEXTVAR_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "deleteById",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/contextVar/{{CONTEXTVAR_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["contextVar", "{{CONTEXTVAR_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "label (6)",
          "item": [
            {
              "name": "CREATE",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"title\": \"false\",\n    \"name\": \"TEST\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/label",
                  "host": ["{{BASE_URL}}"],
                  "path": ["label"]
                }
              },
              "response": []
            },
            {
              "name": "COUNT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/label/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["label", "count"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/label",
                  "host": ["{{BASE_URL}}"],
                  "path": ["label"]
                }
              },
              "response": [
                {
                  "name": "LIST+Populate",
                  "originalRequest": {
                    "method": "GET",
                    "header": [],
                    "url": {
                      "raw": "{{BASE_URL}}/label?populate=users",
                      "host": ["{{BASE_URL}}"],
                      "path": ["label"],
                      "query": [
                        {
                          "key": "populate",
                          "value": "users"
                        }
                      ]
                    }
                  },
                  "_postman_previewlanguage": null,
                  "header": null,
                  "cookie": [],
                  "body": null
                }
              ]
            },
            {
              "name": "findOneById",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/label/{{LABEL_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["label", "{{LABEL_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "UPDATE",
              "request": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"title\": \"false\",\n    \"name\": \"TEST2\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/label/{{LABEL_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["label", "{{LABEL_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "deleteById",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/label/{{LABEL_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["label", "{{LABEL_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "message (3)",
          "item": [
            {
              "name": "COUNT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/message/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["message", "count"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/message",
                  "host": ["{{BASE_URL}}"],
                  "path": ["message"]
                }
              },
              "response": []
            },
            {
              "name": "findOneById",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/message/{{MESSAGE_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["message", "{{MESSAGE_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "subscriber (4)",
          "item": [
            {
              "name": "COUNT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/subscriber/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["subscriber", "count"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/subscriber",
                  "host": ["{{BASE_URL}}"],
                  "path": ["subscriber"]
                }
              },
              "response": []
            },
            {
              "name": "findOneById",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/subscriber/{{SUBSCRIBER_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["subscriber", "{{SUBSCRIBER_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "UPDATE",
              "request": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"first_name\": \"Jhon 2\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/subscriber/{{SUBSCRIBER_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["subscriber", "{{SUBSCRIBER_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "translation (4)",
          "item": [
            {
              "name": "COUNT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/translation/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["translation", "count"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/translation",
                  "host": ["{{BASE_URL}}"],
                  "path": ["translation"]
                }
              },
              "response": []
            },
            {
              "name": "findOneById",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/translation/{{TRANSLATION_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["translation", "{{TRANSLATION_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "UPDATE",
              "request": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"title\": \"false\",\n    \"name\": \"TEST2\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/translation/{{TRANSLATION_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["translation", "{{TRANSLATION_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        }
      ]
    },
    {
      "name": "cms (2) > (12)",
      "item": [
        {
          "name": "contenttype (4)",
          "item": [
            {
              "name": "CREATE",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"name\": \"House1\",\n    \"fields\": [\n        {\n            \"name\": \"address\",\n            \"label\": \"Address\",\n            \"type\": \"text\"\n        },\n        {\n            \"name\": \"image\",\n            \"label\": \"Image\",\n            \"type\": \"file\"\n        },\n        {\n            \"name\": \"description\",\n            \"label\": \"Description\",\n            \"type\": \"html\"\n        },\n        {\n            \"name\": \"rooms\",\n            \"label\": \"Rooms\",\n            \"type\": \"file\"\n        },\n        {\n            \"name\": \"price\",\n            \"label\": \"Price\",\n            \"type\": \"file\"\n        }\n    ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/contenttype",
                  "host": ["{{BASE_URL}}"],
                  "path": ["contenttype"]
                }
              },
              "response": []
            },
            {
              "name": "COUNT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/contenttype/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["contenttype", "count"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/contenttype",
                  "host": ["{{BASE_URL}}"],
                  "path": ["contenttype"]
                }
              },
              "response": []
            },
            {
              "name": "UPDATE",
              "request": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"name\": \"House7\",\n    \"fields\": [\n        {\n            \"name\": \"address\",\n            \"label\": \"Address\",\n            \"type\": \"text\"\n        },\n        {\n            \"name\": \"image\",\n            \"label\": \"Image\",\n            \"type\": \"file\"\n        },\n        {\n            \"name\": \"description\",\n            \"label\": \"Description\",\n            \"type\": \"html\"\n        },\n        {\n            \"name\": \"rooms\",\n            \"label\": \"Rooms\",\n            \"type\": \"file\"\n        },\n        {\n            \"name\": \"price\",\n            \"label\": \"Price\",\n            \"type\": \"file\"\n        }\n    ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/contenttype/{{CONTENTTYPE_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["contenttype", "{{CONTENTTYPE_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "content (8)",
          "item": [
            {
              "name": "IMPORT Flow",
              "item": [
                {
                  "name": "1- CREATE",
                  "event": [
                    {
                      "listen": "test",
                      "script": {
                        "exec": ["pm.setDynamicId();"],
                        "type": "text/javascript"
                      }
                    }
                  ],
                  "request": {
                    "method": "POST",
                    "header": [],
                    "body": {
                      "mode": "raw",
                      "raw": "{\n    \"name\": \"House2\",\n    \"fields\": [\n        {\n            \"name\": \"address\",\n            \"label\": \"Address\",\n            \"type\": \"text\"\n        },\n        {\n            \"name\": \"image\",\n            \"label\": \"Image\",\n            \"type\": \"file\"\n        },\n        {\n            \"name\": \"description\",\n            \"label\": \"Description\",\n            \"type\": \"html\"\n        },\n        {\n            \"name\": \"rooms\",\n            \"label\": \"Rooms\",\n            \"type\": \"file\"\n        },\n        {\n            \"name\": \"price\",\n            \"label\": \"Price\",\n            \"type\": \"file\"\n        }\n    ]\n}",
                      "options": {
                        "raw": {
                          "language": "json"
                        }
                      }
                    },
                    "url": {
                      "raw": "{{BASE_URL}}/contenttype",
                      "host": ["{{BASE_URL}}"],
                      "path": ["contenttype"]
                    }
                  },
                  "response": []
                },
                {
                  "name": "2- UPLOAD",
                  "event": [
                    {
                      "listen": "test",
                      "script": {
                        "exec": [
                          "pm.setDynamicId(\"CMS_ATTACHMENT_VALID_ID\");"
                        ],
                        "type": "text/javascript"
                      }
                    }
                  ],
                  "request": {
                    "method": "POST",
                    "header": [],
                    "body": {
                      "mode": "formdata",
                      "formdata": [
                        {
                          "key": "file",
                          "type": "file",
                          "src": "/home/yassinedorboz/Downloads/content.csv"
                        }
                      ]
                    },
                    "url": {
                      "raw": "{{BASE_URL}}/attachment/upload",
                      "host": ["{{BASE_URL}}"],
                      "path": ["attachment", "upload"]
                    }
                  },
                  "response": []
                },
                {
                  "name": "IMPORT",
                  "event": [
                    {
                      "listen": "test",
                      "script": {
                        "exec": ["pm.setDynamicId();"],
                        "type": "text/javascript"
                      }
                    }
                  ],
                  "request": {
                    "method": "GET",
                    "header": [],
                    "url": {
                      "raw": "{{BASE_URL}}/content/import/{{CONTENTTYPE_VALID_ID}}/{{CMS_ATTACHMENT_VALID_ID}}",
                      "host": ["{{BASE_URL}}"],
                      "path": [
                        "content",
                        "import",
                        "{{CONTENTTYPE_VALID_ID}}",
                        "{{CMS_ATTACHMENT_VALID_ID}}"
                      ]
                    }
                  },
                  "response": []
                }
              ]
            },
            {
              "name": "CREATE",
              "event": [
                {
                  "listen": "prerequest",
                  "script": {
                    "exec": [""],
                    "type": "text/javascript"
                  }
                },
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"entity\": \"{{CONTENTTYPE_VALID_ID}}\",\n    \"title\": \"Should\",\n    \"status\": false,\n    \"address\": \"xx-rue-xxxx-Tunisia\",\n    \"image\": \"house.jpg\",\n    \"description\": \"house description\",\n    \"rooms\": 3,\n    \"price\": \"%%\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/content",
                  "host": ["{{BASE_URL}}"],
                  "path": ["content"]
                }
              },
              "response": []
            },
            {
              "name": "COUNT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/content/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["content", "count"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/content",
                  "host": ["{{BASE_URL}}"],
                  "path": ["content"]
                }
              },
              "response": []
            },
            {
              "name": "findByContentType",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/content/type/{{CONTENTTYPE_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["content", "type", "{{CONTENTTYPE_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "findOneById",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/content/{{CONTENT_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["content", "{{CONTENT_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "UPDATE",
              "request": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"entity\": \"{{CONTENTTYPE_VALID_ID}}\",\n    \"status\": false,\n    \"title\": \"Should23\",\n    \"address\": \"xx-rue-xxxx-Tunisia\",\n    \"image\": \"house.jpg\",\n    \"description\": \"house description\",\n    \"rooms\": 2,\n    \"price\": \"%%\"\n  }",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/content/{{CONTENT_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["content", "{{CONTENT_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "deleteById",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/content/{{CONTENT_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["content", "{{CONTENT_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        }
      ]
    },
    {
      "name": "nlp (4) > (12)",
      "item": [
        {
          "name": "entity (6)",
          "item": [
            {
              "name": "CREATE",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": " {\n    \"name\": \"intent2\",\n    \"lookups\": [\"trait\"],\n    \"doc\": \"\",\n    \"builtin\": true\n  }",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpentity",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpentity"]
                }
              },
              "response": []
            },
            {
              "name": "COUNT",
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "urlencoded",
                  "urlencoded": []
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpentity/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpentity", "count"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "urlencoded",
                  "urlencoded": []
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpentity",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpentity"]
                }
              },
              "response": []
            },
            {
              "name": "findOneById",
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "urlencoded",
                  "urlencoded": []
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpentity/{{NLPENTITY_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpentity", "{{NLPENTITY_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "UPDATE",
              "request": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"name\": \"admin2\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpentity/{{NLPENTITY_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpentity", "{{NLPENTITY_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "deleteById",
              "request": {
                "method": "DELETE",
                "header": [],
                "body": {
                  "mode": "urlencoded",
                  "urlencoded": []
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpentity/{{NLPENTITY_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpentity", "{{NLPENTITY_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "sample (3)",
          "item": [
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "urlencoded",
                  "urlencoded": []
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpsample",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpsample"]
                }
              },
              "response": []
            },
            {
              "name": "COUNT",
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "urlencoded",
                  "urlencoded": []
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpsample/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpsample", "count"]
                }
              },
              "response": []
            },
            {
              "name": "deleteById",
              "request": {
                "method": "DELETE",
                "header": [],
                "body": {
                  "mode": "urlencoded",
                  "urlencoded": []
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpsample/{{NLPSAMPLE_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpsample", "{{NLPSAMPLE_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "value (3)",
          "item": [
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "urlencoded",
                  "urlencoded": []
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpvalue",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpvalue"]
                }
              },
              "response": []
            },
            {
              "name": "COUNT",
              "protocolProfileBehavior": {
                "disableBodyPruning": true
              },
              "request": {
                "method": "GET",
                "header": [],
                "body": {
                  "mode": "urlencoded",
                  "urlencoded": []
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpvalue/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpvalue", "count"]
                }
              },
              "response": []
            },
            {
              "name": "deleteById",
              "request": {
                "method": "DELETE",
                "header": [],
                "body": {
                  "mode": "urlencoded",
                  "urlencoded": []
                },
                "url": {
                  "raw": "{{BASE_URL}}/nlpvalue/{{NLPVALUE_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpvalue", "{{NLPVALUE_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "IMPORT Flow",
          "item": [
            {
              "name": "1- UPLOAD",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId(\"NLP_ATTACHMENT_VALID_ID\");"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "formdata",
                  "formdata": [
                    {
                      "key": "file",
                      "type": "file",
                      "src": "/home/yassinedorboz/Downloads/example3"
                    }
                  ]
                },
                "url": {
                  "raw": "{{BASE_URL}}/attachment/upload",
                  "host": ["{{BASE_URL}}"],
                  "path": ["attachment", "upload"]
                }
              },
              "response": []
            },
            {
              "name": "IMPORT",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/nlpsample/import/{{NLP_ATTACHMENT_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["nlpsample", "import", "{{NLP_ATTACHMENT_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        }
      ]
    },
    {
      "name": "setting (2)",
      "item": [
        {
          "name": "LIST",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.setDynamicId('SETTING_VALID_ID', (res) => res[Object.keys(res)[0]]['id']);"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{BASE_URL}}/setting",
              "host": ["{{BASE_URL}}"],
              "path": ["setting"]
            }
          },
          "response": []
        },
        {
          "name": "UPDATE",
          "request": {
            "method": "PATCH",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"value\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{BASE_URL}}/setting/{{SETTING_VALID_ID}}",
              "host": ["{{BASE_URL}}"],
              "path": ["setting", "{{SETTING_VALID_ID}}"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "user (4) > (18)",
      "item": [
        {
          "name": "auth (3)",
          "item": [
            {
              "name": "LOGIN",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [""],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"identifier\": \"admin@admin.admin\",\n    \"password\": \"admin\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/auth/local",
                  "host": ["{{BASE_URL}}"],
                  "path": ["auth", "local"]
                }
              },
              "response": []
            },
            {
              "name": "LOGOUT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/logout",
                  "host": ["{{BASE_URL}}"],
                  "path": ["logout"]
                }
              },
              "response": []
            },
            {
              "name": "SIGNUP",
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"username\": \"admin2\",\n    \"first_name\": \"admin\",\n    \"last_name\": \"admin\",\n    \"email\": \"admin@2admin.admin\",\n    \"password\": \"admin\",\n    \"role\": \"659564cb4aa383c0d0dbc688\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/auth/signup",
                  "host": ["{{BASE_URL}}"],
                  "path": ["auth", "signup"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "role (6)",
          "item": [
            {
              "name": "CREATE",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId('ROLE_VALID_ID');"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": " {\n        \"name\": \"admin_2024\",\n        \"active\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/role",
                  "host": ["{{BASE_URL}}"],
                  "path": ["role"]
                }
              },
              "response": []
            },
            {
              "name": "COUNT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/role/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["role", "count"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/role",
                  "host": ["{{BASE_URL}}"],
                  "path": ["role"]
                }
              },
              "response": []
            },
            {
              "name": "findOneById",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/role/{{ROLE_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["role", "{{ROLE_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "UPDATE",
              "request": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"active\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/role/{{ROLE_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["role", "{{ROLE_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "deleteById",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [""],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "DELETE",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"model\": \"6596560594d17d9159459542\",\n    \"action\": \"create\",\n    \"role\": \"{{ROLE_VALID_ID}}\",\n    \"createdAt\": \"2024-01-04T06:53:57.922Z\",\n    \"updatedAt\": \"2024-01-04T06:53:57.922Z\",\n    \"id\": \"6596560594d17d915945956a\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/role/{{ROLE_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["role", "{{ROLE_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "user (6)",
          "item": [
            {
              "name": "CREATE",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"username\": \"admin2\",\n    \"first_name\": \"admin\",\n    \"last_name\": \"admin\",\n    \"email\": \"admin@2admin.admin\",\n    \"password\": \"admin\",\n    \"roles\": [\"{{ROLE_VALID_ID}}\"]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/user",
                  "host": ["{{BASE_URL}}"],
                  "path": ["user"]
                }
              },
              "response": []
            },
            {
              "name": "COUNT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/user/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["user", "count"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/user",
                  "host": ["{{BASE_URL}}"],
                  "path": ["user"]
                }
              },
              "response": [
                {
                  "name": "LIST+populate",
                  "originalRequest": {
                    "method": "GET",
                    "header": [],
                    "url": {
                      "raw": "{{BASE_URL}}/user?populate=role",
                      "host": ["{{BASE_URL}}"],
                      "path": ["user"],
                      "query": [
                        {
                          "key": "populate",
                          "value": "role"
                        }
                      ]
                    }
                  },
                  "_postman_previewlanguage": null,
                  "header": null,
                  "cookie": [],
                  "body": null
                }
              ]
            },
            {
              "name": "findOneById",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/user/{{USER_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["user", "{{USER_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "UPDATE",
              "request": {
                "method": "PATCH",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"first_name\": \"admin23\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/user/{{USER_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["user", "{{USER_VALID_ID}}"]
                }
              },
              "response": []
            },
            {
              "name": "deleteById",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/user/{{USER_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["user", "{{USER_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "permission (4)",
          "item": [
            {
              "name": "CREATE",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"model\": \"6596560594d17d9159459542\",\n    \"action\": \"create\",\n    \"role\": \"{{ROLE_VALID_ID}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{BASE_URL}}/permission",
                  "host": ["{{BASE_URL}}"],
                  "path": ["permission"]
                }
              },
              "response": []
            },
            {
              "name": "LIST",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": ["pm.setDynamicId();"],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/permission",
                  "host": ["{{BASE_URL}}"],
                  "path": ["permission"]
                }
              },
              "response": [
                {
                  "name": "LIST+populate",
                  "originalRequest": {
                    "method": "GET",
                    "header": [],
                    "url": {
                      "raw": "{{BASE_URL}}/permission?populate=model,role",
                      "host": ["{{BASE_URL}}"],
                      "path": ["permission"],
                      "query": [
                        {
                          "key": "populate",
                          "value": "model,role"
                        }
                      ]
                    }
                  },
                  "_postman_previewlanguage": null,
                  "header": null,
                  "cookie": [],
                  "body": ""
                }
              ]
            },
            {
              "name": "COUNT",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/permission/count",
                  "host": ["{{BASE_URL}}"],
                  "path": ["permission", "count"]
                }
              },
              "response": []
            },
            {
              "name": "deleteById",
              "event": [
                {
                  "listen": "test",
                  "script": {
                    "exec": [""],
                    "type": "text/javascript"
                  }
                }
              ],
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{BASE_URL}}/permission/{{PERMISSION_VALID_ID}}",
                  "host": ["{{BASE_URL}}"],
                  "path": ["permission", "{{PERMISSION_VALID_ID}}"]
                }
              },
              "response": []
            }
          ]
        }
      ]
    },
    {
      "name": "app (4)",
      "item": [
        {
          "name": "Hello",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [""],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/",
              "host": ["{{BASE_URL}}"],
              "path": [""]
            }
          },
          "response": []
        },
        {
          "name": "CSRF Token",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/csrftoken",
              "host": ["{{BASE_URL}}"],
              "path": ["csrftoken"]
            }
          },
          "response": []
        },
        {
          "name": "Cookies",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [""],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/__getcookie",
              "host": ["{{BASE_URL}}"],
              "path": ["__getcookie"]
            }
          },
          "response": []
        },
        {
          "name": "LOGOUT",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{BASE_URL}}/logout",
              "host": ["{{BASE_URL}}"],
              "path": ["logout"]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "LOGIN",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [""],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "",
            "value": "",
            "type": "default"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"identifier\": \"admin@admin.admin\",\n    \"password\": \"admin\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{BASE_URL}}/auth/local",
          "host": ["{{BASE_URL}}"],
          "path": ["auth", "local"]
        }
      },
      "response": []
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "csrf-token",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{CSRF_TOKEN}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "const dynamicIdKey = \"DYNAMIC_ID\";",
          "const dynamicIdValue = `{{${dynamicIdKey}}}`;",
          "const dynamicIdSuffix = '_VALID_ID';",
          "",
          "Object.prototype.hasDynamicId = function() {",
          "    return this.request.url.path.at(-1) === dynamicIdValue;",
          "}",
          "",
          "Object.prototype.getDynamicId = function() {",
          "    const currentPath = this.request.url.path.filter(pathPart => pathPart !== dynamicIdValue)?.join('_').toUpperCase();",
          "    return `${currentPath}${dynamicIdSuffix}`",
          "}",
          "",
          "if (pm.hasDynamicId()) {",
          "    const matchedVariableValue = pm.collectionVariables.get(pm.getDynamicId());",
          "    pm.collectionVariables.set(dynamicIdKey, matchedVariableValue);",
          "}",
          "",
          "pm.sendRequest({",
          "    url: `${pm.collectionVariables.get('BASE_URL')}/csrftoken`,",
          "}, (error, res) => {",
          "    pm.collectionVariables.set('CSRF_TOKEN', res.json()?.['_csrf'] || '')",
          "})",
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "const debug = true;",
          "",
          "Object.prototype.setDynamicId = function(collectionKey, callback = (res) => res?.['id'] || res[0]?.['id']) {",
          "    const parsedResponse = JSON.parse(responseBody);",
          "    if (parsedResponse.statusCode === 403) {",
          "        console.warn('Forbidden access! Please check that you are authenticated and you have the required permissions')",
          "    } else {",
          "        const value = callback(parsedResponse) || 'FALSE_ID';",
          "        const key = collectionKey || this.getDynamicId();",
          "        this.collectionVariables.set(key, value);",
          "        debug && console.info(\"Collection Variable Event\", {",
          "            key,",
          "            value",
          "        });",
          "    }",
          "}"
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "BASE_URL",
      "value": "http://localhost:4000",
      "type": "default"
    },
    {
      "key": "CSRF_TOKEN",
      "value": ""
    }
  ]
}
