apimatic-verizon-sdk
v1.0.0
Published
APIMatic SDK for Verizon API
Maintainers
Readme
Getting Started with Verizon
Introduction
The Verizon Edge Discovery Service API can direct your application clients to connect to the optimal service endpoints for your Multi-access Edge Computing (MEC) applications for every session. The Edge Discovery Service takes into account the current location of a device, its IP anchor location, current network traffic and other factors to determine which 5G Edge platform a device should connect to.
Verizon Terms of Service: https://www.verizon.com/business/5g-edge-portal/legal.html
Install the Package
Run the following command from your project directory to install the package from npm:
npm install [email protected]For additional package details, see the Npm page for the [email protected] npm.
Initialize the API Client
Note: Documentation for the client can be found here.
The following parameters are configurable for the API Client:
| Parameter | Type | Description |
| --- | --- | --- |
| environment | Environment | The API environment. Default: Environment.Production |
| timeout | number | Timeout for API calls.Default: 30000 |
| httpClientOptions | Partial<HttpClientOptions> | Stable configurable http client options. |
| unstableHttpClientOptions | any | Unstable configurable http client options. |
| logging | PartialLoggingOptions | Logging Configuration to enable logging |
| thingspaceOauthCredentials | ThingspaceOauthCredentials | The credential object for thingspaceOauth |
| vzM2MTokenCredentials | VzM2MTokenCredentials | The credential object for vzM2MToken |
| sessionTokenCredentials | SessionTokenCredentials | The credential object for sessionToken |
| thingspaceOauth1Credentials | ThingspaceOauth1Credentials | The credential object for thingspaceOauth1 |
The API client can be initialized as follows:
Code-Based Client Initialization
import {
Client,
Environment,
LogLevel,
OauthScopeThingspaceOauth,
} from 'apimatic-verizon-sdk';
const client = new Client({
thingspaceOauthCredentials: {
oauthClientId: 'OAuthClientId',
oauthClientSecret: 'OAuthClientSecret',
oauthScopes: [
OauthScopeThingspaceOauth.Discoveryread,
OauthScopeThingspaceOauth.Serviceprofileread
]
},
vzM2MTokenCredentials: {
'VZ-M2M-Token': 'VZ-M2M-Token'
},
sessionTokenCredentials: {
'SessionToken': 'SessionToken'
},
thingspaceOauth1Credentials: {
oauthClientId: 'OAuthClientId',
oauthClientSecret: 'OAuthClientSecret'
},
timeout: 30000,
environment: Environment.Production,
logging: {
logLevel: LogLevel.Info,
logRequest: {
logBody: true
},
logResponse: {
logHeaders: true
}
},
});Configuration-Based Client Initialization
import * as path from 'path';
import * as fs from 'fs';
import { Client } from 'apimatic-verizon-sdk';
// Provide absolute path for the configuration file
const absolutePath = path.resolve('./config.json');
// Read the configuration file content
const fileContent = fs.readFileSync(absolutePath, 'utf-8');
// Initialize client from JSON configuration content
const client = Client.fromJsonConfig(fileContent);See the Configuration-Based Client Initialization section for details.
Environment-Based Client Initialization
import * as dotenv from 'dotenv';
import * as path from 'path';
import * as fs from 'fs';
import { Client } from 'apimatic-verizon-sdk';
// Optional - Provide absolute path for the .env file
const absolutePath = path.resolve('./.env');
if (fs.existsSync(absolutePath)) {
// Load environment variables from .env file
dotenv.config({ path: absolutePath, override: true });
}
// Initialize client using environment variables
const client = Client.fromEnvironment(process.env);See the Environment-Based Client Initialization section for details.
Environments
The SDK can be configured to use a different environment for making API calls. Available environments are:
Fields
| Name | Description | | --- | --- | | Production | Default | | Staging | - | | Dev | - | | Qa | - | | MockServerForLimitedAvailabilitySeeQuickStart | - |
Authorization
This API uses the following authentication schemes.
thingspace_oauth (OAuth 2 Client Credentials Grant)VZ-M2M-Token (Custom Header Signature)SessionToken (Custom Header Signature)thingspace_oauth1 (OAuth 2 Client Credentials Grant)
List of APIs
- 5G Edge Platforms
- Service Endpoints
- Service Profiles
- Device Management
- Device Groups
- Session Management
- Connectivity Callbacks
- Account Requests
- Service Plans
- Device Diagnostics
- Device Monitoring
- Device Profile Management
- E UICC Device Profile Management
- Devices Locations
- Devices Location Subscriptions
- Device Location Callbacks
- Usage Trigger Management
- Software Management Subscriptions V1
- Software Management Licenses V1
- Firmware V1
- Software Management Callbacks V1
- Software Management Reports V1
- Software Management Subscriptions V2
- Software Management Licenses V2
- Campaigns V2
- Software Management Callbacks V2
- Software Management Reports V2
- Client Logging
- Server Logging
- Configuration Files
- Software Management Subscriptions V3
- Software Management Licenses V3
- Campaigns V3
- Software Management Reports V3
- Firmware V3
- Account Devices
- Software Management Callbacks V3
- SIM Securefor Io T Licenses
- Account Subscriptions
- Performance Metrics
- Diagnostics Subscriptions
- Diagnostics Observations
- Diagnostics History
- Diagnostics Settings
- Diagnostics Callbacks
- Diagnostics Factory Reset
- Cloud Connector Subscriptions
- Cloud Connector Devices
- HPL Device Management
- Device Service Management
- Device Reports
- Hyper Precise Location Callbacks
- Device Credential Management
- Anomaly Settings
- Anomaly Triggers
- Anomaly Triggers V2
- Wireless Network Performance
- Managinge SIM Profiles
- Device SMS Messaging
- Device Actions
- Thing Space Qualityof Service API Actions
- Promotion Period Information
- Retrievethe Triggers
- Update Triggers
- SIM Actions
- Global Reporting
- Devicerolecontroller
- App Config Service
- Map Data Manager
- Retrieve Rate Plan List
- Create Price Plan Triggers
- Update Price Plan Triggers
- 5G BI Device Actions
- Sensor Insights Sensors
- Sensor Insights Devices
- Sensor Insights Gateways
- Sensor Insights Smart Alerts
- Sensor Insights Rules
- Sensor Insights Health Score
- Sensor Insights Notification Groups
- Sensor Insights Users
- Sensor Insights Device Profile
- Sensor Insights Smart Alert Metrics
- Accounts
- SMS
- Exclusions
- Billing
- Targets
- PWN
- Registration
SDK Infrastructure
Configuration
- HttpClientOptions
- RetryConfiguration
- ProxySettings
- Configuration-Based Client Initialization
- Environment-Based Client Initialization
- PartialLoggingOptions
- PartialRequestLoggingOptions
- PartialResponseLoggingOptions
- LoggerInterface
