In order to get all folder with subfolders and keys available in Teampass for current user you can call the following GET request:
[GET] /api/v1/nodes
STATUS: 200 OK
[
{
"id": "1",
"title": "first folder",
"type": "FOLDER",
"access": "W",
"complication": "0",
"descendants": [
{
"id": "3",
"title": "subfolder",
"type": "FOLDER",
"access": "R",
"complication": "0",
"descendants": []
},
{
"id": "2",
"title": "first key",
"type": "PASSWORD",
"email": "demo@pass.securium.ch",
"url": "https://pass.securium.ch",
"password": "ZGVtbw==",
"username": "ZGVtby51c2Vy",
"description": ""
}
]
},
{
"id": "2",
"title": "second folder",
"type": "FOLDER",
"access": "W",
"complication": "0",
"descendants": [
{
"id": "1",
"title": "second key",
"type": "PASSWORD",
"email": "demo@pass.securium.ch",
"username": "ZGVtby5tYW5hZ2Vy",
"password": "ZGVtbw==",
"url": "https://pass.securium.ch",
"description": "",
}
]
}
]
You can view a single folder with subfolders and keys by executing the following request:
[GET] /api/v1/node/{id}
STATUS: 200 OK
{
"id": "2",
"title": "second folder",
"type": "FOLDER",
"access": "W",
"complication": "0",
"descendants": [
{
"id": "1",
"title": "second key",
"type": "PASSWORD",
"url": "https://pass.securium.ch",
"username": "ZGVtby5tYW5hZ2Vy",
"password": "ZGVtbw==",
"email": "demo@pass.securium.ch",
"description": ""
}
]
}
To create a new folder, you can execute the following request:
[POST] /api/v1/node
STATUS: 201 CREATED
{
"id": "2",
"title": "second folder",
"type": "FOLDER",
"access": "W",
"complication": "0",
"descendants": []
}
You can update an existing folder using PUT method:
[PUT] /api/v1/node/{id}
STATUS: 200 OK
{
"id": "2",
"title": "second folder rename",
"type": "FOLDER",
"access": "W",
"complication": "0",
"descendants": [
{
"id": "1",
"title": "second key",
"type": "PASSWORD",
"url": "https://pass.securium.ch",
"username": "ZGVtby5tYW5hZ2Vy",
"password": "ZGVtbw==",
"email": "demo@pass.securium.ch",
"description": ""
}
]
}