Skip to content

telstra/Programmable-Network-SDK-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Messaging SDK

Telstra Programmable Network is a self-provisioning platform that allows its users to create on-demand connectivity services between multiple end-points and add various network functions to those services. Programmable Network enables to connectivity to a global ecosystem of networking services as well as public and private cloud services. Once you are connected to the platform on one or more POPs (points of presence), you can start creating those services based on the use case that you want to accomplish. The Programmable Network API is available to all customers who have registered to use the Programmable Network. To register, please contact your account representative.

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/Telstra/tpn.git"
    }
  ],
  "require": {
    "Telstra/tpn": "*@master"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new tpn\Api\AuthenticationApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$grant_type = 'password'; // string | 
$username = 'username_example'; // string | 
$password = 'password_example'; // string | 

try {
    $result = $apiInstance->generateToken($grant_type, $username, $password);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthenticationApi->generateToken: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://penapi.pacnetconnect.com

Class Method HTTP request Description
AuthenticationApi generateToken POST /1.0.0/auth/generatetoken Create an authentication token
AuthenticationApi validateToken GET /1.0.0/auth/validatetoken Validate authentication token
ContractsApi inventoryLinksContract POST /1.0.0/inventory/links/{linkid}/contract Create new Contract on specified link
ContractsApi inventoryLinksContractGet GET /1.0.0/inventory/links/{linkid}/contract/{contractid} Get active Contract by ContractID
ContractsApi inventoryLinksContractPut PUT /1.0.0/inventory/links/{linkid}/contract/{contractid} Update active Contract by ContractID
CustomersApi account GET /1.0.0/account/{customeruuid} Get account information details
CustomersApi accountUser GET /1.0.0/account/{customeruuid}/user List users
DatacentresApi inventoryDatacentres GET /1.0.0/inventory/datacenters Get list of all the data centers
EndpointsApi endpointEndpointuuidGet GET /eis/1.0.0/endpoint/endpointuuid/{endpointuuid} Get Endpoint name and status
EndpointsApi endpointEndpointuuidPut PUT /eis/1.0.0/endpoint/endpointuuid/{endpointuuid} Update Endpoint name
EndpointsApi endpointsAssignTopologyTag POST /eis/1.0.0/endpoints/{endpointuuid}/assign_topology_tag Assign an Endpoint to a Topology
EndpointsApi endpointsTopologyTagUuid GET /eis/1.0.0/endpoints/topology_tag_uuid/{topotaguuid} List Endpoints for Topology
EndpointsApi endpointsTopologyTagUuidEndpoint DELETE /eis/1.0.0/endpoints/topology_tag_uuid/{topotaguuid}/endpoint/{endpointuuid} Remove Endpoint from a Topology
EndpointsApi inventoryEndpoint GET /1.0.0/inventory/endpoint/{endpointuuid} Get information about the specified endpoint
EndpointsApi inventoryEndpointsCustomeruuid GET /1.0.0/inventory/endpoints/customeruuid/{customeruuid} Get list of endpoints for a customer
EndpointsApi inventoryLinksStatsEndpoint GET /1.0.0/inventory/links-stats/endpoint/{endpointuuid}/{startdate}/{enddate} Get statistics for endpoint
EndpointsApi inventoryLinksStatsEndpointstate GET /1.0.0/inventory/links-stats/endpointstate/{endpointuuid}/{startdate}/{enddate} Get state statistics for endpoint
EndpointsApi inventoryRegularendpoint POST /1.0.0/inventory/regularendpoint Create Physical (Port) Endpoint
EndpointsApi inventoryRegularvport POST /1.0.0/inventory/regularvport Create VPort for physical endpoint
EndpointsApi inventoryVnfendpoint POST /1.0.0/inventory/vnfendpoint Instantiate Virtual Network Function
EndpointsApi vnfendpointVnfuuid GET /eis/1.0.0/vnfendpoint/vnfuuid/{vnfuuid} Get details of a specific VNF
ExchangeApi accountProfileExchange GET /1.0.0/account/profile/exchange Get the current account's Exchange profile
ExchangeApi exchange GET /1.0.0/exchange List all Exchange providers, with POPs
ExchangeApi exchangeExprovuuid GET /1.0.0/exchange/{exprovuuid} Exchange provider details
ExchangeApi visitcard GET /1.0.0/visitcard Get list of Visit Cards
ExchangeApi visitcardUuidGet GET /1.0.0/visitcard/{visitcarduuid} View details of the specified Visit Card
ExchangeApi visitcardUuidPut PUT /1.0.0/visitcard/{visitcarduuid} Update details of the specified Visit Card
LinksApi inventoryLink POST /1.0.0/inventory/link Create Link and initial Contract
LinksApi inventoryLinks GET /1.0.0/inventory/links/{linkid} Get details of specified link
LinksApi inventoryLinksCustomer GET /1.0.0/inventory/links/customer/{customeruuid} Get active Links
LinksApi inventoryLinksHistory GET /1.0.0/inventory/links/history/{linkid} Get Link history
LinksApi inventoryLinksStatsFlow GET /1.0.0/inventory/links-stats/flow/{linkid}/{startdate}/{enddate} Get statistics for flow
StatisticsApi inventoryLinksStatsEndpoint GET /1.0.0/inventory/links-stats/endpoint/{endpointuuid}/{startdate}/{enddate} Get statistics for endpoint
StatisticsApi inventoryLinksStatsEndpointstate GET /1.0.0/inventory/links-stats/endpointstate/{endpointuuid}/{startdate}/{enddate} Get state statistics for endpoint
StatisticsApi inventoryLinksStatsFlow GET /1.0.0/inventory/links-stats/flow/{linkid}/{startdate}/{enddate} Get statistics for flow
TopologiesApi endpointsAssignTopologyTag POST /eis/1.0.0/endpoints/{endpointuuid}/assign_topology_tag Assign an Endpoint to a Topology
TopologiesApi endpointsTopologyTagUuid GET /eis/1.0.0/endpoints/topology_tag_uuid/{topotaguuid} List Endpoints for Topology
TopologiesApi endpointsTopologyTagUuidEndpoint DELETE /eis/1.0.0/endpoints/topology_tag_uuid/{topotaguuid}/endpoint/{endpointuuid} Remove Endpoint from a Topology
TopologiesApi topologyTagGet GET /ttms/1.0.0/topology_tag List all topology tags
TopologiesApi topologyTagObjects GET /ttms/1.0.0/topology_tag/{topotaguuid}/objects/ List objects for Topology
TopologiesApi topologyTagPost POST /ttms/1.0.0/topology_tag Create a named topology tag
TopologiesApi topologyTagUuidDelete DELETE /ttms/1.0.0/topology_tag/{topotaguuid}/ Delete a topology tag
TopologiesApi topologyTagUuidGet GET /ttms/1.0.0/topology_tag/{topotaguuid}/ Get information about the specified topology tag
TopologiesApi topologyTagUuidPut PUT /ttms/1.0.0/topology_tag/{topotaguuid}/ Update a topology tag's name and/or description
UsersApi accountUser GET /1.0.0/account/{customeruuid}/user List users
VnfsApi bmsBackup POST /bms/1.0.0/backup Create backup of specified VNF
VnfsApi bmsBackupDelete DELETE /bms/1.0.0/backup/{backupuuid} Delete specified backup
VnfsApi bmsBackupGet GET /bms/1.0.0/backup/{backupuuid} Get information about the specified backup
VnfsApi bmsBackupRestore POST /bms/1.0.0/backup/{backupuuid}/restore Restore VNF from backup
VnfsApi bmsBackupVnf GET /bms/1.0.0/backup/vnf/{vnfuuid} List backups
VnfsApi bmsBackupVnfDelete POST /bms/1.0.0/backup/vnf/{vnfuuid}/delete Delete multiple backups
VnfsApi inventoryVnfVport POST /1.0.0/inventory/vnf/vport Create VNF VPort
VnfsApi inventoryVnfendpoint POST /1.0.0/inventory/vnfendpoint Instantiate Virtual Network Function
VnfsApi marketplaceImage GET /1.0.0/marketplace/image List images in the Marketplace
VnfsApi marketplaceImageAdd POST /1.0.0/marketplace/image/{imageid}/add_to_my_images/ Add specified image to &quot;My Images&quot;
VnfsApi marketplaceImageImageid GET /1.0.0/marketplace/image/{imageid}/ Get information about the specified image
VnfsApi marketplaceImageMyImages GET /1.0.0/marketplace/image/my_images/ List images in &quot;My Images&quot;
VnfsApi marketplaceImageRemove POST /1.0.0/marketplace/image/{imageid}/remove_from_my_images/ Remove specified image from &quot;My Images&quot;
VnfsApi vnf GET /vnfds/1.0.0/vnf/{vnfuuid}/ Get status information about the specified VNF
VnfsApi vnfReboot POST /vnfds/1.0.0/vnf/{vnfuuid}/reboot Reboot the specified VNF
VnfsApi vnfResume POST /vnfds/1.0.0/vnf/{vnfuuid}/resume Resume the specified VNF
VnfsApi vnfSuspend POST /vnfds/1.0.0/vnf/{vnfuuid}/suspend Suspend the specified VNF
VnfsApi vnfendpointVnfuuid GET /eis/1.0.0/vnfendpoint/vnfuuid/{vnfuuid} Get details of a specific VNF
VportsApi inventoryRegularvport POST /1.0.0/inventory/regularvport Create VPort for physical endpoint
VportsApi inventoryVnfVport POST /1.0.0/inventory/vnf/vport Create VNF VPort
VportsApi inventoryVport GET /1.0.0/inventory/vport/{vportuuid} Get information about the specified VPort

Documentation For Models

Documentation For Authorisation

oAuth2

  • Type: OAuth
  • Flow: password
  • Authorisation URL:
  • Scopes: N/A

Author

pnapi-support@team.telstra.com

Releases

No releases published

Packages

No packages published

Languages