chirpstack Device-profiles

get api/device-profiles?limit=2
organizationID 和application来进行选择

 

#返回数据格式
{
    "totalCount": "5",
    "result": [
        {
            "id": "6eb4b05a-dc53-4921-a490-574c17de6bed",
            "name": "demo",
            "organizationID": "1",
            "networkServerID": "1",
            "createdAt": "2022-04-04T04:40:55.552639Z",
            "updatedAt": "2022-05-01T07:43:00.861773Z",
            "networkServerName": "local_ns"
        },
 
    ]
}
#post请求 api/device-profiles
携带:{
  "deviceProfile":{
    "name":"ClassA_OTAA",
    "networkServerID":"1",
    "macVersion":"1.0.2",
    "regParamsRevision":"A",
    "supportsJoin":true,
    "organizationID":"1"
  }
}
返回id号
"id": "6eb4b05a-dc53-4921-a490-574c17de6bed",
查看单个设备GET /api/device-profiles/{id}
{
    "deviceProfile": {
        "id": "d7befbe6-926f-42d5-84f4-767a175fd2e2",
        "name": "ClassA_OTAA",
        "organizationID": "1",
        "networkServerID": "1",
        "supportsClassB": false,
        "classBTimeout": 0,
        "pingSlotPeriod": 0,
        "pingSlotDR": 0,
        "pingSlotFreq": 0,
        "supportsClassC": false,
        "classCTimeout": 0,
        "macVersion": "1.0.2",
        "regParamsRevision": "A",
        "rxDelay1": 0,
        "rxDROffset1": 0,
        "rxDataRate2": 0,
        "rxFreq2": 0,
        "factoryPresetFreqs": [],
        "maxEIRP": 0,
        "maxDutyCycle": 0,
        "supportsJoin": true,
        "rfRegion": "CN470",
        "supports32BitFCnt": false,
        "payloadCodec": "",
        "payloadEncoderScript": "",
        "payloadDecoderScript": "",
        "geolocBufferTTL": 0,
        "geolocMinBufferSize": 0,
        "tags": {},
        "uplinkInterval": "0s",
        "adrAlgorithmID": ""
    },
    "createdAt": "2023-04-05T08:23:15.931011Z",
    "updatedAt": "2023-04-05T08:23:15.931011Z"
}
更新put api/device-profiles/d7befbe6-926f-42d5-84f4-767a175fd2e2
携带数据:
{
  "deviceProfile":{
    "name":"qq", 修改的,下面也都可以修改
    "networkServerID":"1",
    "macVersion":"1.0.2",
    "regParamsRevision":"A",
    "supportsJoin":true,
    "organizationID":"1"
  }
}

 

 上面是更新后的

#delete 删除  api/device-profiles/d7befbe6-926f-42d5-84f4-767a175fd2e2带着id
返回空

 

{ "totalCount": "4", "result": [ { "id": "6eb4b05a-dc53-4921-a490-574c17de6bed", "name": "demo", "organizationID": "1", "networkServerID": "1", "createdAt": "2022-04-04T04:40:55.552639Z", "updatedAt": "2022-05-01T07:43:00.861773Z", "networkServerName": "local_ns" }, { "id": "c64fa28f-d987-4e63-a68f-5afa4ed193b3", "name": "deviceprofileABP_C", "organizationID": "1", "networkServerID": "1", "createdAt": "2022-04-04T04:40:55.564646Z", "updatedAt": "2022-04-04T04:40:55.564646Z", "networkServerName": "local_ns" }, { "id": "1e67ab3f-de6b-432a-8ad4-ead3f76ac3cf", "name": "deviceprofileOTAA", "organizationID": "1", "networkServerID": "1", "createdAt": "2022-04-04T04:40:55.570641Z", "updatedAt": "2022-04-04T04:40:55.570641Z", "networkServerName": "local_ns" }, { "id": "a9cd4fc0-0cce-41df-95af-8d4ce528cfab", "name": "deviceprofileOTAA_C", "organizationID": "1", "networkServerID": "1", "createdAt": "2022-04-04T04:40:55.575642Z", "updatedAt": "2022-04-04T04:40:55.575642Z", "networkServerName": "local_ns" } ] }
posted @ 2023-04-05 16:33  苍茫大海  阅读(46)  评论(0)    收藏  举报