Summary:
List all the profiles on a specified server in rank order (with the highest rank first), and adjust the profiles rank order as you wish.
URL:
http(s)://{server hostname}/api/profile/rank
Methods summary
- GET Method - List all the profiles on this server in rank order (with the highest rank first).
- PUT Method - adjust the ranking of profiles on this server.
GET Method detail
Returns a list of profiles on this server.
Response:
Name | Description |
---|---|
id |
ID of this profile. |
name | user-specified unique name of the profile. |
rank |
rank of the profile. |
views | list of IDs of Views associate with this profile. |
osServices | list of IDs of OS Services associated with this profile. |
Example:
INPUT
curl -v -u -k admin:admin https://localhost/api/profile/rank?media=json -H "content-type:application/json"
OUTPUT
{
"items": [
{
"id": 6,
"name": "Test 6",
"rank": 6,
"views": [
8
],
"osServices": [
2
]
},
{
"id": 5,
"name": "Test 5",
"rank": 5,
"views": [
8
],
"osServices": [
1
]
},
{
"id": 4,
"name": "Test 4",
"rank": 4,
"views": [
8
],
"osServices": []
},
{
"id": 3,
"name": "Profile 3",
"rank": 3,
"views": [
5,
6
],
"osServices": [
3
]
},
{
"id": 2,
"name": "Profile 2",
"rank": 2,
"views": [
9,
10,
11
],
"osServices": [
2
]
},
{
"id": 1,
"name": "Test 1",
"rank": 1,
"views": [
8,
9
],
"osServices": [
1
]
}
],
"count": 6
}
PUT Method detail
Adjust the ranking of profiles on this server.
Request:
Name | Description |
---|---|
ids | profile IDs in your preferred rank order, e.g. [4, 2, 1, 3]. The highest rank takes precedence over the lowest rank. |
Response:
List of profiles in rank order, as the GET Method above would respond.
Example:
INPUT
curl -u admin:admin https://localhost/api/autodiscovery?media=json -X PUT –H "content-type:application/json" -d \ '{"id" : "1"}'{
{
"ids": [
4,
5,
1,
2,
3,
6
]
}
OUTPUT
[
{
"id": 4,
"name": "Test 4",
"rank": 6,
"views": [
8
],
"osServices": []
},
{
"id": 5,
"name": "Test 5",
"rank": 5,
"views": [
8
],
"osServices": [
1
]
},
{
"id": 1,
"name": "Test 1",
"rank": 4,
"views": [
8,
9
],
"osServices": [
1
]
},
{
"id": 2,
"name": "Profile 2",
"rank": 3,
"views": [
9,
10,
11
],
"osServices": [
2
]
},
{
"id": 3,
"name": "Profile 3",
"rank": 2,
"views": [
5,
6
],
"osServices": [
3
]
},
{
"id": 6,
"name": "Test 6",
"rank": 1,
"views": [
8
],
"osServices": [
2
]
}
]
Comments
0 comments
Please sign in to leave a comment.