API - Manage Account

Purpose

A post API to create and modify an account as well as update password of an account in Sectona.

Accessing the API

XML
Endpoint: /API/APP/APP007/ManageAccount


HTTP METHOD

XML
POST


Parameters

Parameters

Data Type

Required

Description

APIActionType

String

Yes

Create OR Modify OR UpdatePassword

AssetType

String

Yes

Asset type

AssetHost

String

Yes

Asset host

AccountName

String

Yes

Account Name

DBInstance

String

No

Database instance name

AccountType

String

No

Local, AD Account (Default is Local if not provided)

AuthenticationType

String

No

Account authentication type (Default is Password if not provided)

DirectoryServerDomain

String

No

Required if AD Account

DirectoryServerType

String

No

Required if AD Account

DirectoryServerIP

String

No

Required if AD Account

ExcludeFromADSync

Boolean

No

Exclude from AD sync

Password

String

No

Account password (Required if APIActionType is Create or UpdatePassword)

PassPhrase

String

No

secret key if key base + secret key Pashphrase if key based and blank if type is password

Owner

String

No

Owner of an account

AccountCategory

String

No

Interactive Account, Service Account (Default is Interactive Account if not provided)

EnforcePasswordChange

Boolean

No

Apply password change policy (Default is Yes if not provided)

Tags

String

No

Tags to be assigned to account (multiple tags can be provided by comma separated)

ConsoleAccount

String

No

Console account

Config1

String

No

Value of config1

Config2

String

No

Value of config2

Config3

String

No

Value of config3

Config4

String

No

Value of config4

IsInheritCheckoutPolicyFromAsset

Boolean

No

Inherit checkout policy from asset (Default is true if not provided)

CheckoutPolicy

String

No

Checkout policy name

IsInheritRotationPolicyFromAsset

Boolean

No

Inherit rotation policy from asset (Default is true if not provided)

RotationPolicy

String

No

Rotation policy name

IsInheritReconciliationPolicyFromAsset

Boolean

No

Inherit reconciliation policy from asset (Default is true if not provided)

ReconciliationPolicy

String

No

Reconciliation policy name

NewAccountName

String

No

New account name if wanted to update

Instance

String

Yes

Instance name

IsActive

Boolean

No

Status of account (Default status is true when APIActionType is Create. Considered for modification when APIActionType is Modify and parameter is provided)

Sample Request (JSON)

XML
{
    "APIActionType": " Create/Modify/UpdatePassword ",
	"AssetType":"Unix Based",
	"AssetHost":"XXXXX",
	"DBInstance":"",
	"AccountName":" XXXXX _",
    "NewAccountName":" XXXXX _",
	"AuthenticationType":"Password",
	"AccountType":"Local",
	"Password":" XXXXX ",
	"PassPhrase":"",
	"Owner":" XXXXX ",
	"AccountCategory":"Interactive Account",
	"OnlyConsoleAccess":false,
	"EnforcePasswordChange":false,
	"Tags":"",
	"Instance":"Default",
	"IsActive":true
}


Sample Response (JSON)

XML
{
	“Version”:”6.0.0.0”,
	"IsSuccess":true,
	"LogCode":"0",
	"Message":"Account 0.0.0.0@XX Created/updated successfully",
	"StatusCode":"OK",
	"Timestamp":"22 Apr 2019 18:34:53 GMT 05:30:00"
}


Standard Error Response Codes

Error Code

Error Description

011649

Current users do not have permission to take an action

011651

The authorization header is either empty or not basic

011673

Invalid credentials

011674

Invalid credentials

011675

Unable to validate request

011683

Invalid instance name

011803

Unable to insert API log details

032403

The system was unable to create account

032420

Requested asset is not valid

011681

Unable to get account properties

011682

Unable to perform action

011853

Requested asset is not valid

011661

Invalid tags