AWS Integration API.
Created Nov 12, 2024 at 10:01 PM

Overview

Resources

Sync: Sync All AWS Accounts

Sync All AWS Accounts.

POST https://{device}/api/npm.aws_config/1.0/sync
Authorization

This request requires authorization.

Request Body

Do not provide a request body.

Response Body

On success, the server does not provide any body in the responses.

Sync: Enable/Disable All AWS Accounts

Enable/Disable All AWS Accounts.

PUT https://{device}/api/npm.aws_config/1.0/sync/status
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
{
  "status": string
}

Example:
{
  "status": "ENABLED"
}
Property Name Type Description Notes
SyncStatus <object> Object containing information to enable or disable the accounts.
SyncStatus.status <string> Value to enable or disable the accounts. Values: ENABLED, DISABLED
Response Body

On success, the server does not provide any body in the responses.

Auth_Codes: Get the authorization information of the AWS Accounts

Delete AWS Accounts.

GET https://{device}/api/npm.aws_config/1.0/auth_codes
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
[
  {
    "access_key": string,
    "acc_id": string
  }
]

Example:
[
  {
    "access_key": "access_key1", 
    "acc_id": "aws1"
  }, 
  {
    "access_key": "access_key2", 
    "acc_id": "aws2"
  }
]
Property Name Type Description Notes
Authcodes <array of <object>> List of Auth code Objects.
Authcodes[Authcode] <object> Object representing an account name/ID and it's access key. Optional
Authcodes[Authcode].access_key <string> Account access key.
Authcodes[Authcode].acc_id <string> Acount name/ID.

Auth_Codes: Create/Update AWS Accounts

Delete AWS Accounts.

PUT https://{device}/api/npm.aws_config/1.0/auth_codes
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
[
  {
    "access_key": string,
    "acc_id": string,
    "secret_key": string
  }
]

Example:
[
  {
    "access_key": "access_key1", 
    "secret_key": "secret_key1", 
    "acc_id": "acc_1"
  }, 
  {
    "access_key": "access_key2", 
    "secret_key": "secret_key2", 
    "acc_id": "acc_2"
  }
]
Property Name Type Description Notes
Authcodesupd <array of <object>> List of Auth code Objects.
Authcodesupd[Authcodeupd] <object> Object representing an account name/ID, it's access key and secret key. Optional
Authcodesupd[Authcodeupd].access_key <string> Account access key.
Authcodesupd[Authcodeupd].acc_id <string> Acount name/ID.
Authcodesupd[Authcodeupd].secret_key <string> Account secret key.
Response Body

On success, the server does not provide any body in the responses.

Auth_Codes: Delete AWS Accounts

Delete AWS Accounts.

DELETE https://{device}/api/npm.aws_config/1.0/auth_codes
Authorization

This request requires authorization.

Request Body

Provide a request body with the following structure:

  • JSON
[
  {
    "acc_id": string
  }
]

Example:
[
  {
    "acc_id": "acc_1"
  }, 
  {
    "acc_id": "acc_2"
  }
]
Property Name Type Description Notes
Accids <array of <object>> List of Accid Objects.
Accids[Accid] <object> Object representing and account name/ID. Optional
Accids[Accid].acc_id <string> Account name/ID.
Response Body

On success, the server does not provide any body in the responses.

Status: AWS status

Get AWS Status.

GET https://{device}/api/npm.aws_config/1.0/status
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
{
  "enabled": string,
  "error_text": string,
  "last_sync_ts": number,
  "last_success_ts": number,
  "error_id": number,
  "state": string
}

Example:
{
  "last_sync_ts": 1606234492, 
  "enabled": true, 
  "last_success_ts": 1606234492, 
  "state": "SYNC_SUCCEEDED", 
  "error_id": 0, 
  "error_text": "OK"
}
Property Name Type Description Notes
CloudStatus <object> Object containing synchronization information.
CloudStatus.enabled <string> Flag indicating if synchronization is enabled.
CloudStatus.error_text <string> Error description.
CloudStatus.last_sync_ts <number> Last attempted synchronization time.
CloudStatus.last_success_ts <number> Last successful synchronization time.
CloudStatus.error_id <number> Error ID.
CloudStatus.state <string> Synchronization status. Values: SYNC_INITIALIZING, SYNC_FAILED, SYNC_SUCCEEDED, SYNC_SUCCEEDED_WITH_WARNING, SYNC_DISABLED, SYNC_NA

Error Codes

In the event that an error occurs while processing a request, the server will respond with appropriate HTTP status code and additional information in the response body:

{
     "error_id":   "{error identifier}",
     "error_text": "{error description}",
     "error_info": {error specific data structure, optional}
}

The table below lists the possible errors and the associated HTTP status codes that may returned.

Error ID HTTP Status Comments
INTERNAL_ERROR 500 Internal server error.
AUTH_REQUIRED 401 The requested resource requires authentication.
AUTH_INVALID_CREDENTIALS 401 Invalid username and/or password.
AUTH_INVALID_SESSION 401 Session ID is invalid.
AUTH_EXPIRED_PASSWORD 403 The password must be changed. Access only to password change resources.
AUTH_DISABLED_ACCOUNT 403 Account is either temporarily or permanently disabled.
AUTH_FORBIDDEN 403 User is not authorized to access the requested resource.
AUTH_INVALID_TOKEN 401 OAuth access token is invalid.
AUTH_EXPIRED_TOKEN 401 OAuth access token is expired.
AUTH_INVALID_CODE 401 OAuth access code is invalid.
AUTH_EXPIRED_CODE 401 OAuth access code is expired.
RESOURCE_NOT_FOUND 404 Requested resource was not found.
HTTP_INVALID_METHOD 405 Requested method is not available for this resource.
HTTP_INVALID_HEADER 400 An HTTP header was malformed.
REQUEST_INVALID_INPUT 400 Malformed input structure.
URI_INVALID_PARAMETER 400 URI parameter is not supported or malformed.
URI_MISSING_PARAMETER 400 Missing required parameter.