# Admin API problem with PUT - solved

**URL:** <https://discourse.nodered.org/t/admin-api-problem-with-put-solved/93710>\
**Category:** General\
**Created:** [5 December 2024 15:05 UTC](https://discourse.nodered.org/t/admin-api-problem-with-put-solved/93710 "2024-12-05T15:05:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [5 December 2024 15:05 UTC](https://discourse.nodered.org/t/admin-api-problem-with-put-solved/93710/1 "2024-12-05T15:05:19Z")

</div>

Hello, I have a problem using the PUT method in the admin API

I created the following simple flow tab without any problems using POST method:

```auto
{"id":"1234","label":"Sheet1","nodes":[],"configs":[],"subflows":[]}

```

If I use the GET method on the id it responded with it responds with:

```auto
{"id":"0f2aa1caef0ffc51","label":"Sheet1","nodes":[]}

```

Now I would like just to change the label of the tab flow using the PUT method but it fails

```auto
{"id":"0f2aa1caef0ffc51","label":"Sheet2","nodes":[]}

```

I cannot figure out where I go wrong, any hints? Sample flow below  
(using NR 4.0.5)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/4/e4ee002dbd9cb6bac8d5f44526b148b50da7a075.png)

```auto
[
    {
        "id": "a9a79ff2fc54e172",
        "type": "http request",
        "z": "76de0c6b9b65f93e",
        "name": "",
        "method": "POST",
        "ret": "txt",
        "paytoqs": "query",
        "url": "http://localhost:1880/flow",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 400,
        "y": 860,
        "wires": [
            [
                "4967cebcccfb184b"
            ]
        ]
    },
    {
        "id": "c82a1f7bbb1c3434",
        "type": "change",
        "z": "76de0c6b9b65f93e",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "url",
                "pt": "msg",
                "to": "\"http://localhost:1880/flow/\" & payload",
                "tot": "jsonata"
            },
            {
                "t": "delete",
                "p": "payload",
                "pt": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 400,
        "y": 960,
        "wires": [
            [
                "7248bf88861a8d69"
            ]
        ]
    },
    {
        "id": "4967cebcccfb184b",
        "type": "debug",
        "z": "76de0c6b9b65f93e",
        "name": "debug 379",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 610,
        "y": 860,
        "wires": []
    },
    {
        "id": "7248bf88861a8d69",
        "type": "http request",
        "z": "76de0c6b9b65f93e",
        "name": "",
        "method": "GET",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 610,
        "y": 960,
        "wires": [
            [
                "a585cebd104d5e28"
            ]
        ]
    },
    {
        "id": "b36410c3ea9b7c50",
        "type": "comment",
        "z": "76de0c6b9b65f93e",
        "name": "request to add a new flow tab",
        "info": "",
        "x": 220,
        "y": 820,
        "wires": []
    },
    {
        "id": "5e26c559bebd2a8c",
        "type": "comment",
        "z": "76de0c6b9b65f93e",
        "name": "request to retrieve a flow tab",
        "info": "",
        "x": 220,
        "y": 920,
        "wires": []
    },
    {
        "id": "056c13cdd60e50f2",
        "type": "http request",
        "z": "76de0c6b9b65f93e",
        "name": "",
        "method": "PUT",
        "ret": "txt",
        "paytoqs": "query",
        "url": "http://localhost:1880/flow",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 400,
        "y": 1060,
        "wires": [
            [
                "170c52e615582814"
            ]
        ]
    },
    {
        "id": "170c52e615582814",
        "type": "debug",
        "z": "76de0c6b9b65f93e",
        "name": "debug 380",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 610,
        "y": 1060,
        "wires": []
    },
    {
        "id": "28653f93786fb06c",
        "type": "comment",
        "z": "76de0c6b9b65f93e",
        "name": "request to update an existing flow tab",
        "info": "",
        "x": 250,
        "y": 1020,
        "wires": []
    },
    {
        "id": "51399a72f866f581",
        "type": "inject",
        "z": "76de0c6b9b65f93e",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"id\":\"0f2aa1caef0ffc51\",\"label\":\"Sheet2\",\"nodes\":[]}",
        "payloadType": "jsonata",
        "x": 150,
        "y": 1060,
        "wires": [
            [
                "056c13cdd60e50f2"
            ]
        ]
    },
    {
        "id": "2c18f5b59bdea89e",
        "type": "inject",
        "z": "76de0c6b9b65f93e",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"id\":\"1234\",\"label\":\"Sheet1\",\"nodes\":[],\"configs\":[],\"subflows\":[]}",
        "payloadType": "json",
        "x": 150,
        "y": 860,
        "wires": [
            [
                "a9a79ff2fc54e172"
            ]
        ]
    },
    {
        "id": "4c9363a6a59fce6d",
        "type": "inject",
        "z": "76de0c6b9b65f93e",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0f2aa1caef0ffc51",
        "payloadType": "str",
        "x": 180,
        "y": 960,
        "wires": [
            [
                "c82a1f7bbb1c3434"
            ]
        ]
    },
    {
        "id": "a585cebd104d5e28",
        "type": "debug",
        "z": "76de0c6b9b65f93e",
        "name": "debug 382",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 960,
        "wires": []
    }
]

```

---

<div class="post-metadata">

**Author:** ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)\
**Post date:** [5 December 2024 20:50 UTC](https://discourse.nodered.org/t/admin-api-problem-with-put-solved/93710/2 "2024-12-05T20:50:39Z")

</div>

Because the id is missing in the PUT request: `http://localhost:1880/flow/[nodeId]`

So with your example the correct URL is `http://localhost:1880/flow/0f2aa1caef0ffc51`

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [5 December 2024 22:20 UTC](https://discourse.nodered.org/t/admin-api-problem-with-put-solved/93710/3 "2024-12-05T22:20:05Z")

</div>

Thank you so much!!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [19 December 2024 22:20 UTC](https://discourse.nodered.org/t/admin-api-problem-with-put-solved/93710/4 "2024-12-19T22:20:16Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
