API - Manage Asset
Purpose
A post API to create and modify an asset in Sectona.
Accessing the API
Endpoint: /API/APP/APP007/ManageAsset
HTTP METHOD
POST
Parameters
Parameters | Data Type | Required | Description |
---|---|---|---|
APIActionType | String | YES | Create |
AssetCategory | String | YES | OperatingSystem |
AssetType | String | YES | Asset type |
AssetVersion | String | OPTIONAL | Asset version is any if not given any data |
HostName | String | YES | Host name |
NewHostName | String | OPTIONAL | New Host Name |
IPAddress | String | YES | IP Address |
NewIPAddress | String | OPTIONAL | New IP Address |
DBInstance | String | OPTIONAL | Mandatory if asset category is database |
NewDBInstance | String | OPTIONAL | New DB instance |
PortNo | String | YES | PORT number |
Description | Number | OPTIONAL | Description |
Config1 | String | OPTIONAL | Additional parameters |
Config2 | String | OPTIONAL | Additional parameters |
Config3 | String | OPTIONAL | Additional parameters |
Config4 | String | OPTIONAL | Additional parameters |
Criticality Level | String | OPTIONAL | It should be from None, Low, Medium, High |
Owner | String | OPTIONAL | Owner of the asset |
Checkout Policy | String | OPTIONAL | Set to default if no data in parameter |
Rotation Policy | String | OPTIONAL | Set to default if no data in parameter |
Reconciliation Policy | String | OPTIONAL | Set to default if no data in parameter |
AssetJITPolicy | String | OPTIONAL | It is default if no data in parameter |
Exclude From Account Discovery | True/False | YES | Set to default if no data in parameter |
Tags | String | OPTIONAL | Specifies tags to identify user |
Instance | String | YES | Specifies to create an instance |
IsActive | True/False | YES | Specify user enable in Sectona. Default is enabled. |
Sample Request (JSON)
{
"APIActionType":"APIActionType",
"AssetCategory":"AssetCategory",
"AssetType":"AssetType",
"AssetVersion":"AssetVersion",
"HostName":"HostName",
"NewHostName":"NewHostName",
"IPAddress":"IPAddress",
"SecondaryIP":"SecondaryIP",
"NewIPAddress":"NewIPAddress",
"DBInstance":"DBInstance",
"NewDBInstance":"NewDBInstance",
"Description":"Description",
"PortNo":"PortNo",
"Config1":"Config1",
"Config2":"Config2",
"Config3":"Config3",
"Config4":"Config4",
"Location":"Location",
"CriticalityLevel":"CriticalityLevel",
"Owner":"Owner",
"Tags":"Tags",
"CheckoutPolicy":"CheckoutPolicy",
"RotationPolicy":"RotationPolicy",
"ReconciliationPolicy":"ReconciliationPolicy",
"AssetJITPolicy":"AssetJITPolicy",
"ExcludeFromAccountDiscovery":"ExcludeFromAccountDiscovery",
"Instance":"Instance",
"IsActive":"IsActive"
}
Sample Response (JSON)
{
"Version":"X.X.X.X",
"IsSuccess”: true,
"LogCode":"0",
"Message":"Asset XXXX / 0.0.0.0 created/Updated successfully",
"StatusCode":"OK",
"Timestamp":"22 Apr 2019 18:33:25 GMT 05:30:00"
}
Standard Error Response Codes
Error Code | Error Description |
---|---|
011649 | Current user do not have permission to take 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 |
032402 | The system was unable to create asset |
011658 | Invalid asset type |
011659 | Invalid asset version |
011660 | Invalid Location |
011661 | Invalid Tags |
011662 | Invalid password checkout policy |
011663 | Invalid password rotation policy |
011664 | Invalid password reconciliation policy |
011679 | Unable to get asset properties |
011684 | Invalid criticality Level |
011680 | Unable to perform action |
011842 | Unable to create asset |
011848 | Invalid password Asset JIT policy |