Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

bitbucket.org/bactosense/bactocloud-api-client

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitbucket.org/bactosense/bactocloud-api-client

Source
Go
Version
v0.2.7
Version published
Created
Source

Go API client for bactocloud_client

This is the comprehensive backend API documentation for BactoCloud platform. The API provides access to device management, data collection, alarm monitoring, and organization administration features.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 0.6.0
  • Package version: 1.0.0
  • Generator version: 7.8.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://www.bactocloud.com

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import bactocloud_client "bitbucket.org/bactosense/bactocloud-api-client"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value bactocloud_client.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), bactocloud_client.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value bactocloud_client.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), bactocloud_client.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using bactocloud_client.ContextOperationServerIndices and bactocloud_client.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), bactocloud_client.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), bactocloud_client.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://api.bactocloud.com

ClassMethodHTTP requestDescription
AdminAPIAdminDeviceTransferPostPost /admin/device/transferTransfer Device Ownership
AdminAPIAdminLicenceGetGet /admin/licenceGet all licences
AdminAPIAdminLicenceLicenceIdDeleteDelete /admin/licence/{licence_id}Delete licence
AdminAPIAdminLicencePostPost /admin/licenceCreate licence code
AdminAPIAdminLoginPostPost /admin/loginAdmin login to organization
AdminAPIAdminOpenidGetGet /admin/openidGet All OpenID Configurations
AdminAPIAdminOpenidIdDeleteDelete /admin/openid/{id}Delete OpenID Configuration
AdminAPIAdminOpenidPostPost /admin/openidAdd OpenID Configuration
AdminAPIAdminOpenidPutPut /admin/openidUpdate OpenID Configuration
AdminAPIAdminOrganizationDeleteDelete /admin/organizationDelete organization
AdminAPIAdminOrganizationGetGet /admin/organizationGet organization details (users, roles, devices)
AdminAPIAdminOrganizationInvitePostPost /admin/organization/inviteInvite user to organization
AdminAPIAdminOrganizationLicencePostPost /admin/organization/licenceApply a licence code to an organization
AdminAPIAdminOrganizationRolePostPost /admin/organization/roleChange user role in organization
AdminAPIAdminOrganizationUserDeleteDelete /admin/organization/userRemove user from organization
AdminAPIAdminOrganizationsGetGet /admin/organizationsGet all organizations
AdminAPIAdminSystemGetGet /admin/systemGet the system info of the server
AdminAPIAdminTestEmailPostPost /admin/test-emailSend Test Email
AdminAPIAdminUserDeleteDelete /admin/userDelete a user account
AdminAPIAdminUserPostPost /admin/userModify a user
AdminAPIAdminUsersGetGet /admin/usersGet all users and their organizations
AlarmAPIAlarmAcknowledgeIdPostPost /alarm/acknowledge/{id}Acknowledge Single Alarm
AlarmAPIAlarmAcknowledgeMultiplePostPost /alarm/acknowledge_multipleAcknowledge Multiple Alarms
AlarmAPIAlarmConfigGetGet /alarm/configGet Alarm Configurations
AlarmAPIAlarmConfigIdDeleteDelete /alarm/config/{id}Delete Alarm Configuration
AlarmAPIAlarmConfigPatchPatch /alarm/configUpdate Alarm Configuration
AlarmAPIAlarmConfigPostPost /alarm/configCreate New Alarm Configuration
AlarmAPIAlarmPostPost /alarmGet Filtered Alarm History
AlarmAPIApiV1AlarmAcknowledgeIdPostPost /api/v1/alarm/acknowledge/{id}Acknowledge Single Alarm
AlarmAPIApiV1AlarmAcknowledgeMultiplePostPost /api/v1/alarm/acknowledge_multipleAcknowledge Multiple Alarms
AlarmAPIApiV1AlarmGetGet /api/v1/alarmGet Alarm Configurations
ApiAPIHelloGetGet /helloHello
ApiAPIIotV1CommandAcknowledgePutPut /iot/v1/command/acknowledgeAcknowledge command execution WIP
ApiAPIIotV1CommandGetGet /iot/v1/commandPoll commands
ApiAPIIotV1ConfigPutPut /iot/v1/configUpdate device configuration
ApiAPIIotV1DataPostPost /iot/v1/dataAdds data to the database
ApiAPIIotV1EnrollDeleteDelete /iot/v1/enrollUnenroll device
ApiAPIIotV1EnrollPostPost /iot/v1/enrollEnroll device
ApiAPIIotV1HelloGetGet /iot/v1/helloHello
ApiAPIIotV1OrganizationGetGet /iot/v1/organizationGet organization
ApiAPIIotV1StatusPostPost /iot/v1/statusAdd device status
AuditAPIAuditExportPostPost /audit/exportExport Audit Trail as CSV
AuditAPIAuditIdGetGet /audit/{id}Get Single Audit Record
AuditAPIAuditPostPost /auditGet Audit Trail
AuthAPIExchangeJwtPostPost /exchange_jwtJWT Token Exchange
AuthAPIGenerateTotpPostPost /generate_totpGenerate TOTP Configuration
AuthAPILoginPostPost /loginUser Login with optional TOTP validation
AuthAPIVerifyTotpPostPost /verify_totpVerify TOTP Token
ComputationAPIComputationDeleteDelete /computationDelete a computation config from the organization
ComputationAPIComputationEnablePostPost /computation/enableEnable or disable a computation config from the organization
ComputationAPIComputationGetGet /computationGet the computation configs for the organization
ComputationAPIComputationPatchPatch /computationEdit a computation config in the organization
ComputationAPIComputationPostPost /computationAdd a computation config to the organization
ComputationAPIComputationRecomputePostPost /computation/recomputeRecompute a computation config from the organization for the last 12 months
ComputationAPIComputationSimulatePostPost /computation/simulateSimulate a computation from a config and a target data id
DataAPIApiV1DataExportPostPost /api/v1/data/exportExport Data to File
DataAPIApiV1DataFcsFileIdGetGet /api/v1/data/fcs/{file_id}Get FCS Flow Cytometry Data
DataAPIApiV1DataFileFileIdGetGet /api/v1/data/file/{file_id}Download Data File
DataAPIApiV1DataIdGetGet /api/v1/data/{id}Get Single Data Record
DataAPIApiV1DataListPostPost /api/v1/data/listGet Filtered Device Data
DataAPIDataExportPostPost /data/exportExport Data to File
DataAPIDataFcsFileIdGetGet /data/fcs/{file_id}Get FCS Flow Cytometry Data
DataAPIDataFileFileIdGetGet /data/file/{file_id}Download Data File
DataAPIDataIdDeleteDelete /data/{id}Delete Data Record
DataAPIDataIdGetGet /data/{id}Get Single Data Record
DataAPIDataListPostPost /data/listGet Filtered Device Data
DataAPIDataPatchPatch /data/Edit Data Record
DeviceAPIApiV1DeviceCommandCommandIdDeleteDelete /api/v1/device/command/{command_id}Cancel Device Command
DeviceAPIApiV1DeviceCommandDeviceIdGetGet /api/v1/device/command/{device_id}Get Device Command History
DeviceAPIApiV1DeviceCommandPostPost /api/v1/device/command
DeviceAPIApiV1DeviceGetGet /api/v1/deviceGet All Devices
DeviceAPIApiV1DeviceIdGetGet /api/v1/device/{id}Get Device Details
DeviceAPIDeviceCommandCommandIdDeleteDelete /device/command/{command_id}Cancel Device Command
DeviceAPIDeviceCommandDeviceIdGetGet /device/command/{device_id}Get Device Command History
DeviceAPIDeviceCommandPostPost /device/command
DeviceAPIDeviceComputationtypesDeviceIdGetGet /device/computationtypes/{device_id}Get the active computation types for one device
DeviceAPIDeviceDataBucketDeviceIdGetGet /device/data/{bucket}/{device_id}Get data for only a device, only the last with a limit
DeviceAPIDeviceGetGet /deviceGet All Devices
DeviceAPIDeviceIdDeleteDelete /device/{id}Unenroll Device
DeviceAPIDevicePackageDeviceIdActivationCodeGetGet /device/package/{device_id}/{activation_code}Validate Device Activation Code
DeviceAPIDevicePatchPatch /deviceEdit Device Information
DeviceAPIDeviceStatusIdLimitGetGet /device/status/{id}/{limit}Get Recent Device Statuses
LoginAPIConfirmPasswordForgottenPostPost /confirm_password_forgottenConfirm Password Reset
LoginAPIRequestPasswordForgottenPostPost /request_password_forgottenRequest Password Reset
Oauth2APIOauth2CallbackGetGet /oauth2/callbackOAuth2 Callback Processing
OrganizationAPIOrganizationApikeyIdDeleteDelete /organization/apikey/{id}Delete Organization API Key
OrganizationAPIOrganizationApikeyPostPost /organization/apikeyAdd Organization API Key
OrganizationAPIOrganizationDeleteDelete /organizationDeleteOrganizationHandler
OrganizationAPIOrganizationEditPutPut /organization/editedits an organization (names, emails, filters). Returns as data an organization object
OrganizationAPIOrganizationEnrollIdDeleteDelete /organization/enroll/{id}deletes the enrollment code for an organization
OrganizationAPIOrganizationEnrollPostPost /organization/enrollcreates an enrollment code for an organization
OrganizationAPIOrganizationGetGet /organizationGetOrganizationHandler gets the organization
OrganizationAPIOrganizationInviteCodeGetGet /organization/invite/{code}Accept Organization Invite
OrganizationAPIOrganizationInviteIdDeleteDelete /organization/invite/{id}Delete Organization Invite
OrganizationAPIOrganizationInvitePostPost /organization/inviteSend Organization Invite
OrganizationAPIOrganizationLeaveDeleteDelete /organization/leaveLeave Organization
OrganizationAPIOrganizationLicencePostPost /organization/licenceAdd Licence To Organization
OrganizationAPIOrganizationPostPost /organizationcreates a new organization
OrganizationAPIOrganizationPushPutPut /organization/pushEdit Push Settings Handler
OrganizationAPIOrganizationPushTestPostPost /organization/push/testTest Data Push Handler
OrganizationAPIOrganizationUserDisablePutPut /organization/user/disableDisable Organization User
OrganizationAPIOrganizationUserUserIdDeleteDelete /organization/user/{user_id}Exclude Organization User
PermissionsAPIPermissionGetGet /permissionReturns a list of all permissions
PermissionsAPIPermissionTreeGetGet /permission/treeGet permission tree by roles
UserAPICaptchaGetGet /captchaGenerate CAPTCHA
UserAPIRegisterPostPost /registerUser Registration
UserAPIUserConfirmPasswordResetPostPost /user/confirm_password_resetFinalize Password Reset
UserAPIUserGetGet /userRetrieve User Profile
UserAPIUserOrganizationsGetGet /user/organizationsList User Organizations
UserAPIUserPutPut /userUpdate User Profile
UserAPIUserRequestPasswordResetPostPost /user/request_password_resetInitiate Password Reset
UserAPIUserRequestSalesPostPost /user/request_salesSubmit Sales Request
UserAPIVerifyEmailPostPost /verify_emailEmail Verification
WsAPIWsAuthGetGet /ws/authWebSocket authentication
WsAPIWsGetGet /wsWebSocket

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

BactosenseApiKey

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: Authorization and passed in as the auth context for each request.

Example

auth := context.WithValue(
		context.Background(),
		bactocloud_client.ContextAPIKeys,
		map[string]bactocloud_client.APIKey{
			"Authorization": {Key: "API_KEY_STRING"},
		},
	)
r, err := client.Service.Operation(auth, args)

JWT

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: Authorization and passed in as the auth context for each request.

Example

auth := context.WithValue(
		context.Background(),
		bactocloud_client.ContextAPIKeys,
		map[string]bactocloud_client.APIKey{
			"Authorization": {Key: "API_KEY_STRING"},
		},
	)
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

info@bactocloud.com

FAQs

Package last updated on 31 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts