Credential Store API v2
Credential stores can be accessed and modified through this API using four services: GET, POST, PUT, and PATCH. These four services allow for the retrieval, creation, complete update, and partial update of credential stores.
Authentication - Use Basic Authentication for this API.
GET
There are two implementations of GET. One will find a credential store with the given Id and return the JSON representation of the credential store. The other will find a list of credential stores matching the parameters supplied to it.
GET by ID
This GET service will find a credential store with the given Id and return the JSON representation of the object.
API URL
http://host:port/flexdeploy/rest/v2/administration/security/credentialstore/{Id}
Request
Parameter | Type | Required | Description |
|---|---|---|---|
Id | URL | Yes | This is a URL parameter for the Id which is used to find and return a credential store |
Response
| Attributes | Type | Description |
|---|---|---|
| credentialStoreId | Long | The id of the credential store |
| credentialStoreDefId | Long | The id of the connected credential store provider |
| credentialStoreName | String | The name of the credential store |
| description | String | The description of the credential store |
| isActive | Boolean | Whether or not the credential store is active |
| credentialStoreProperties | List<CredentialStoreProperty> | The list of credential store properties associated with the credential store |
Each credentialStoreProperty in the list of credentialStoreProperties contains these attributes.
| Attributes | Type | Description |
|---|---|---|
| credentialStorePropertyId | Long | This is the unique Id of the credential store property |
| credentialStorePropDefId | Long | This is a foreign key to the parent credential store property definition |
| credentialStoreId | Long | This is a foreign key to the parent credential store |
| propertyValue | String | The value of the credential store property |
| isEncrypted | Boolean | Whether or not the credential store property is encrypted |
Response Codes
HTTP Code | Description |
|---|---|
200 | Credential store was found and returned |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Credential store not found |
500 | Unexpected internal server error |
Example
If we had a credential store in our database with an Id of 10000 and had the following attributes
Credential Store Provider - 10000
{
"description": "description of credential store",
"isActive": true,
"credentialStoreProperties": [],
"credentialStoreId": 10000,
"credentialStoreDefId": 11000,
"credentialStoreName": "credential store name",
"updatedBy": "fdadmin",
"createdOn": "2021-09-01T17:23:18.288+0000",
"updatedOn": "2021-09-01T17:23:18.288+0000",
"versionNumber": 1,
"createdBy": "fdadmin"
}When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v2/administration/security/credentialstore/10000
The GET request would return the following JSON credential store object
Credential Store Provider - 10000
{
"description": "description of credential store",
"isActive": true,
"credentialStoreProperties": [],
"credentialStoreId": 10000,
"credentialStoreDefId": 11000,
"credentialStoreName": "credential store name",
"updatedBy": "fdadmin",
"createdOn": "2021-09-01T17:23:18.288+0000",
"updatedOn": "2021-09-01T17:23:18.288+0000",
"versionNumber": 1,
"createdBy": "fdadmin"
}GET (Using Query Parameters)
This GET service will return a list of credential stores in the form of JSON objects based on the query parameters id, name, implementation class, is active, and is custom. Credential stores are only returned if they match all of the specified query parameters. If no query parameters are given, this request will return the entire list of credential stores.
API URLs
http://host:port/flexdeploy/rest/v2/administration/security/credentialstore?
Append the following character sequences to the above URL to specify Query parameters.
Use '&' between successive query parameters:
credentialStoreId={id}
credentialStoreName={name}
isActive={boolean}
credentialStoreDefId={id}
Examples:
To search by name only:
http://host:port/flexdeploy/rest/v2/administration/security/credentialstore?credentialStoreName=Name
To search by NAME IS ACTIVE:
http://host:port/flexdeploy/rest/v2/administration/security/credentialstore?credentialStoreName=Name&isActive=true
Request
Attributes | Type | Required | Description |
|---|---|---|---|
credentialStoreId | Query - Long | No | Equals search |
credentialStoreName | Query - String | No | Contains ignore case search |
isActive | Query - Boolean | No | Equals search |
credentialStoreDefId | Query - Long | No | Equals search |
Response
| Attributes | Type | Description |
|---|---|---|
| credentialStoreId | Long | The id of the credential store |
| credentialStoreDefId | Long | The id of the connected credential store provider |
| credentialStoreName | String | The name of the credential store |
| description | String | The description of the credential store |
| isActive | Boolean | Whether or not the credential store is active |
| credentialStoreProperties | List<CredentialStoreProperty> | The list of credential store properties associated with the credential store |
Each credentialStoreProperty in the list of credentialStoreProperties contains these attributes.
| Attributes | Type | Description |
|---|---|---|
| credentialStorePropertyId | Long | This is the unique Id of the credential store property |
| credentialStorePropDefId | Long | This is a foreign key to the parent credential store property definition |
| credentialStoreId | Long | This is a foreign key to the parent credential store |
| propertyValue | String | The value of the credential store property |
| isEncrypted | Boolean | Whether or not the credential store property is encrypted |
Response Codes
HTTP Code | Description |
|---|---|
200 | Search successful and results returned |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
- style