{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"2bc30b61-8ba6-4f7a-a378-4807e418d9a8","name":"loonflow3.0","description":"# Overview\n\n[Loonflow ](https://github.com/blackholll/loonflow) is an open-source process automation platform developed based on Django. After multiple versions of iteration and refactoring, we proudly present Loonflow 3.0 - a version that achieves a qualitative leap in visualization, flexibility, and scalability.\n\nIn order to intergrate with other systems, Loonflow provider a range of REST API endpoint, you can use those apis create or handle ticket directly from any other system.\n\nMost of the endpoints accept JSON as input and return JSON respones. This means tthat you must usually add folllwing headers to you request:\n\n```\nContent-type: application/json\nAccept: application/json\n\n ```\n\n# Authentication\n\nFor most of api, you need add email, timestamp, signature, appname,tenantid into request header.\n\nemail: This email refers to the identity you'd like to use when making this API call\n\ntimestamp: The value of the `timestamp` field must be the current Unix timestamp, precise to the second. It must be within a 2-minute window (plus or minus 2 minutes) of the actual server time.\n\nappname: You can create a new application via http://{host or domain}/setting/application. After app created, you can get the app token, the token will be used for generate token.\n\ntenantid: Tenant's id, the default tenant is is '00000000-0000-0000-0000-000000000001‘\n\n<img src=\"https://content.pstmn.io/8e6439e2-52b9-4d43-b463-bddb2b84e06b/aW1hZ2UucG5n\" width=\"352\" height=\"191\">\n\n<img src=\"https://content.pstmn.io/31cf7663-c77b-47a0-9447-748ff29b23d1/aW1hZ2UucG5n\" width=\"352\" height=\"181\">\n\n> \\> About Application type: Admin can call all apis, workflow_admin can only call ticket and workflow related apis and some common apis \n  \n\n# How to calculate the signature\n\n## call api with code\n\nHere is a sample with python\n\n``` python\nimport time\nimport hashlib\n# Get current Unix timestamp and convert to string\ntimestamp = str(int(time.time()))\n# Combine timestamp and token to create the original string\nori_str = timestamp + token\n# Generate MD5 hash of the combined string in hexadecimal format\nsignature = hashlib.md5(ori_str.encode(encoding='utf-8')).hexdigest()\n\n ```\n\n## call api with postman collection\n\nAdd a postman Environment, and set environments, then add pre_script to collection.\n\nbaseUrl: loonflow server's domain or ip\n\nappName: application's name\n\nappToken: application's token\n\ntenantId: tenant id\n\nemail: This email refers to the identity you'd like to use when making this API call\n\n<img src=\"https://content.pstmn.io/2a720dbf-0455-4d5b-a423-0ffbb5933ec5/aW1hZ2UucG5n\" width=\"420\" height=\"196\">\n\nSince the loonflow collection already add the pre-script, you just need edit the environment variable's value\n\nThis is pre-script code\n\n``` javascript\nconst token = pm.environment.get('appToken');\n\nif (!token) {\n    console.error('Missing token environment variable');\n    throw new Error('Missing token environment variable')\n}\n\nconst timestamp = Math.floor(Date.now()/1000).toString();\n\nconst oriStr = timestamp + token\nconst signature = CryptoJS.MD5(oriStr).toString();\npm.request.headers.upsert({\n    key: 'appName',\n    value: pm.environment.get(\"appName\")\n})\n\npm.request.headers.upsert({\n    key: 'timestamp',\n    value: timestamp\n})\npm.request.headers.upsert({\n    key: 'signature',\n    value: signature\n})\npm.request.headers.upsert({\n    key: 'tenantId',\n    value: pm.environment.get('tenantId')\n})\npm.request.headers.upsert({\n    key: 'email',\n    value: pm.environment.get('email')\n})\n\n ```\n\n# Permission\n\nThis version is more formal and precise, suitable for official API reference documentation.\n\n- **Permission:** **`admin`** - Requires the email of a user with the `admin` role.\n    \n- **Permission:** **`workflow_admin`** - Requires the email of a user with either the `admin` or `workflow_admin` role.\n    \n- **Permission:** **`all_users`** - Accepts the email of any active user.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":true,"owner":"15031929","team":5375506,"collectionId":"2bc30b61-8ba6-4f7a-a378-4807e418d9a8","publishedId":"2sB3WyJbap","public":true,"publicUrl":"https://documenter-api.postman.tech/view/15031929/2sB3WyJbap","privateUrl":"https://go.postman.co/documentation/15031929-2bc30b61-8ba6-4f7a-a378-4807e418d9a8","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"This is loonflow 3.0 api document,  user can create or handle ticket directly from other systems, eg, hr, it ops system.\nhttps://github.com/blackholll/loonflow"},{"name":"title","value":"loonflow3.0 api document"}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.0","publishDate":"2025-11-19T14:49:25.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"loonflow3.0 api document","description":"This is loonflow 3.0 api document,  user can create or handle ticket directly from other systems, eg, hr, it ops system.\nhttps://github.com/blackholll/loonflow"},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"loonflow3","id":"60fef1c0-065c-418c-b2fd-a6be3c527ae0","owner":"15031929","values":[{"key":"baseUrl","value":"","enabled":true,"type":"default"},{"key":"appName","value":"","enabled":true,"type":"default"},{"key":"appToken","value":"","enabled":true,"type":"secret"},{"key":"tenantId","value":"","enabled":true,"type":"default"},{"key":"email","value":"","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/8464b1a20d92ae6e9cf13baf7008620134081c6f11bcad253b084293b6d1847f","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"loonflow3","value":"15031929-60fef1c0-065c-418c-b2fd-a6be3c527ae0"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sB3WyJbap"}