HARPA.AI
LIBRARYAPIGUIDESAI COMMANDSBLOG

👤  alarminfo

Created by 宁 Dave
Updated on Jan 23, 03:56
Installed 1 time
RUNS JS CODE

How to Use

IMPORT COMMAND

Content

- type: js
  args: ''
  code: >
    return (await 


    fetch("https://rios.hwwt2.com/inspection-gateway/deviceDeploy/alarm/queryList",
    {
      "headers": {
        "accept": "application/json, text/plain, */*",
        "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        "cache-control": "no-cache",
        "client": "pc",
        "content-type": "application/json;charset=UTF-8",
        "pragma": "no-cache",
        "priority": "u=1, i",
        "sec-ch-ua": "\"Not(A:Brand\";v=\"8\", \"Chromium\";v=\"144\", \"Microsoft Edge\";v=\"144\"",
        "sec-ch-ua-mobile": "?0",
        "sec-ch-ua-platform": "\"Windows\"",
        "sec-fetch-dest": "empty",
        "sec-fetch-mode": "cors",
        "sec-fetch-site": "same-origin",
        "token": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpbnNwZWN0aW9uX3NlcnZpY2UiLCJzdWIiOiJ7XCJzb3VyY2VcIjoxLFwidXNlckNvZGVcIjpcIjEwMjQ4MTA3NVwiLFwidXNlck5hbWVcIjpcIuaItOWugVwiLFwidXNlckdyb3VwXCI6MX0iLCJ0b2tlblR5cGUiOiIxMDI0ODEwNzUiLCJleHAiOjE3NjkyMjY2NjcsImlhdCI6MTc2OTE0MDI2NywianRpIjoiYjhjM2Q3ODk4MTU3NDk4M2I1NDViOWRmZWJmNzkzMTMifQ.68YqwJoHdoLVlWbPgg2szcUB1DPPvZf0WVyYIh8RiSA",
        "cookie": "sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%2219be004c063cef-0f5728ce3464da8-4c657b58-1024000-19be004c0641750%22%2C%22first_id%22%3A%22%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTliZTAwNGMwNjNjZWYtMGY1NzI4Y2UzNDY0ZGE4LTRjNjU3YjU4LTEwMjQwMDAtMTliZTAwNGMwNjQxNzUwIn0%3D%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%22%2C%22value%22%3A%22%22%7D%7D; PHPSESSID=7bh9m88kqmtebgt1395f6m6th3; JSESSIONID=C3B743270ED09439FE7E54476D001772",
        "Referer": "https://rios.hwwt2.com/inspection/"
      },
      "body": "{\"storeCodes\":\"\",\"storeCode\":\"\",\"alarmStartTime\":\"2025-11-01\",\"alarmEndTime\":\"2026-01-23\",\"infoStatus\":\"\",\"alarmStatus\":\"\",\"notifyStatusList\":[],\"calleeLevel\":\"\",\"brandCode\":\"1\",\"pageNum\":1,\"pageSize\":10000}",
      "method": "POST"
    })


    ).json()
  param: rst
  timeout: 20000
  onFailure: ''
- type: js
  args: rst
  code: |-
    const dataList = args.rst.data
    let rst1 = ''
    headflag = false
    for(item of dataList){
        const headers = Object.keys(item).join(',');
        const rows = Object.values(item).map(v => v === null ? '' : v).join(',');
        if(headflag){
          rst1+=rows+'\n'
        }else{
        rst1+=(headers+'\n'+rows+'\n')
        headflag = true
    }
    }
    return rst1
  param: rst1
  timeout: 15000
  onFailure: ''
- type: export
  what: param
  param: rst1
  filename: rst.csv
Notice: Please read before using

This automation command is created by a community member. HARPA AI team does not audit community commands.

Please review the command carefully and only install if you trust the creator.

Contact us
HomeUse CasesGuidesPrivacy PolicyTerms of Service
CAN WE STORE COOKIES?
Our website uses cookies for the purposes of accessibility and security. They also allow us to gather statistics in order to improve the website for you. More info: Privacy Policy