Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Anchor
Top
Top

...

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.

...

AttributeTypeDescription
propertyNameStringKey name of the property
propertyValueStringValue of the property
credentialIdLongId of the credential associated with the property. Applicable only for encrypted properties

Back to Top

...

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
themeEclipse
titleAccount Instance GET Return JSON
{
        "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
}

Back to Top

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
titleAPI URLs

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
themeEclipse
titleAccount Instance GET Return JSON
[
    {
        "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
            }
        ]
    }
]

Back to Top

...

POST

This POST service will create a new account instance with the same attributes as the given JSON object.

...

AttributeRequiredTypeDescription
propertyNameYesStringKey name of the property
propertyValueYes*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

credentialIdYes*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
themeEclipse
titleEnvironment Post Return JSON
{
    "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
}

Back to Top

...

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.

...

AttributeRequiredTypeDescription
propertyNameYesStringKey name of the property
propertyValueYes*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

credentialIdYes*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
themeEclipse
titleAccount Instance PUT Return JSON
{
    "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
}

Back to Top

...

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
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/integrations/account/{accountType}/{Id}

...

AttributeRequiredTypeDescription
propertyNameYesStringKey name of the property
propertyValueYes*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

credentialIdYes*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
themeEclipse
titleAccount Instance PATCH Return JSON
{
    "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
}

Back to Top

...