public interface Packet
Lightweight API client library for accessing Packet REST APIs with project based (JVM hosted languages) on Java, Groovy, Scala, Clojure, etc.
| Modifier and Type | Method and Description |
|---|---|
java.lang.Boolean |
acceptInvite(java.lang.String invitationId)
To accept user invitation.
|
java.lang.Boolean |
acceptTransfer(java.lang.String transferId)
To accept project ownership transfer.
|
Email |
addEmailAddress(Email email)
Add email address to current user profile.
|
Device |
createDevice(java.lang.String projectId,
Device device)
Creating new device on packet project.
|
Project |
createProject(Project project)
Create a project on your packet account.
|
SshKey |
createSshKey(SshKey sshKey)
To create a new SSH key on packet account.
|
java.lang.Boolean |
declineInvite(java.lang.String invitationId)
To decline user invitation.
|
java.lang.Boolean |
declineTransfer(java.lang.String transferId)
To decline project ownership transfer.
|
java.lang.Boolean |
deleteDevice(java.lang.String deviceId)
To delete a device from Packet project and deprovisions it in packet datacenter.
|
java.lang.Boolean |
deleteEmailAddress(java.lang.String emailId)
To delete email address from current user profile.
|
java.lang.Boolean |
deleteIpAddress(java.lang.String ipAddressId)
To remove an IP reservation from the project.
|
java.lang.Boolean |
deleteMembership(java.lang.String membershipId)
To deletes a membership record and also it will remove the user from the project.
|
java.lang.Boolean |
deleteProject(java.lang.String projectId)
Deletes a device and de-provisions it in our datacenter.
|
java.lang.Boolean |
deleteSshKey(java.lang.String sshKeyId)
To delete SSH key from packet account.
|
Metrics |
deviceTraffic(java.lang.String deviceId,
TrafficDirection direction,
java.util.Date timeframeStart,
java.util.Date timeframeEnd)
To get traffic information for device.
|
Metrics |
deviceTraffic(java.lang.String deviceId,
TrafficDirection direction,
java.util.Date timeframeStart,
java.util.Date timeframeEnd,
MetricInterval interval,
TrafficBucket bucket)
To get traffic information for device.
|
User |
getCurrentUser()
To get current user information.
|
Device |
getDevice(java.lang.String deviceId)
To get single device information.
|
Events |
getDeviceEvents(java.lang.String deviceId,
java.lang.Integer pageNo,
java.lang.Integer perPage)
To fetch all the events belongs to particular device.
|
Devices |
getDevices(java.lang.String projectId,
java.lang.Integer pageNo,
java.lang.Integer perPage)
To get all available devices from your packet account on particular project.
|
Email |
getEmailAddress(java.lang.String emailId)
To fetch one email address information.
|
Event |
getEvent(java.lang.String eventId)
To get single event details.
|
Events |
getEvents(java.util.Date since,
java.lang.Integer pageNo,
java.lang.Integer perPage)
Provides all the events from since date.
|
Facilities |
getFacilites(java.lang.Integer pageNo,
java.lang.Integer perPage)
Provides a listing of available datacenters where you can provision Packet devices.
|
Invitation |
getInvite(java.lang.String invitationId)
To get particular invite details.
|
IpAddress |
getIpAddress(java.lang.String ipAddressId)
To get particular IP Address details.
|
IpAddresses |
getIpAddresses(java.lang.String projectId)
To get all available IP Addresses form packet project.
|
Membership |
getMembership(java.lang.String membershipId)
To get project membership details.
|
Notification |
getNotification(java.lang.String notificationId)
To get single notification details.
|
Notifications |
getNotifications(java.util.Date since,
java.lang.Boolean all,
java.lang.Integer pageNo,
java.lang.Integer perPage)
To fetch all the notification from packet account.
|
OperatingSystems |
getOperatingSystems(java.lang.Integer pageNo,
java.lang.Integer perPage)
Provides a listing of available operating systems to provision your new device with.
|
Plans |
getPlans(java.lang.Integer pageNo,
java.lang.Integer perPage)
Provides a listing of available services plans available to provision your device on.
|
Project |
getProject(java.lang.String projectId)
Provides single project object.
|
Events |
getProjectEvents(java.lang.String projectId,
java.lang.Integer pageNo,
java.lang.Integer perPage)
To fetch all the events belongs to particular project.
|
Projects |
getProjects(java.lang.Integer pageNo,
java.lang.Integer perPage)
Projects are a way to group devices and grant users access to them.
|
SshKey |
getSshKey(java.lang.String sshKeyId)
To get single SSH key details.
|
SshKeys |
getSshKeys(java.lang.Integer pageNo,
java.lang.Integer perPage)
To get all the available SSH keys from packet account.
|
Transfer |
getTransferInfo(java.lang.String transferId)
Get the project transfer information.
|
User |
getUser(java.lang.String userId)
To get single user information.
|
Users |
getUsers(java.lang.Integer pageNo,
java.lang.Integer perPage)
To get all the available users information.
|
Invitation |
invite(java.lang.String projectId,
Invitation invitation)
Inviting a user to the project or adding user to the project.
|
java.lang.Boolean |
powerOffDevice(java.lang.String deviceId)
To turn-off power on your device.
|
java.lang.Boolean |
powerOnDevice(java.lang.String deviceId)
To power on your device.
|
java.lang.Boolean |
rebootDevice(java.lang.String deviceId)
To reboot device normally.
|
java.lang.Boolean |
rescueDevice(java.lang.String deviceId)
To reboot the device into rescue OS.
|
java.lang.Boolean |
reserveIpAddress(java.lang.String projectId,
ReserveIpAddress reserveIpAddress)
Reserve/Request more IP address for a project.
|
Transfer |
transferProject(java.lang.String projectId,
java.lang.String membershipId)
Project owners can transfer ownership of their projects to other members.
|
User |
updateCurrentUser(User user)
To update current user information.
|
Device |
updateDevice(Device device)
To update device details on packet project.
|
Email |
updateEmailAddress(Email email)
To update email address to default address or non-default.
|
Membership |
updateMembership(Membership membership)
To update membership details.
|
Notification |
updateNotification(Notification notification)
To update single notification.
|
Project |
updateProject(Project project)
Updates a project information.
|
SshKey |
updateSshKey(SshKey sshKey)
To update existing SSH key on packet account.
|
Facilities getFacilites(java.lang.Integer pageNo, java.lang.Integer perPage) throws PacketException
pageNo - for paginationperPage - no. of items per page (optional, can pass null)FacilitiesPacketException - for HTTP status code >= 400 && < 510OperatingSystems getOperatingSystems(java.lang.Integer pageNo, java.lang.Integer perPage) throws PacketException
pageNo - for paginationperPage - no. of items per page (optional, can pass null)OperatingSystemsPacketException - for HTTP status code >= 400 && < 510Plans getPlans(java.lang.Integer pageNo, java.lang.Integer perPage) throws PacketException
pageNo - for paginationperPage - no. of items per page (optional, can pass null)PlansPacketException - for HTTP status code >= 400 && < 510Projects getProjects(java.lang.Integer pageNo, java.lang.Integer perPage) throws PacketException
pageNo - for paginationperPage - no. of items per page (optional, can pass null)ProjectsPacketException - for HTTP status code >= 400 && < 510Project getProject(java.lang.String projectId) throws PacketException
projectId - a packet project idProjectPacketException - for HTTP status code >= 400 && < 510Project createProject(Project project) throws PacketException
project - a Project instanceProjectPacketException - for HTTP status code >= 400 && < 510Project updateProject(Project project) throws PacketException
project - a Project instanceProjectPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean deleteProject(java.lang.String projectId)
throws PacketException
projectId - a packet project idBooleanPacketException - for HTTP status code >= 400 && < 510Transfer transferProject(java.lang.String projectId, java.lang.String membershipId) throws PacketException
projectId - a packet project idmembershipId - a packet membership idTransferPacketException - for HTTP status code >= 400 && < 510Transfer getTransferInfo(java.lang.String transferId) throws PacketException
transferId - project transfer idTransferPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean acceptTransfer(java.lang.String transferId)
throws PacketException
transferId - project transfer idBooleanPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean declineTransfer(java.lang.String transferId)
throws PacketException
transferId - project transfer idBooleanPacketException - for HTTP status code >= 400 && < 510Devices getDevices(java.lang.String projectId, java.lang.Integer pageNo, java.lang.Integer perPage) throws PacketException
projectId - a packet project idpageNo - for paginationperPage - no. of items per page (optional, can pass null)DevicesPacketException - for HTTP status code >= 400 && < 510Device getDevice(java.lang.String deviceId) throws PacketException
deviceId - a packet device idDevicePacketException - for HTTP status code >= 400 && < 510Device createDevice(java.lang.String projectId, Device device) throws PacketException
projectId - a packet project iddevice - a Device instanceDevicePacketException - for HTTP status code >= 400 && < 510Device updateDevice(Device device) throws PacketException
device - a Device instanceDevicePacketException - for HTTP status code >= 400 && < 510java.lang.Boolean deleteDevice(java.lang.String deviceId)
throws PacketException
deviceId - a packet device idBooleanPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean powerOnDevice(java.lang.String deviceId)
throws PacketException
deviceId - a packet device idBooleanPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean powerOffDevice(java.lang.String deviceId)
throws PacketException
deviceId - a packet device idBooleanPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean rebootDevice(java.lang.String deviceId)
throws PacketException
deviceId - a packet device idBooleanPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean rescueDevice(java.lang.String deviceId)
throws PacketException
deviceId - a packet device idBooleanPacketException - for HTTP status code >= 400 && < 510Metrics deviceTraffic(java.lang.String deviceId, TrafficDirection direction, java.util.Date timeframeStart, java.util.Date timeframeEnd) throws PacketException
deviceId - a packet device iddirection - a value of TrafficDirectiontimeframeStart - a starting date timetimeframeEnd - a end date timeMetricsPacketException - for HTTP status code >= 400 && < 510Metrics deviceTraffic(java.lang.String deviceId, TrafficDirection direction, java.util.Date timeframeStart, java.util.Date timeframeEnd, MetricInterval interval, TrafficBucket bucket) throws PacketException
deviceId - a packet device iddirection - a value of TrafficDirectiontimeframeStart - a starting date timetimeframeEnd - a end date timeinterval - a value of MetricIntervalbucket - a value of TrafficBucketMetricsPacketException - for HTTP status code >= 400 && < 510IpAddresses getIpAddresses(java.lang.String projectId) throws PacketException
projectId - a packet project idIpAddressesPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean reserveIpAddress(java.lang.String projectId,
ReserveIpAddress reserveIpAddress)
throws PacketException
projectId - a packet project idreserveIpAddress - a instance of ReserveIpAddressBooleanPacketException - for HTTP status code >= 400 && < 510IpAddress getIpAddress(java.lang.String ipAddressId) throws PacketException
ipAddressId - id of the IP addressIpAddressPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean deleteIpAddress(java.lang.String ipAddressId)
throws PacketException
ipAddressId - id of the IP addressBooleanPacketException - for HTTP status code >= 400 && < 510Users getUsers(java.lang.Integer pageNo, java.lang.Integer perPage) throws PacketException
pageNo - for paginationperPage - no. of items per page (optional, can pass null)UsersPacketException - for HTTP status code >= 400 && < 510User getUser(java.lang.String userId) throws PacketException
userId - packet user idUserPacketException - for HTTP status code >= 400 && < 510User getCurrentUser() throws PacketException
UserPacketException - for HTTP status code >= 400 && < 510User updateCurrentUser(User user) throws PacketException
user - a instance of UserUserPacketException - for HTTP status code >= 400 && < 510Membership getMembership(java.lang.String membershipId) throws PacketException
membershipId - project membership idMembershipPacketException - for HTTP status code >= 400 && < 510Membership updateMembership(Membership membership) throws PacketException
membership - a instance of MembershipMembershipPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean deleteMembership(java.lang.String membershipId)
throws PacketException
membershipId - project membership idBooleanPacketException - for HTTP status code >= 400 && < 510SshKeys getSshKeys(java.lang.Integer pageNo, java.lang.Integer perPage) throws PacketException
pageNo - for paginationperPage - no. of items per page (optional, can pass null)SshKeysPacketException - for HTTP status code >= 400 && < 510SshKey getSshKey(java.lang.String sshKeyId) throws PacketException
sshKeyId - id of the SSH keySshKeyPacketException - for HTTP status code >= 400 && < 510SshKey createSshKey(SshKey sshKey) throws PacketException
sshKey - a instance of SshKeySshKeyPacketException - for HTTP status code >= 400 && < 510SshKey updateSshKey(SshKey sshKey) throws PacketException
sshKey - a instance of SshKeySshKeyPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean deleteSshKey(java.lang.String sshKeyId)
throws PacketException
sshKeyId - a instance of SshKeyBooleanPacketException - for HTTP status code >= 400 && < 510Invitation invite(java.lang.String projectId, Invitation invitation) throws PacketException
projectId - a packet project idinvitation - a instance of InvitationInvitationPacketException - for HTTP status code >= 400 && < 510Invitation getInvite(java.lang.String invitationId) throws PacketException
invitationId - a user invitation idInvitationPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean acceptInvite(java.lang.String invitationId)
throws PacketException
invitationId - a user invitation idInvitationPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean declineInvite(java.lang.String invitationId)
throws PacketException
invitationId - a user invitation idInvitationPacketException - for HTTP status code >= 400 && < 510Events getEvents(java.util.Date since, java.lang.Integer pageNo, java.lang.Integer perPage) throws PacketException
since - date time of events to fetchpageNo - for paginationperPage - no. of items per page (optional, can pass null)EventsPacketException - for HTTP status code >= 400 && < 510Events getProjectEvents(java.lang.String projectId, java.lang.Integer pageNo, java.lang.Integer perPage) throws PacketException
projectId - packet project idpageNo - for paginationperPage - no. of items per page (optional, can pass null)EventsPacketException - for HTTP status code >= 400 && < 510Events getDeviceEvents(java.lang.String deviceId, java.lang.Integer pageNo, java.lang.Integer perPage) throws PacketException
deviceId - packet device idpageNo - for paginationperPage - no. of items per page (optional, can pass null)EventsPacketException - for HTTP status code >= 400 && < 510Event getEvent(java.lang.String eventId) throws PacketException
eventId - id of project or device event idEventPacketException - for HTTP status code >= 400 && < 510Notifications getNotifications(java.util.Date since, java.lang.Boolean all, java.lang.Integer pageNo, java.lang.Integer perPage) throws PacketException
since - date time of notifications to fetchall - to include read notification toopageNo - for paginationperPage - no. of items per page (optional, can pass null)NotificationsPacketException - for HTTP status code >= 400 && < 510Notification getNotification(java.lang.String notificationId) throws PacketException
notificationId - id of the packet notificationsNotificationPacketException - for HTTP status code >= 400 && < 510Notification updateNotification(Notification notification) throws PacketException
notification - a instance of the NotificationNotificationPacketException - for HTTP status code >= 400 && < 510Email addEmailAddress(Email email) throws PacketException
email - a valid email addressEmailPacketException - for HTTP status code >= 400 && < 510Email getEmailAddress(java.lang.String emailId) throws PacketException
emailId - id of the email address recordEmailPacketException - for HTTP status code >= 400 && < 510Email updateEmailAddress(Email email) throws PacketException
email - a instance of EmailEmailPacketException - for HTTP status code >= 400 && < 510java.lang.Boolean deleteEmailAddress(java.lang.String emailId)
throws PacketException
emailId - id of the email address recordBooleanPacketException - for HTTP status code >= 400 && < 510