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.
...
This GET service will find a credential store with the given Id and return the JSON representation of the object.
Info | ||
---|---|---|
| ||
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 |
...
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.
Info | ||
---|---|---|
| ||
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 |
...
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v2/administration/security/credentialstorecredentialstore?credentialStoreName=credential&isActive=true
The GET request would return the the following JSON environment object
...
HTTP Code | Description |
---|---|
201 | Credential Store was created |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
Example with
...
Properties
If the POST request receives the following JSON credential store object,
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "description of credential store", "isActive": true, "credentialStoreProperties": [ { "credentialStorePropertyId": 13000, "credentialStorePropDefId": 12000, "credentialStoreId": 10000, "propertyValue": "*****", "isEncrypted": true }, { "credentialStorePropertyId": 13001, "credentialStorePropDefId": 12001, "credentialStoreId": 10000, "propertyValue": "property value", "isEncrypted": false }], "credentialStoreId": 10000, "credentialStoreDefId": 11001, "credentialStoreName": "credential store name" } |
Example without
...
Properties
If the POST request receives the following JSON credential store object,
...
This PUT service will update all attributes of a credential store with the given Id based on the attributes of a JSON object parameters. Attributes that are not provided will become their default valuesbe defaulted.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v2/administration/security/credentialstore/{Id} |
Request
Attributes | Type | Required | Description |
---|---|---|---|
Id | URL | Yes | The PUT will be performed on the credential store with the specified id that is found in the URL. |
credentialStoreName | String | Yes | The name of the credential store |
description | String | No | The description of the credential store |
isActive | Boolean | Yes |
Whether or not the credential store is active | |||
credentialStoreProperties | List<CredentialStoreProperty> | No | The list of credential store properties associated with the credential store |
credentialStoreDefId | Long | Yes | The id of the credential store provider associated with the credential store |
Include Page | ||||
---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "description of credential store changed", "isActive": true, "credentialStoreProperties": [ { "credentialStorePropertyId": 13000, "credentialStorePropDefId": 12000, "credentialStoreId": 10000, "propertyValue": "*****", "isEncrypted": true }, { "credentialStorePropertyId": 13001, "credentialStorePropDefId": 12001, "credentialStoreId": 10000, "propertyValue": "new property value", "isEncrypted": false }], "credentialStoreId": 10000, "credentialStoreDefId": 11001, "credentialStoreName": "credential store name changed" } |
PATCH
This PATCH service will update an existing credential store with the information passed through a JSON object. If an attribute of the JSON is null, it will not be updated in the credential store. Child rows that are included in a PATCH will be added, but existing rows will still remain.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v2/administration/security/credentialstore/{Id} |
...
Attributes | Type | Required | Description |
---|---|---|---|
Id | URL | Yes | The PUT will be performed on the credential store with the specified id that is found in the URL. |
credentialStoreName | String | No | The name of the credential store |
description | String | No | The description of the credential store |
isActive | Boolean | No | Weather Whether or not the credential store is active |
credentialStoreProperties | List<CredentialStoreProperty> | No | The list of credential store properties associated with the credential store |
credentialStoreDefId | Long | Yes | The id of the credential store provider associated with the credential store |
...
Response Codes
HTTP Code | Description |
---|---|
200 | Credential store was found and updated |
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 an credential store in our database with an Id of 10000 and had the following attributes
...
The PATCH request would then update the credential store with Id 10000 and return the the following JSON credential store object
...