Summary:
List and create profiles on a specified server.
URL:
http(s)://{server hostname}/api/profile
Methods summary
- GET Method - list all the profiles on this server.
- POST Method - create a profile 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?media=json -H "content-type:application/json"
OUTPUT
{
"items": [
{
"id": 1,
"name": "Test 1",
"rank": 1,
"views": [
8,
9
],
"osServices": [
1
]
},
{
"id": 2,
"name": "Profile 2",
"rank": 2,
"views": [
9,
10,
11
],
"osServices": [
2
]
},
{
"id": 3,
"name": "Profile 3",
"rank": 3,
"views": [
5,
6
],
"osServices": [
3
]
}
],
"count": 3
}
POST Method detail
Create a new profile on this server.
Request:
Name | Description |
---|---|
name | user-specified unique name of the profile. |
views | list of IDs of Views associate with this profile. |
osServices | list of IDs of OS Services associated with this profile. |
Response:
Details of the profile as the GET Method would return it.
Example:
INPUT
curl -v -u -k admin:admin https://localhost/api/profile?media=json -X POST -H "content-type:application/json" -d \
{
"name":"Test 6",
"views": [
8
],
"osServices": [
2
]
}
OUTPUT
{
"id": 6,
"name": "Test 6",
"rank": 6,
"views": [
8
],
"osServices": [
2
]
}
Comments
0 comments
Please sign in to leave a comment.