I got this to work at last. I am on SEP 14 MP1. So I do not know if this works for other versions. The PDF attached (REST_API_Ref_SEP14.pdf) helped me.
1. Authenticate to Symantec Endpoint Protection Manager
- Post to https://sepserver:8446/sepm/api/v1/identity/authenticate
- Body
{
"username" : "admin",
"password" : "password",
"domain" : ""
}
For me that worked only with the "Sysadmin" admin konto.
The result should look like this:
{
"domain": "Default",
"refreshToken": "cab16df1-58a2-4b8a-ad70-7b023db34025",
"refreshTokenExpiration": 43199,
"role": {
"bitMask": 8,
"title": "sysadmin"
},
"adminId": "AF3C39A10A320801000000DBF200C60A",
"clientId": "4767c33a-99be-4ef9-b41f-e8db00da10ee",
"clientSecret": "b65a52eb-c153-43f5-b9bd-6d2f0b43394f",
"bannerTitle": "",
"bannerText": "",
"username": "admin",
"fullname": null,
"token": "c34692c5-201d-4d94-b0f8-61ed03383337",
"tokenExpiration": 43199,
"permissionSet": {
"reportingRights": true,
"groupRights": true,
"siteRights": true,
"remoteCommandRights": true,
"policyRights": true
},
2. Send a query to get groups (just an example):
- Send get https://sepserver:8446/sepm/api/v1/groups
Authorization: Bearer c34692c5-201d-4d94-b0f8-61ed03383337
--> Here you have to use the token you received earlier.
And that should give you result like this:
{
"content": [
{
"id": "EF9C029A0A931BA7246C99C00F39133C",
"name": "Default Group",
"description": "",
"fullPathName": "My Company\\Default Group",
"numberOfPhysicalComputers": 1,
"numberOfRegisteredUsers": 1,
"createdBy": "AF3C39A10A320801000000DBF200C60A",
"created": 1477983046292,
"lastModified": 1477983046292,
"policySerialNumber": "EF9C-11/08/2016 12:21:22 652",
"policyDate": 1478607682652,
"customIpsNumber": "",
"childGroups": null,
"domain": {
"id": "FC1716470A931BA765167FEC6FDA9A5C",
"name": "Default"
},
"policyInheritanceEnabled": false
},
{
"id": "4541012E0A931BA7085259C3220013FB",
"name": "My Company",
"description": "",
"fullPathName": "My Company",
"numberOfPhysicalComputers": 0,
"numberOfRegisteredUsers": 0,
"createdBy": "AF3C39A10A320801000000DBF200C60A",
"created": 1477983046292,
"lastModified": 1477983046292,
"policySerialNumber": "4541-11/08/2016 12:21:22 652",
"policyDate": 1478607682652,
"customIpsNumber": "",
"childGroups": null,
"domain": {
"id": "FC1716470A931BA765167FEC6FDA9A5C",
"name": "Default"
},
"policyInheritanceEnabled": false
}
],
"size": 25,
"number": 0,
"totalPages": 1,
"lastPage": true,
"firstPage": true,
"sort": [
{
"direction": "ASC",
"property": "NAME",
"ascending": true
}
],
"totalElements": 2,
"numberOfElements": 2
}
So in fact I did not need ClientID or ClientSecret. However there might be other ways for the same result. So far it seems there is not much you can do with the REST API and also the documentation is not really clear.