Skip to content

Commit 0befbc9

Browse files
authored
Merge pull request #229 from HewlettPackard/systems-api-docs
[MORPH-5865] Systems api docs
2 parents 7f46241 + 1fd9467 commit 0befbc9

29 files changed

Lines changed: 909 additions & 0 deletions

components/examples/system.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"system": {
3+
"id": 1,
4+
"name": "my-system",
5+
"description": "My system description",
6+
"type": { "id": 1, "name": "Generic", "code": "generic" },
7+
"layout": { "id": 1, "name": "Default", "code": "generic-default" },
8+
"status": "ok",
9+
"statusMessage": null,
10+
"enabled": true,
11+
"externalId": "ext-1234",
12+
"config": {},
13+
"components": [
14+
{
15+
"id": 10,
16+
"name": "Primary Node",
17+
"type": { "id": 5, "code": "primary-node", "name": "Primary Node" },
18+
"status": "ok",
19+
"externalId": null,
20+
"config": {}
21+
}
22+
],
23+
"dateCreated": "2026-01-01T00:00:00Z",
24+
"lastUpdated": "2026-01-01T00:00:00Z"
25+
}
26+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"success": true,
3+
"id": 42
4+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"system": {
3+
"externalId": "ext-1234-updated",
4+
"config": {
5+
"region": "us-east-1"
6+
},
7+
"components": [
8+
{
9+
"typeCode": "primary-node",
10+
"name": "Primary Node",
11+
"externalId": "ext-comp-99",
12+
"config": {
13+
"hostname": "node1.example.com"
14+
}
15+
}
16+
]
17+
}
18+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"success": true
3+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"system": {
3+
"name": "my-system",
4+
"description": "My system description",
5+
"type": { "id": 1 },
6+
"layout": { "id": 1 },
7+
"enabled": true,
8+
"externalId": "ext-1234",
9+
"config": {}
10+
}
11+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"systemTypeLayouts": [
3+
{
4+
"id": 1,
5+
"name": "Default",
6+
"code": "generic-default",
7+
"componentTypes": [
8+
{
9+
"id": 5,
10+
"code": "primary-node",
11+
"name": "Primary Node",
12+
"category": "compute"
13+
},
14+
{
15+
"id": 6,
16+
"code": "storage-volume",
17+
"name": "Storage Volume",
18+
"category": "storage"
19+
}
20+
]
21+
}
22+
]
23+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"systemTypes": [
3+
{
4+
"id": 1,
5+
"name": "Generic",
6+
"code": "generic"
7+
},
8+
{
9+
"id": 2,
10+
"name": "Kubernetes",
11+
"code": "kubernetes"
12+
}
13+
]
14+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"system": {
3+
"name": "my-system",
4+
"description": "My system description",
5+
"type": { "id": 1 },
6+
"layout": { "id": 1 },
7+
"enabled": true,
8+
"externalId": "ext-1234",
9+
"config": {},
10+
"components": [
11+
{
12+
"typeCode": "primary-node",
13+
"name": "Primary Node",
14+
"externalId": "ext-comp-99",
15+
"config": {}
16+
}
17+
]
18+
}
19+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"success": true,
3+
"id": 42
4+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"system": {
3+
"name": "my-system-renamed",
4+
"description": "Updated description",
5+
"enabled": true
6+
}
7+
}

0 commit comments

Comments
 (0)