Enterprise Recon v1 API
Target Credentials
Use this set of APIs to manage credentials and cloud access tokens.
List Credentials
Retrieve information about the label, target type, user name and certificate information for all or for a specific target credential set.
Request
GET
https://er-master:8339/v1/credentials/{credential_id}
Authorization
Path Parameters
Parameter | Data Type | Description |
---|---|---|
credential_id |
string |
Specify Credential ID for credential set to retrieve information for. If no value is specified, response returns data for all target credential sets. credential_id is the id response item from the /v1/credentials endpoint. |
Query Parameters
Parameter | Data Type | Description |
---|---|---|
credential_label |
string |
Filter results by credential label. |
sort_by |
string enum: label username cert example: sort_by=username |
Sort credentials by label, user name or certificate / key file name. By default, credentials are sorted by label in ascending order. |
descend |
boolean default: false enum: true false |
Set true to sort records in descending order. |
offset |
integer default: 0 |
The first credential record to return data for. For offset=N, data will be fetched starting from the Nth credential record. If no value is specified or offset=0, query will return data from the very first credential record. |
limit |
integer default: 1000 max: 100000 |
Maximum number of credential records to return data for, starting from the first record determined by the offset parameter value. |
Header Parameters
Parameter | Data Type | Description |
---|---|---|
Accept-Encoding |
string enum: gzip deflate |
Specify the compression algorithm to use on the response object.
Compressed content will not be returned for endpoints that return reports as files (e.g. PDF, CSV etc), endpoints that return binary files (e.g. Node Agent installers) or unsuccessful API calls. |
Request Samples
HTTP
GET /v1/credentials
Accept: application/json
cURL
curl --request GET 'https://er-master:8339/v1/credentials' \
--user apiuser:password123 \
--header "Accept: application/json"
Response Schema
200 OK
Response Item | Data Type | Description |
---|---|---|
id |
string |
Unique Credential ID. This ID is unique 20 digit number. |
label |
string |
Descriptive label for the credential set. |
username |
string |
Login user name for the credential set. |
type |
string example: Box.Net Location,Server |
Describes the Target type for the credential set. Not returned for Cloud credentials. For the possible values for the type field, refer to Credential Types. |
cert |
string |
Certificate or key file name. Only applicable if a certificate or key file is used for the credential set. |
Response Samples
200 OK
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: xxx
[
{
"id": "6385463990203912953",
"label": "Exchange Cred",
"username": "example.com\\administrator",
"type": "Server"
},
{
"id": "1277335729040792164",
"label": "My One Drive Credentials",
"username": "Cred_OneDrive",
"type": "OneDrive Business",
"cert": "Cred_OneDrive"
},
{
"id": "15662097398606431962",
"label": "Google Workspace",
"username": "UserFooBar",
"type": "Google Mail",
"cert": "GoogleAppsCert.p12"
}
]
Update a Credential
Update the label, user name, password and/or certificate key or file for a credential set.
See Examples - Add Target Credentials for more sample requests.
Request
PUT
https://er-master:8339/v1/credentials/<credential_id>
Authorization
Path Parameters
Parameter | Data Type | Description |
---|---|---|
credential_id |
string |
Specify Credential ID for credential set to update. credential_id is the id response item from the /v1/credentials endpoint. |
Request Schema
Response Item | Data Type | Description |
---|---|---|
label |
string |
Descriptive label for the credential set. |
username |
string |
Login user name, user account email address, service account email address, or client ID (for Exchange Online, Microsoft OneNote, Microsoft Teams, OneDrive Business, and SharePoint Online Targets) for the credential set. Not required for Dropbox Business, Dropbox Personal, Box.NET, and Box Inc Target credentials. For all other Targets, user name will be deleted if this field is not provided. When adding credentials for Active Directory (AD)
users, escape the backslash "\" character with another "\" in the
username field. For example,
myDomain\\userA.
|
password |
string |
Login password, consumer key (for Salesforce Targets), access token (for Dropbox Business, Dropbox Personal and Box.NET Targets), or client secret (for Exchange Online, Microsoft OneNote, Microsoft Teams, OneDrive Business and SharePoint Online Targets). Not required for Google Cloud Storage and Box Inc Targets. Existing password will not be changed if this field is not provided in the request. |
cert_name |
string |
Name of the certificate / private key file, JSON configuration file (for Box Inc Targets) or tenant ID (for Exchange Online, Microsoft OneNote, Microsoft Teams, OneDrive Business, and SharePoint Online Targets). Existing value will not be changed if both cert_name and cert_file are not provided in the request. |
cert_file |
string |
Base64 encoded string of the contents of the certificate / private key file, base64 encoded string of the JSON configuration file (for Box Inc Targets), or base64 encoded string of the tenant ID (for Exchange Online, Microsoft OneNote, Microsoft Teams, OneDrive Business, and SharePoint Online Targets). Existing value will not be changed if both cert_name and cert_file are not provided in the request. |
Request Samples
HTTP
PUT /v1/credentials/15792178316638465022
Content-Type: application/json
{
"label": "My Gmail Credentials",
"username": "User",
"password": "UserPassword",
"cert_name": "myCert",
"cert_file": "NUE1REU1MTk3ODRBRDU1NEMxNDZGOTAwMw=="
}
cURL
curl --request PUT 'https://er-master:8339/v1/credentials/15792178316638465022' \
--user apiuser:password123 \
--header "Content-Type: application/json" \
--data-raw '{
"label": "My Gmail Credentials",
"username": "User",
"password": "UserPassword",
"cert_name": "myCert",
"cert_file": "NUE1REU1MTk3ODRBRDU1NEMxNDZGOTAwMw=="
}'
Response Samples
Delete a Credential
Delete a credential set.
Request
DELETE
https://er-master:8339/v1/credentials/<credential_id>
Authorization
Path Parameters
Parameter | Data Type | Description |
---|---|---|
credential_id |
string |
Specify Credential ID for credential set to delete. credential_id is the id response item from the /v1/credentials endpoint. |
Request Samples
HTTP
DELETE /v1/credentials/15792178316638465022
Content-Type: application/json
cURL
curl --request DELETE 'https://er-master:8339/v1/credentials/15792178316638465022' \
--user apiuser:password123
Response Samples
Add a New Credential Set
Add a new credential set.
See Examples - Add Target Credentials for more sample requests.
Request
POST
https://er-master:8339/v1/credentials
Authorization
Request Schema
Response Item | Data Type | Description |
---|---|---|
label |
string |
Descriptive label for the credential set. |
username |
string |
Login user name, user account email address, service account email address, or client ID (for Exchange Online, Microsoft OneNote, Microsoft Teams, OneDrive Business, and SharePoint Online Targets) for the credential set. Not required for Dropbox Business, Dropbox Personal, Box.NET, and Box Inc Target credentials. When adding credentials for Active Directory (AD)
users, escape the backslash "\" character with another "\" in the
username field. For example,
myDomain\\userA.
|
password |
string |
Login password, consumer key (for Salesforce Targets), access token (for Dropbox Business, Dropbox Personal and Box.NET Targets), or client secret (for Exchange Online, Microsoft OneNote, Microsoft Teams, OneDrive Business and SharePoint Online Targets). Not required for Google Cloud Storage and Box Inc Targets. |
cert_name |
string |
Name of the certificate / private key file, JSON configuration file (for Box Inc Targets) or tenant ID (for Exchange Online, Microsoft OneNote, Microsoft Teams, OneDrive Business, and SharePoint Online Targets). |
cert_file |
string |
Base64 encoded string of the contents of the certificate / private key file, base64 encoded string of the JSON configuration file (for Box Inc Targets), or base64 encoded string of the tenant ID (for Exchange Online, Microsoft OneNote, Microsoft Teams, OneDrive Business, and SharePoint Online Targets). |
type |
string example: Box.Net Location,Server |
Describes the Target type for the credential set. For the possible values for the type field, refer to Credential Types. |
Request Samples
HTTP
POST /v1/credentials
Content-Type: application/json
{
"label": "My Workstation",
"username": "User",
"password": "UserPassword",
"type": "Server"
}
cURL
curl --request POST 'https://er-master:8339/v1/credentials' \
--user apiuser:password123 \
--header "Content-Type: application/json" \
--data-raw '{
"label": "My Workstation",
"username": "User",
"password": "UserPassword",
"type": "Server"
}'
Response Schema
201 Created
Response Item | Data Type | Description |
---|---|---|
id |
string |
Credential ID assigned to the newly created credential set. This ID is unique 20 digit number. |
Response Samples
201 Created
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: xxx
{
"id": "12345678901234567890"
}
List Cloud Access Token URLs
List the URLs to request access tokens for Cloud Targets.
Request
GET
https://er-master:8339/v1/defaults/token_urls
Authorization
Request Samples
HTTP
GET /v1/defaults/token_urls
Accept: application/json
cURL
curl --request GET 'https://er-master:8339/v1/defaults/token_urls' \
--user apiuser:password123 \
--header "Accept: application/json"
Response Schema
200 OK
Response Item | Data Type | Description |
---|---|---|
type |
string |
Cloud Target type. |
url |
string |
URL to request the access token. |
Response Samples
200 OK
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: xxx
[
{
"type": "Box.Net Location",
"url": "<Box authentication URL>"
},
{
"type": "Dropbox Location",
"url": "<Dropbox authentication URL>"
},
{
"type": "OneDrive Location",
"url": "<OneDrive authentication URL>"
}
]