Skip to content

Yohan460/oomnitza

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for oomnitza

Date type fields

API endpoints expected date in UTC±0:00 timezone. Timezones in ISO8601 format will be ignored. API endpoints support date in two formats (one of): ISO8601 ('YYYY-MM-DDTHH:mm:SSZ') or Unix Timestamp (seconds count since January 1st, 1970 at UTC).

Dropdown fields

Some fields are configured as dropdown fields with a dedicated list of values within Oomnitza. You can review the list of available dropdown values within the customization page in Oomnitza. In case you want to be able to post any data into these fields, you should switch them to dropdown without value within the customization page.

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: 3.0.3
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

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

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

import "github.com/yohan460/oomnitza"

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 sw.ContextServerIndex of type int.

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

Templated Server URL

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

ctx := context.WithValue(context.Background(), oomnitza.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 sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

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

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AccessoriesApi ApiV3AccessoriesGet Get /api/v3/accessories
AccessoriesApi ApiV3AccessoriesIdentChangesHistoryGet Get /api/v3/accessories/{ident}/changes-history
AccessoriesApi ApiV3AccessoriesIdentDelete Delete /api/v3/accessories/{ident}
AccessoriesApi ApiV3AccessoriesIdentGet Get /api/v3/accessories/{ident}
AccessoriesApi ApiV3AccessoriesIdentPatch Patch /api/v3/accessories/{ident}
AccessoriesApi ApiV3AccessoriesPost Post /api/v3/accessories
AccessoriesApi ApiV3AccessoriesSavedsearchesGet Get /api/v3/accessories/savedsearches
AccessoriesApi ApiV3AccessoriesSavedsearchesIdentGet Get /api/v3/accessories/savedsearches/{ident}
ActivitiesApi ApiV3ActivitiesGet Get /api/v3/activities
AssetsApi ApiV3AssetsGet Get /api/v3/assets
AssetsApi ApiV3AssetsIdentChangesHistoryGet Get /api/v3/assets/{ident}/changes-history
AssetsApi ApiV3AssetsIdentDelete Delete /api/v3/assets/{ident}
AssetsApi ApiV3AssetsIdentGet Get /api/v3/assets/{ident}
AssetsApi ApiV3AssetsIdentPatch Patch /api/v3/assets/{ident}
AssetsApi ApiV3AssetsIdentSoftwareGet Get /api/v3/assets/{ident}/software
AssetsApi ApiV3AssetsPost Post /api/v3/assets
AssetsApi ApiV3AssetsSavedsearchesGet Get /api/v3/assets/savedsearches
AssetsApi ApiV3AssetsSavedsearchesIdentGet Get /api/v3/assets/savedsearches/{ident}
ConnectorApi ApiV3ConnectorRunLogsConnectorsIdentGet Get /api/v3/connector_run_logs/connectors/{ident}
ConnectorApi ApiV3ConnectorRunLogsIdentGet Get /api/v3/connector_run_logs/{ident}
ContractsApi ApiV3ContractsGet Get /api/v3/contracts
ContractsApi ApiV3ContractsIdentChangesHistoryGet Get /api/v3/contracts/{ident}/changes-history
ContractsApi ApiV3ContractsIdentDelete Delete /api/v3/contracts/{ident}
ContractsApi ApiV3ContractsIdentGet Get /api/v3/contracts/{ident}
ContractsApi ApiV3ContractsIdentPatch Patch /api/v3/contracts/{ident}
ContractsApi ApiV3ContractsPost Post /api/v3/contracts
ContractsApi ApiV3ContractsSavedsearchesGet Get /api/v3/contracts/savedsearches
ContractsApi ApiV3ContractsSavedsearchesIdentGet Get /api/v3/contracts/savedsearches/{ident}
CustomObjectsApi ApiV3CustomObjectsGet Get /api/v3/custom_objects
CustomObjectsApi ApiV3CustomObjectsIdentDelete Delete /api/v3/custom_objects/{ident}
CustomObjectsApi ApiV3CustomObjectsIdentGet Get /api/v3/custom_objects/{ident}
CustomObjectsApi ApiV3CustomObjectsIdentPatch Patch /api/v3/custom_objects/{ident}
CustomObjectsApi ApiV3CustomObjectsIdentRecordsCustomObjectRecordIdChangesHistoryGet Get /api/v3/custom_objects/{ident}/records/{custom_object_record_id}/changes-history
CustomObjectsApi ApiV3CustomObjectsIdentRecordsCustomObjectRecordIdDelete Delete /api/v3/custom_objects/{ident}/records/{custom_object_record_id}
CustomObjectsApi ApiV3CustomObjectsIdentRecordsCustomObjectRecordIdGet Get /api/v3/custom_objects/{ident}/records/{custom_object_record_id}
CustomObjectsApi ApiV3CustomObjectsIdentRecordsCustomObjectRecordIdPatch Patch /api/v3/custom_objects/{ident}/records/{custom_object_record_id}
CustomObjectsApi ApiV3CustomObjectsIdentRecordsGet Get /api/v3/custom_objects/{ident}/records
CustomObjectsApi ApiV3CustomObjectsIdentRecordsPost Post /api/v3/custom_objects/{ident}/records
CustomObjectsApi ApiV3CustomObjectsPost Post /api/v3/custom_objects
LocationsApi ApiV3LocationsGet Get /api/v3/locations
LocationsApi ApiV3LocationsIdentChangesHistoryGet Get /api/v3/locations/{ident}/changes-history
LocationsApi ApiV3LocationsIdentDelete Delete /api/v3/locations/{ident}
LocationsApi ApiV3LocationsIdentGet Get /api/v3/locations/{ident}
LocationsApi ApiV3LocationsIdentPatch Patch /api/v3/locations/{ident}
LocationsApi ApiV3LocationsPost Post /api/v3/locations
LocationsApi ApiV3LocationsSavedsearchesGet Get /api/v3/locations/savedsearches
LocationsApi ApiV3LocationsSavedsearchesIdentGet Get /api/v3/locations/savedsearches/{ident}
SaaSApi ApiV3SaasGet Get /api/v3/saas
SaaSApi ApiV3SaasIdentChangesHistoryGet Get /api/v3/saas/{ident}/changes-history
SaaSApi ApiV3SaasIdentDelete Delete /api/v3/saas/{ident}
SaaSApi ApiV3SaasIdentGet Get /api/v3/saas/{ident}
SaaSApi ApiV3SaasIdentPatch Patch /api/v3/saas/{ident}
SaaSApi ApiV3SaasPost Post /api/v3/saas
SaaSApi ApiV3SaasSavedsearchesGet Get /api/v3/saas/savedsearches
SaaSApi ApiV3SaasSavedsearchesIdentGet Get /api/v3/saas/savedsearches/{ident}
SaaSUsersApi ApiV3SaasIdentRolesGet Get /api/v3/saas/{ident}/roles
SaaSUsersApi ApiV3SaasIdentRolesPost Post /api/v3/saas/{ident}/roles
SaaSUsersApi ApiV3SaasIdentRolesSaasRoleIdDelete Delete /api/v3/saas/{ident}/roles/{saas_role_id}
SaaSUsersApi ApiV3SaasIdentRolesSaasRoleIdPatch Patch /api/v3/saas/{ident}/roles/{saas_role_id}
SaaSUsersApi ApiV3SaasIdentRolesUsersDelete Delete /api/v3/saas/{ident}/roles/users
SaaSUsersApi ApiV3SaasIdentRolesUsersPatch Patch /api/v3/saas/{ident}/roles/users
SaaSUsersApi ApiV3SaasIdentRolesUsersPost Post /api/v3/saas/{ident}/roles/users
SaaSUsersApi ApiV3SaasIdentUsersGet Get /api/v3/saas/{ident}/users
SaaSUsersApi ApiV3SaasIdentUsersPost Post /api/v3/saas/{ident}/users
SaaSUsersApi ApiV3SaasIdentUsersUserIdPost Post /api/v3/saas/{ident}/users/{user_id}
SaaSUsersApi ApiV3SaasUsersActivatePatch Patch /api/v3/saas_users/activate
SaaSUsersApi ApiV3SaasUsersDeactivatePatch Patch /api/v3/saas_users/deactivate
SaaSUsersApi ApiV3SaasUsersGet Get /api/v3/saas_users
SoftwareApi ApiV3SoftwareGet Get /api/v3/software
SoftwareApi ApiV3SoftwareIdentAssetsGet Get /api/v3/software/{ident}/assets
SoftwareApi ApiV3SoftwareIdentChangesHistoryGet Get /api/v3/software/{ident}/changes-history
SoftwareApi ApiV3SoftwareIdentDelete Delete /api/v3/software/{ident}
SoftwareApi ApiV3SoftwareIdentGet Get /api/v3/software/{ident}
SoftwareApi ApiV3SoftwareIdentPatch Patch /api/v3/software/{ident}
SoftwareApi ApiV3SoftwarePost Post /api/v3/software
SoftwareApi ApiV3SoftwareSavedsearchesGet Get /api/v3/software/savedsearches
SoftwareApi ApiV3SoftwareSavedsearchesIdentGet Get /api/v3/software/savedsearches/{ident}
StockroomsApi ApiV3StockroomsGet Get /api/v3/stockrooms
StockroomsApi ApiV3StockroomsIdentChangesHistoryGet Get /api/v3/stockrooms/{ident}/changes-history
StockroomsApi ApiV3StockroomsIdentDelete Delete /api/v3/stockrooms/{ident}
StockroomsApi ApiV3StockroomsIdentGet Get /api/v3/stockrooms/{ident}
StockroomsApi ApiV3StockroomsIdentPatch Patch /api/v3/stockrooms/{ident}
StockroomsApi ApiV3StockroomsPost Post /api/v3/stockrooms
StockroomsApi ApiV3StockroomsSavedsearchesGet Get /api/v3/stockrooms/savedsearches
StockroomsApi ApiV3StockroomsSavedsearchesIdentGet Get /api/v3/stockrooms/savedsearches/{ident}
SubscriptionsApi ApiV3SubscriptionsGet Get /api/v3/subscriptions
SubscriptionsApi ApiV3SubscriptionsIdentDelete Delete /api/v3/subscriptions/{ident}
SubscriptionsApi ApiV3SubscriptionsIdentGet Get /api/v3/subscriptions/{ident}
SubscriptionsApi ApiV3SubscriptionsIdentPatch Patch /api/v3/subscriptions/{ident}
SubscriptionsApi ApiV3SubscriptionsPost Post /api/v3/subscriptions
UsersApi ApiV3UsersGet Get /api/v3/users
UsersApi ApiV3UsersIdentAssetsGet Get /api/v3/users/{ident}/assets
UsersApi ApiV3UsersIdentChangesHistoryGet Get /api/v3/users/{ident}/changes-history
UsersApi ApiV3UsersIdentDelete Delete /api/v3/users/{ident}
UsersApi ApiV3UsersIdentGet Get /api/v3/users/{ident}
UsersApi ApiV3UsersIdentPatch Patch /api/v3/users/{ident}
UsersApi ApiV3UsersIdentProfileSettingsGet Get /api/v3/users/{ident}/profile_settings
UsersApi ApiV3UsersIdentSoftwareGet Get /api/v3/users/{ident}/software
UsersApi ApiV3UsersIdentSoftwareSaasGet Get /api/v3/users/{ident}/software/saas
UsersApi ApiV3UsersPost Post /api/v3/users
UsersApi ApiV3UsersSavedsearchesGet Get /api/v3/users/savedsearches
UsersApi ApiV3UsersSavedsearchesIdentGet Get /api/v3/users/savedsearches/{ident}

Documentation For Models

Documentation For Authorization

api_key

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

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

basic_auth

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
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

About

AutoGenerated Golang Library based on a modified Oomnitza OpenAPI 3 Spec

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published