These docs are for v0.0.1. Click to read the latest docs for v1.0.62.

Accounts

Information about Account Administration in Avaya Experience Platform™.

Overview

Accounts API provides access to Account Management via a REST API interface. It enables secure sharing of a single Software deployment across multiple Customers.

Before You Begin

Refer to How to Authenticate with Avaya Experience Platform™ APIs required to invoke User APIs.
Accounts APIs requires Account Administrator role for access.

Get Account

An account is an entity with specific privileges to the software.

  • Unique Account ID - An account has a unique generated ID used across the entire solution.
  • Flexible Organization Structure
  • Account specific org structure.
  • Organization node levels and their names are determined by accounts.
  • Organization nodes don’t have a preconceived purpose. They provide visual cues to an administrator for easier administration of Users via Features and Roles.
  • Organization structures are fluid and change with reorganization of enterprises, mergers, change in line of business, etc.
  • Integration with Authorization Service
  • Each Account provides clear separation of Users, Identity Providers, Roles and Permissions, Password and Session Policies, etc.
  • Organization structure of an Account maps to a similar Group based structure at Authorization Service DB

To fetch a Account, user needs a Administrator privileges.

  • Provide basic account details like a unique id

To get a Account you should invoke Get Account. This API requires the Administrator role.

GET /accounts/{accountId}

/v1beta/accounts/AQWSDE

Path param:
accountId is a unique generated ID used across the entire solution

HTTP 200 Ok

{
  "name": "SyncG",
  "isDefault": false,
  "description": "Account for SyncG",
  "domains": [
    {
      "domainName": "avaya.com",
      "isDefault": true
    }
  ],
  "accountSize": 10,
  "accountId": "AQWSDE",
  "enabled": true,
  "countryCode": "IN"
}

Update Account

To update an existing Account you should invoke Update Account. This API requires either the Account Administrator role.

  • [Account Administrator]
    Account Administrator does not have access to either account features or feature data except for the features for which it has explicitly given the permissions.

  • Account Update API returns the response as Accepted.

PUT /accounts/{accountId}

/v1beta/accounts/AQWSDE

Request Body:

{
  "name": "SyncG",
  "isDefault": false,
  "description": "Account for SyncG",
  "domains": [
    {
      "domainName": "avaya.com",
      "isDefault": true
    }
  ],
  "accountSize": 10,
  "accountId": "AQWSDE",
  "enabled": true,
  "countryCode": "IN",
  "features": {
    "voice": {
      "cloudSwitchAccountDID": "cloudSwitchAccountDIDId",
      "cloudSwitchAccountUCID": "cloudSwitchAccountUCIDId",
      "voiceProvider": "UCCC",
      "deleteVoiceProviderData": true,
      "consult": true
    }
  },
  "profiles": [
    {
      "profileId": "AQXSWF",
      "url": "/api/admin/user/v1beta/accounts/AVSDER/profiles/ASEDFG"
    }
  ]
}

After the Account has been created you will receive the updated Account details in the response.

HTTP 202 Accepted

{
  "name": "SyncG",
  "isDefault": false,
  "description": "Account for SyncG",
  "domains": [
    {
      "domainName": "avaya.com",
      "isDefault": true
    }
  ],
  "accountSize": 10,
  "accountId": "AQWSDE",
  "enabled": true,
  "countryCode": "IN",
  "features": {
    "voice": {
      "cloudSwitchAccountDID": "cloudSwitchAccountDIDId",
      "cloudSwitchAccountUCID": "cloudSwitchAccountUCIDId",
      "voiceProvider": "UCCC",
      "deleteVoiceProviderData": true,
      "consult": true
    }
  },
  "profiles": [
    {
      "profileId": "AQXSWF",
      "url": "/api/admin/user/v1beta/accounts/AVSDER/profiles/ASEDFG"
    }
  ]
}

Status Changes

The status on the List Account Statuses for this Account would go through the following changes:

1. Update In-Progress

[
  {
    "action": "UPDATE",
    "status": "IN_PROGRESS",
    "message": "Operation is in progress",
    "accountId": "AQWSDE",
    "features": {
      "voice": {
        "action": "ADD",
        "status": "IN_PROGRESS",
        "message": "Operation is in progress"
      }
    }
  }
]

2. Update Completed

[
  {
    "action": "UPDATE",
    "status": "COMPLETED",
    "message": "Completed successfully",
    "accountId": "AQWSDE",
    "features": {
      "voice": {
        "action": "ADD",
        "status": "COMPLETED",
        "message": "Feature added successfully"
      }
    }
  }
]

In the event of a failure the status would appear similar to the below.

  • A client should re-attempt any failed features using the Update Account.

Update Failed

[
  {
    "action": "UPDATE",
    "status": "FAILED",
    "message": "Operation failed",
    "accountId": "AQWSDE",
    "features": {
      "voice": {
        "action": "ADD",
        "status": "FAILED",
        "message": "The feature could not be added"
      }
    }
  }
]

Create an Organization Node

Organization Node represents a node in the Account/Organization's hierarchy. Creating a new organization node at a position in the hierarchy is determined by the value of the 'path' field.

  • Provide basic Organization Node details like name, parentPath. Parent path is the fully qualified name of this node's parent node.
  • Provide the AccountId of the Account.
  • An Organization Node can be associated with one or more Profiles which are group of features, provided for easier management.

To create an organization node you should invoke Create Organization Node. This API requires the Account Administrator role.

  • Add Organization Node API returns the response as OK. The url field returned in the response shall be used to query the Organization Node.

POST /accounts/{accountId}/organization-nodes

/v1beta/accounts/AQWSDE/organization-nodes

Request Body:

{
  "name": "PuneLocation",
  "parentPath": "AccountA",
  "countryCode": "IN"
}

After the Organization Node is added, you will receive the response with created OrganizationNode data.

HTTP 202 ACCEPTED

{
  "name": "PuneLocation",
  "parentPath": "AccountA",
  "organizationNodeId": "ACDSFE",
  "url": "/api/admin/account/v1beta/accounts/accountA-id/organization-nodes/accountA-location1-id",
  "nodeType": "OrganizationNode",
  "countryCode": "IN"
}

Status Changes

The status on the List OrganizationNode Statuses for this Account would go through the following changes:

1. Add In-Progress

[
  {
    "action": "ADD",
    "status": "IN_PROGRESS",
    "message": "Operation is in progress",
    "organizationNodeId": "ACDSFE"
  }
]

2. Add Completed

[
  {
    "action": "ADD",
    "status": "COMPLETED",
    "message": "Completed successfully",
    "organizationNodeId": "ACDSFE"
  }
]

In the event of a failure the status would appear similar to the below.

Add Failed

[
  {
    "action": "ADD",
    "status": "FAILED",
    "message": "Operation failed",
    "organizationNodeId": "ACDSFE"
  }
]

Get an Organization Node

To get an organization node you should invoke Get Organization Node. This API requires the Account Administrator role.

GET /accounts/{accountId}/organization-nodes/{organizationNodeId}

/v1beta/accounts/AQWSDE/organization-nodes/ACDSFE

You will receive the response with OrganizationNode data.

HTTP 200 OK

{
	"name": "PuneLocation",
	"parentPath": "AccountSyncG",
	"organizationNodeId": "ACDSFE",
	"url": "/api/admin/account/v1beta/accounts/AQWSDE/organization-nodes/ACDSFE",
	"children": [],
	"profiles": [{
		"profileId": "N3ZW63",
		"url": "/api/admin/user/v1alpha/accounts/AQWSDE/profiles/N3ZW63",
		"name": "profileVoice"
	}],
	"accountId": "AQWSDE",
	"nodeType": "OrganizationNode"
}

Update an Organization Node

To update an organization node you should invoke Update Organization Node. This API requires the Account Administrator role.

  • Update Organization Node API returns the response as OK with the updated OrganizationNode data. The url field returned in the response shall be used to query the Organization Node.

PUT /accounts/accountId/organization-nodes/organizationNodeId

/v1beta/accounts/AQWSDE/organization-nodes/ACDSFE

Request Body:

{
	"name": "PuneLocation",
	"parentPath": "AccountSyncG",
	"organizationNodeId": "ACDSFE",
	"url": "/api/admin/account/v1beta/accounts/AQWSDE/organization-nodes/ACDSFE",
	"nodeType": "OrganizationNode",
	"countryCode": "IN",
	"profiles": [{
		"profileId": "N3ZW63",
		"name": "profileVoice"
	}]
}

After the Organization Node is updated, you will receive the response with updated OrganizationNode data.

HTTP 200 OK

{
	"name": "PuneLocation",
	"parentPath": "AccountSyncG",
	"organizationNodeId": "ACDSFE",
	"url": "/api/admin/account/v1beta/accounts/AQWSDE/organization-nodes/ACDSFE",
	"children": [],
	"profiles": [{
		"profileId": "N3ZW63",
		"url": "/api/admin/user/v1alpha/accounts/AQWSDE/profiles/N3ZW63",
		"name": "profileVoice"
	}],
	"accountId": "AQWSDE",
	"nodeType": "OrganizationNode"
}

What’s Next

Now try managing your users!