Anchor | ||||
---|---|---|---|---|
|
...
Account instances 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 account instances.
...
Attribute | Type | Description |
---|---|---|
propertyName | String | Key name of the property |
propertyValue | String | Value of the property |
credentialId | Long | Id of the credential associated with the property. Applicable only for encrypted properties |
...
GET
There are two implementations of GET. One will find an account instance with the given Id and return the JSON representation of the account instance. The other will find a list of account instances matching the parameters supplied to it.
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "name": "aws", "properties": [ { "propertyName": "FDAWSACCT_ACCESS_KEY", "propertyValue": "AKIAYMDHK5KKYHRC47US", "credentialId": null }, { "propertyName": "FDAWSACCT_SECRET_KEY", "propertyValue": "*****", "credentialId": 11501 } ], "provider": "AWS", "description": "Example account", "instanceId": 11101, "code": "AWS", "isActive": true } |
GET (Using Query Parameters)
This GET service will return a list of account instances in the form of JSON objects based on the query parameters code, name, and provider. account instances 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 account instances.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/topology/integrations/account/{accountType}? Append the following character sequences to the above URL to specify Query parameters.Use '&' between successive query parameters:instanceCode={instanceCode} instanceName={instanceName} provider={provider} Examples:To search by code only:http://host:port/flexdeploy/rest/v1/topology/integrations/account/{accountType}?instanceCode={instanceCode} To search by provider only:http://host:port/flexdeploy/rest/v1/topology/integrations/account/{accountType}?provider={provider} To search by code and name:http://host:port/flexdeploy/rest/v1/topology/integrations/account/{accountType}?instanceCode={instanceCode}&instanceName={instanceName} |
...
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "name": "AWS New", "properties": [ { "propertyName": "FDAWSACCT_ACCESS_KEY", "propertyValue": "AKIAYMDHK5KKYH5RC7US", "credentialId": null }, { "propertyName": "FDAWSACCT_SECRET_KEY", "propertyValue": "*****", "credentialId": 11501 } ], "provider": "AWS", "description": "1st cloud account", "instanceId": 20701, "code": "AWSNEW", "isActive": true }, { "instanceId": 20809, "code": "AWSOLD", "name": "awsOld", "provider": "AWS", "description": "Former AWS account", "isActive": false, "properties": [ { "propertyName": "FDAWSACCT_ACCESS_KEY", "propertyValue": "AR3OTNMDPY5KKYHC47US", "credentialId": null }, { "propertyName": "FDAWSACCT_SECRET_KEY", "propertyValue": "*****", "credentialId": 11496 } ] } ] |
...
POST
This POST service will create a new account instance with the same attributes as the given JSON object.
...
Attribute | Required | Type | Description |
---|---|---|---|
propertyName | Yes | String | Key name of the property |
propertyValue | Yes* | String | Value of the property. Providing the property value for credentials in the local store will update the value, but is not allowed for any other credential store providers. *Either propertyValue or credentialId is required for encrypted properties |
credentialId | Yes* | Long | Id of the credential associated with the property. Applicable only for encrypted properties *Either propertyValue or credentialId is required for encrypted properties |
Example
If the POST request receives the following JSON account instance object at this URL: http://host:port/flexdeploy/rest/v1/topology/integrations/account/cloud
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "instanceId": 74852, "provider": "AWS", "name": "AWS Account", "properties": [ { "propertyName": "FDAWSACCT_ACCESS_KEY", "propertyValue": "AKIAYMDHK5KKYHRC47US", "credentialId": null }, { "propertyName": "FDAWSACCT_SECRET_KEY", "propertyValue": "*****", "credentialId": 46482 } ], "description": "Adding description with POST", "code": "AWSACCT", "isActive": true } |
...
PUT
This PUT service will update all attributes of an account instance with the given Id based on the attributes of a JSON object parameters.
...
Attribute | Required | Type | Description |
---|---|---|---|
propertyName | Yes | String | Key name of the property |
propertyValue | Yes* | String | Value of the property. Providing the property value for credentials in the local store will update the value, but is not allowed for any other credential store providers. *Either propertyValue or credentialId is required for encrypted properties |
credentialId | Yes* | Long | Id of the credential associated with the property. Applicable only for encrypted properties *Either propertyValue or credentialId is required for encrypted properties |
Info |
---|
Account provider cannot be modified for a PUT request. |
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "instanceId": 74852, "name": "AWS Account former", "properties": [ { "propertyName": "FDAWSACCT_ACCESS_KEY", "propertyValue": "AKIAYMDHK5KKYHRC47US", "credentialId": null }, { "propertyName": "FDAWSACCT_SECRET_KEY", "propertyValue": "*****", "credentialId": 46482 } ], "description": "", "code": "AWSACCTFORMER", "isActive": false } |
...
PATCH
This PATCH service will update an existing account instance with the information passed through a JSON object. If an attribute of the JSON is null, it will not be updated in the account instance.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/topology/integrations/account/{accountType}/{Id} |
...
Attribute | Required | Type | Description |
---|---|---|---|
propertyName | Yes | String | Key name of the property |
propertyValue | Yes* | String | Value of the property. Providing the property value for credentials in the local store will update the value, but is not allowed for any other credential store providers. *Either propertyValue or credentialId is required for encrypted properties |
credentialId | Yes* | Long | Id of the credential associated with the property. Applicable only for encrypted properties *Either propertyValue or credentialId is required for encrypted properties |
Info |
---|
Account provider cannot be modified for a PUT request. |
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "instanceId": 74852, "provider": "AWS", "name": "AWS Account", "properties": [ { "propertyName": "FDAWSACCT_ACCESS_KEY", "propertyValue": "HTI8REL9GHDITE3QKDP5V", "credentialId": null }, { "propertyName": "FDAWSACCT_SECRET_KEY", "propertyValue": "*****", "credentialId": 46482 } ], "description": "Adding a description with PATCH", "code": "AWSACCT", "isActive": true } |
...