NAV Navigation
Shell

Alvaria Cloud REST API Developer's Guide v3.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Overview

The Alvaria™ Cloud REST APIs enable developers to create applications that interact with the Via platform to manage Alvaria™ Cloud resources. Specifically, the following categories of interactions are available:

The version numbers in the titles of the above API documents indicate the individual endpoint versions contained within. For example, "Aspect Via Streaming Client REST API v2.0/3.0" means that the Streaming API has both v2 and v3 endpoints. If, in the future, the v2 endpoints were retired, the document would be renamed "Aspect Via Streaming Client REST API v3.0"

Interaction Model

In accordance with RESTful API design, applications can manage Alvaria™ Cloud resources using standard HTTP requests. These applications can be written in the developer's language and framework of choice. All calls to the Alvaria™ Cloud REST API resource endpoints use the following URL pattern:

  https://{orgId}.via.aspect-cloud.net/via/{version}/organizations/{orgId}/{category}

Security

Before accessing the Alvaria™ Cloud REST API endpoints, the application must be registered with Alvaria.
This registration results in the generation of an application specific client id and secret, which Alvaria provides you to use for authentication before making any requests to endpoints.
At registration time, the application will be assigned one or more scopes depending on which endpoints the application is allowed to access. Alvaria™ Cloud supports the following scopes:

Prior to making calls to the Alvaria™ Cloud REST APIs, the application must authenticate.

For more information on the Authorization and Authentication, see:

Mandatory HTTP Headers

Every request to an Alvaria™ Cloud API endpoint must contain the following headers:

The following provides an example of an API call using the required HTTP parameters:

  curl -X "GET" https://{orgId}.via.aspect-cloud.net/via/v2/organizations/{orgId}/provisioning/workTypes \
    -H "Authorization: Bearer 719eafef-2525-4483-aad7-9832cad03dc7" \
    -H "x-api-key: 83446BD38A3CEA449F33414E7BFBDF8E5E3C80A93C8ABDF7E24CBCA2FC6E22D1" 

Rate Limiting

Alvaria™ Cloud applies limits to the number of API calls a client can make on an endpoint within a specific time duration (e.g. seconds, minutes, etc.). Rate limits are a common practice to guarantee an equal level of service for all consumers of API endpoints. Rate limits are set for each category of endpoints. The value supplied in the required x-api-key header is used to keep track of how many requests a client has made on a specific endpoint. If the rate limits are exceeded the HTTP response code 429 Too Many Requests will be returned to the client. Rate limit headers are added to all API responses to enable clients to understand and control how often API requests can be initiated.

Date/Time Fields

All date/time properties in the Alvaria™ Cloud API use the ISO 8601 standard. All date/time values are presented in a normalized manner using the UTC time zone. Therefore, there are no time zone designators. (Example: 1985-04-12T23:20:50.525Z).

Pagination

Within an organization, certain resources may have hundreds of managed instances (for example, users). To reduce network traffic and maximize API response performance, the system limits the number of results from GET operations. When a result set from a GET operation exceeds this limit, subsequent requests must be made to retrieve the entire result set. The Alvaria™ Cloud APIs provide the following query parameters to manage this pagination process:

The system will return the following response property to enable an application to navigate through multiple potential results from a single query:

Example Usage

The example scenario retrieves information on all the workTypes in the system where the system contains 50 workType instances.

Description Request Result
Initial request with no response limit /provisioning/workTypes totalItems=50, response contains 50 workType items
Initial request with response limit /provisioning/workTypes?maxResults=5 totalItems=50, response contains 5 workType items
Request next set of results with response limit /provisioning/workTypes?maxResults=5,startIndex=5 totalItems=50, response contains 5 workType items

Record Locking and Collision Resolution

The Alvaria™ Cloud APIs use an optimistic locking model in which every client/application instance assumes that it owns the record instance when making changes to an entity. To resolve collisions, the version property must contain the value returned from the GET call for the entity to change. If while processing a PATCH or PUT request, the version value included in the JSON sent does not match the version value in the record, a collision between two clients is assumed. The request returns the HTTP response code 409 Conflict and the client with the failed operation is required to reissue a GET call to pull a new copy of the entity from the system before attempting to update the record again.

Locating Alvaria™ Cloud OpenAPI Files

The Alvaria™ Cloud APIs are defined using version 2.0 of the OpenAPI specification. OpenAPI provides a language agnostic method for defining REST API endpoints. The Alvaria™ Cloud API contracts are defined in files listed below:

Client Code Generation

Many tools exist for auto generating client code from OpenAPI defined APIs, including the open source Swagger tool, CodeGen. Before generating code from the Alvaria™ Cloud swagger files, execute the following actions:

Troubleshooting

This section contains guidance on diagnosing issues related to various types of errors that may be returned from an Alvaria™ Cloud API call.

401 Errors

An API call will return an HTTP status of 401 for the following reasons:

Deprecations

Active Deprecations

The following table lists endpoints that are currently deprecated and the date by which consumers need to be moved to the replacement endpoint:

REST Api Deprecated Endpoint Retirement Date Replaced With New Release Date
Streaming POST /via/v2/organizations/{orgId}/streaming/session 09/30/2024 POST /via/v3/organizations/{orgId}/streaming/session 02/25/2023
Streaming DELETE /via/v2/organizations/{orgId}/streaming/session 09/30/2024 DELETE /via/v3/organizations/{orgId}/streaming/session 02/25/2023
Streaming GET /via/v2/organizations/{orgId}/streaming/events 09/30/2024 GET /via/v3/organizations/{orgId}/streaming/events 02/25/2023
Compliance POST /via/v3/organizations/{orgId}/compliance/attemptTrackers 12/31/2025 POST /via/v4/organizations/{orgId}/compliance/attemptTrackers 10/02/2021
Compliance GET /via/v3/organizations/{orgId}/compliance/attemptTrackers 12/31/2025 GET /via/v4/organizations/{orgId}/compliance/attemptTrackers 10/02/2021
Compliance GET /via/v3/organizations/{orgId}/compliance/attemptTrackers/{attemptTrackerId} 12/31/2025 GET /via/v4/organizations/{orgId}/compliance/attemptTrackers/{attemptTrackerId} 10/02/2021
Compliance PUT /via/v3/organizations/{orgId}/compliance/attemptTrackers/{attemptTrackerId} 12/31/2025 PUT /via/v4/organizations/{orgId}/compliance/attemptTrackers/{attemptTrackerId} 10/02/2021
Compliance DELETE /via/v3/organizations/{orgId}/compliance/attemptTrackers/{attemptTrackerId} 12/31/2025 DELETE /via/v4/organizations/{orgId}/compliance/attemptTrackers/{attemptTrackerId} 10/02/2021
Compliance POST /via/v3/organizations/{orgId}/compliance/convenientContactTimes 12/31/2025 POST /via/v4/organizations/{orgId}/compliance/convenientContactTimes 10/02/2021
Compliance GET /via/v3/organizations/{orgId}/compliance/convenientContactTimes 12/31/2025 GET /via/v4/organizations/{orgId}/compliance/convenientContactTimes 10/02/2021
Compliance GET /via/v3/organizations/{orgId}/compliance/convenientContactTimes/{convenientContactTimeId} 12/31/2025 GET /via/v4/organizations/{orgId}/compliance/convenientContactTimes/{convenientContactTimeId} 10/02/2021
Compliance PUT /via/v3/organizations/{orgId}/compliance/convenientContactTimes/{convenientContactTimeId} 12/31/2025 PUT /via/v4/organizations/{orgId}/compliance/convenientContactTimes/{convenientContactTimeId} 10/02/2021
Compliance DELETE /via/v3/organizations/{orgId}/compliance/convenientContactTimes/{convenientContactTimeId} 12/31/2025 DELETE /via/v4/organizations/{orgId}/compliance/convenientContactTimes/{convenientContactTimeId} 10/02/2021
Compliance POST /via/v3/organizations/{orgId}/compliance/messageTrackers 12/31/2025 POST /via/v4/organizations/{orgId}/compliance/messageTrackers 10/02/2021
Compliance GET /via/v3/organizations/{orgId}/compliance/messageTrackers 12/31/2025 GET /via/v4/organizations/{orgId}/compliance/messageTrackers 10/02/2021
Compliance GET /via/v3/organizations/{orgId}/compliance/messageTrackers/{messageTrackerId} 12/31/2025 GET /via/v4/organizations/{orgId}/compliance/messageTrackers/{messageTrackerId} 10/02/2021
Compliance PUT /via/v3/organizations/{orgId}/compliance/messageTrackers/{messageTrackerId} 12/31/2025 PUT /via/v4/organizations/{orgId}/compliance/messageTrackers/{messageTrackerId} 10/02/2021
Compliance DELETE /via/v3/organizations/{orgId}/compliance/messageTrackers/{messageTrackerId} 12/31/2025 DELETE /via/v4/organizations/{orgId}/compliance/messageTrackers/{messageTrackerId} 10/02/2021
Compliance POST /via/v3/organizations/{orgId}/compliance/contactAttempts 12/31/2025 POST /via/v4/organizations/{orgId}/compliance/contactAttempts 10/02/2021
Compliance GET /via/v3/organizations/{orgId}/compliance/contactAttempts 12/31/2025 GET /via/v4/organizations/{orgId}/compliance/contactAttempts 10/02/2021
Compliance GET /via/v3/organizations/{orgId}/compliance/complianceStatuses 12/31/2025 POST /via/v4/organizations/{orgId}/compliance/complianceStatuses 09/17/2024

Deprecation History

Changelog

May 2025

Additions

October 2024

Additions

August 2024

Additions

May 2024

Additions

March 2024

Additions

February 2024

Additions

November 2023

Additions

August 2023

Additions

April 2023

Additions

February 2023

Additions

Deprecations

October 2022

Additions

September 2022

Additions

July 2022

Additions

May 2022

Additions

March 2022

Additions

January 2022

Additions

October 2021

Additions

September 2021

Additions

May 2021

Additions

March 2021

Additions

October 2020

Additions

Base URLs:

License: Creative Commons Attribution 4.0 International Public License