All URIs are relative to https://name.eliona.io/v2
Method | HTTP request | Description |
---|---|---|
DeleteAssetTypeByName | Delete /asset-types/{asset-type-name} | Delete an asset type |
GetAssetTypeByName | Get /asset-types/{asset-type-name} | Information about an asset type |
GetAssetTypes | Get /asset-types | List of asset types |
PostAssetType | Post /asset-types | Create an asset type |
PostAssetTypeAttribute | Post /asset-types/{asset-type-name}/attributes | Create asset type attribute |
PutAssetType | Put /asset-types | Create or update an asset type |
PutAssetTypeAttribute | Put /asset-types/{asset-type-name}/attributes | Create or update an asset type attribute |
PutAssetTypeByName | Put /asset-types/{asset-type-name} | Update an asset type |
DeleteAssetTypeByName(ctx, assetTypeName).Execute()
Delete an asset type
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
assetTypeName := "weather_location" // string | The name of the asset type
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AssetTypesAPI.DeleteAssetTypeByName(context.Background(), assetTypeName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssetTypesAPI.DeleteAssetTypeByName``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
assetTypeName | string | The name of the asset type |
Other parameters are passed through a pointer to a apiDeleteAssetTypeByNameRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssetType GetAssetTypeByName(ctx, assetTypeName).Expansions(expansions).Execute()
Information about an asset type
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
assetTypeName := "weather_location" // string | The name of the asset type
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssetTypesAPI.GetAssetTypeByName(context.Background(), assetTypeName).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssetTypesAPI.GetAssetTypeByName``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAssetTypeByName`: AssetType
fmt.Fprintf(os.Stdout, "Response from `AssetTypesAPI.GetAssetTypeByName`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
assetTypeName | string | The name of the asset type |
Other parameters are passed through a pointer to a apiGetAssetTypeByNameRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]AssetType GetAssetTypes(ctx).Expansions(expansions).Execute()
List of asset types
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssetTypesAPI.GetAssetTypes(context.Background()).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssetTypesAPI.GetAssetTypes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAssetTypes`: []AssetType
fmt.Fprintf(os.Stdout, "Response from `AssetTypesAPI.GetAssetTypes`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetAssetTypesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssetType PostAssetType(ctx).AssetType(assetType).Expansions(expansions).Execute()
Create an asset type
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
assetType := *openapiclient.NewAssetType("weather_location") // AssetType |
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssetTypesAPI.PostAssetType(context.Background()).AssetType(assetType).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssetTypesAPI.PostAssetType``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostAssetType`: AssetType
fmt.Fprintf(os.Stdout, "Response from `AssetTypesAPI.PostAssetType`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPostAssetTypeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
assetType | AssetType | ||
expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssetTypeAttribute PostAssetTypeAttribute(ctx, assetTypeName).AssetTypeAttribute(assetTypeAttribute).Execute()
Create asset type attribute
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
assetTypeName := "weather_location" // string | The name of the asset type
assetTypeAttribute := *openapiclient.NewAssetTypeAttribute("temperature", openapiclient.DataSubtype("input")) // AssetTypeAttribute |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssetTypesAPI.PostAssetTypeAttribute(context.Background(), assetTypeName).AssetTypeAttribute(assetTypeAttribute).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssetTypesAPI.PostAssetTypeAttribute``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostAssetTypeAttribute`: AssetTypeAttribute
fmt.Fprintf(os.Stdout, "Response from `AssetTypesAPI.PostAssetTypeAttribute`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
assetTypeName | string | The name of the asset type |
Other parameters are passed through a pointer to a apiPostAssetTypeAttributeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
assetTypeAttribute | AssetTypeAttribute | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssetType PutAssetType(ctx).AssetType(assetType).Expansions(expansions).Execute()
Create or update an asset type
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
assetType := *openapiclient.NewAssetType("weather_location") // AssetType |
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssetTypesAPI.PutAssetType(context.Background()).AssetType(assetType).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssetTypesAPI.PutAssetType``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutAssetType`: AssetType
fmt.Fprintf(os.Stdout, "Response from `AssetTypesAPI.PutAssetType`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPutAssetTypeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
assetType | AssetType | ||
expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssetTypeAttribute PutAssetTypeAttribute(ctx, assetTypeName).AssetTypeAttribute(assetTypeAttribute).Execute()
Create or update an asset type attribute
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
assetTypeName := "weather_location" // string | The name of the asset type
assetTypeAttribute := *openapiclient.NewAssetTypeAttribute("temperature", openapiclient.DataSubtype("input")) // AssetTypeAttribute |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssetTypesAPI.PutAssetTypeAttribute(context.Background(), assetTypeName).AssetTypeAttribute(assetTypeAttribute).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssetTypesAPI.PutAssetTypeAttribute``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutAssetTypeAttribute`: AssetTypeAttribute
fmt.Fprintf(os.Stdout, "Response from `AssetTypesAPI.PutAssetTypeAttribute`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
assetTypeName | string | The name of the asset type |
Other parameters are passed through a pointer to a apiPutAssetTypeAttributeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
assetTypeAttribute | AssetTypeAttribute | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AssetType PutAssetTypeByName(ctx, assetTypeName).AssetType(assetType).Expansions(expansions).Execute()
Update an asset type
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
assetTypeName := "weather_location" // string | The name of the asset type
assetType := *openapiclient.NewAssetType("weather_location") // AssetType |
expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AssetTypesAPI.PutAssetTypeByName(context.Background(), assetTypeName).AssetType(assetType).Expansions(expansions).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AssetTypesAPI.PutAssetTypeByName``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutAssetTypeByName`: AssetType
fmt.Fprintf(os.Stdout, "Response from `AssetTypesAPI.PutAssetTypeByName`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
assetTypeName | string | The name of the asset type |
Other parameters are passed through a pointer to a apiPutAssetTypeByNameRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
assetType | AssetType | | expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]