Building the API client library requires Maven to be installed.
To install the API client library to your local Maven repository, simply execute:
mvn install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn deploy
Refer to the official documentation for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>IO.TelstraTPN</groupId>
<artifactId>TelstraTPN</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "IO.TelstraTPN:TelstraTPN:1.0.0"
At first generate the JAR by executing:
mvn package
Then manually install the following JARs:
- target/TelstraTPN-1.0.0.jar
- target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import invalidPackageName.*;
import invalidPackageName.auth.*;
import TelstraTPN.*;
import TelstraTPN.AuthenticationApi;
import java.io.File;
import java.util.*;
public class AuthenticationApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: auth
OAuth auth = (OAuth) defaultClient.getAuthentication("auth");
auth.setAccessToken("YOUR ACCESS TOKEN");
AuthenticationApi apiInstance = new AuthenticationApi();
String grantType = "password"; // String |
String username = "username_example"; // String |
String password = "password_example"; // String |
try {
Model100AuthGeneratetokenResponse result = apiInstance.createAnAuthenticationToken(grantType, username, password);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuthenticationApi#createAnAuthenticationToken");
e.printStackTrace();
}
}
}
All URIs are relative to https://penapi.pacnetconnect.com
Class | Method | HTTP request | Description |
---|---|---|---|
AuthenticationApi | createAnAuthenticationToken | POST /1.0.0/auth/generatetoken | Create an authentication token |
AuthenticationApi | validateAuthenticationToken | GET /1.0.0/auth/validatetoken | Validate authentication token |
ContractsApi | createNewContractOnSpecifiedLink | POST /1.0.0/inventory/links/{linkid}/contract | Create new Contract on specified link |
ContractsApi | getActiveContractByContractID | GET /1.0.0/inventory/links/{linkid}/contract/{contractid} | Get active Contract by ContractID |
ContractsApi | updateActiveContractByContractID | PUT /1.0.0/inventory/links/{linkid}/contract/{contractid} | Update active Contract by ContractID |
CustomersApi | getAccountInformationDetails | GET /1.0.0/account/{customeruuid} | Get account information details |
CustomersApi | listUsers | GET /1.0.0/account/{customeruuid}/user | List users |
DatacentresApi | getListOfAllTheDataCenters | GET /1.0.0/inventory/datacenters | Get list of all the data centers |
EndpointsApi | createPhysicalPortEndpoint | POST /1.0.0/inventory/regularendpoint | Create Physical (Port) Endpoint |
EndpointsApi | createVNFEndpoint | POST /1.0.0/inventory/vnfendpoint | Create VNF Endpoint |
EndpointsApi | getInformationAboutTheSpecifiedEndpoint | GET /1.0.0/inventory/endpoint/{endpointuuid} | Get information about the specified endpoint |
EndpointsApi | getListOfEndpointsForACustomer | GET /1.0.0/inventory/endpoints/customeruuid/{customeruuid} | Get list of endpoints for a customer |
LinksApi | createLinkAndInitialContract | POST /1.0.0/inventory/link | Create Link and initial Contract |
LinksApi | getActiveLinks | GET /1.0.0/inventory/links/customer/{customeruuid} | Get active Links |
LinksApi | getDetailsOfSpecifiedLink | GET /1.0.0/inventory/links/{linkid} | Get details of specified link |
LinksApi | getLinkHistory | GET /1.0.0/inventory/links/history/{linkid} | Get Link history |
TopologiesApi | createANamedTopologyTag | POST /ttms/1.0.0/topology_tag | Create a named topology tag |
TopologiesApi | getInformationAboutTheSpecifiedTopologyTag | GET /ttms/1.0.0/topology_tag/{topotaguuid}/ | Get information about the specified topology tag |
TopologiesApi | listAllTopologyTags | GET /ttms/1.0.0/topology_tag | List all topology tags |
TopologiesApi | listObjectsForTopology | GET /ttms/1.0.0/topology_tag/{topotaguuid}/objects/ | List objects for Topology |
VnfsApi | listImagesInTheMarketplace | GET /1.0.0/marketplace/image | List images in the Marketplace |
VportsApi | createVNFVPort | POST /1.0.0/inventory/vnf/vport | Create VNF VPort |
VportsApi | createVPortForPhysicalEndpoint | POST /1.0.0/inventory/regularvport | Create VPort for physical endpoint |
VportsApi | getInformationAboutTheSpecifiedVPort | GET /1.0.0/inventory/vport/{vportuuid} | Get information about the specified VPort |
- Billing
- Classification
- Contract
- Datacenter
- Endpoint
- EndpointPort
- Endpointlist
- Error
- Error70
- Flavor
- GlanceImage
- Link
- Link62
- Meta
- Model100AccountResponse
- Model100AuthGeneratetokenResponse
- Model100AuthValidatetokenResponse
- Model100InventoryDatacenters401Error
- Model100InventoryDatacentersResponse
- Model100InventoryEndpointResponse
- Model100InventoryEndpointsCustomeruuidResponse
- Model100InventoryLinkRequest
- Model100InventoryLinkResponse
- Model100InventoryLinksContractRequest
- Model100InventoryLinksContractRequest35
- Model100InventoryLinksContractResponse
- Model100InventoryLinksContractResponse31
- Model100InventoryLinksContractResponse36
- Model100InventoryLinksHistoryResponse
- Model100InventoryLinksResponse
- Model100InventoryRegularendpointRequest
- Model100InventoryRegularendpointResponse
- Model100InventoryRegularvportRequest
- Model100InventoryRegularvportResponse
- Model100InventoryVnfVportRequest
- Model100InventoryVnfVportResponse
- Model100InventoryVnfendpointRequest
- Model100InventoryVnfendpointResponse
- Model100MarketplaceImageResponse
- Object50
- Params
- Params29
- Params32
- Params37
- Product
- Role
- SuccessFragment
- Topology
- Ttms100TopologyTagObjectsResponse
- Ttms100TopologyTagRequest
- User
- Vlan
- VnfTag
- Vport
- Vportvalue
Authentication schemes defined for the API:
- Type: OAuth
- Flow: password
- Authorization URL:
- Scopes: N/A
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.