All URIs are relative to https://api.notefile.net
| Method | HTTP request | Description |
|---|---|---|
| CreateLegacyWebhookEvent | Post /v1/products/{productUID}/devices/{deviceUID}/webhook-event | |
| CreateWebhook | Post /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | |
| CreateWebhookDeviceEventByProduct | Post /v1/products/{productUID}/webhooks/{webhookUID}/devices/{deviceUID}/event | |
| CreateWebhookEventByProduct | Post /v1/products/{productUID}/webhooks/{webhookUID}/event | |
| DeleteWebhook | Delete /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | |
| GetWebhook | Get /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | |
| GetWebhookSettingsByProduct | Get /v1/products/{productUID}/webhooks/{webhookUID}/settings | |
| GetWebhooks | Get /v1/projects/{projectOrProductUID}/webhooks | |
| UpdateLegacyWebhookSession | Put /v1/products/{productUID}/devices/{deviceUID}/webhook-session | |
| UpdateWebhook | Put /v1/projects/{projectOrProductUID}/webhooks/{webhookUID} | |
| UpdateWebhookSettingsByProduct | Put /v1/products/{productUID}/webhooks/{webhookUID}/settings |
CreateLegacyWebhookEvent(ctx, productUID, deviceUID).RequestBody(requestBody).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
productUID := "com.blues.bridge:sensors" // string |
deviceUID := "dev:000000000000000" // string |
requestBody := map[string]interface{}{"key": interface{}(123)} // map[string]interface{} | A Note-shaped event. Typically contains the notefile name (file), a JSON body, and an optional base64-encoded payload, but any additional Note fields (e.g. when, sn, where_lat, where_lon) are accepted and honored.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WebhookAPI.CreateLegacyWebhookEvent(context.Background(), productUID, deviceUID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.CreateLegacyWebhookEvent``: %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. | |
| productUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiCreateLegacyWebhookEventRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
requestBody | map[string]interface{} | A Note-shaped event. Typically contains the notefile name (file), a JSON body, and an optional base64-encoded payload, but any additional Note fields (e.g. when, sn, where_lat, where_lon) are accepted and honored. |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateWebhook(ctx, projectOrProductUID, webhookUID).WebhookSettings(webhookSettings).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
webhookUID := "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" // string | Webhook UID
webhookSettings := *openapiclient.NewWebhookSettings() // WebhookSettings |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WebhookAPI.CreateWebhook(context.Background(), projectOrProductUID, webhookUID).WebhookSettings(webhookSettings).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.CreateWebhook``: %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. | |
| projectOrProductUID | string | ||
| webhookUID | string | Webhook UID |
Other parameters are passed through a pointer to a apiCreateWebhookRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
webhookSettings | WebhookSettings | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateWebhookDeviceEventByProduct(ctx, productUID, webhookUID, deviceUID).RequestBody(requestBody).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
productUID := "com.blues.bridge:sensors" // string |
webhookUID := "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" // string | Webhook UID
deviceUID := "dev:000000000000000" // string |
requestBody := map[string]interface{}{"key": interface{}(123)} // map[string]interface{} | The event body (arbitrary JSON)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WebhookAPI.CreateWebhookDeviceEventByProduct(context.Background(), productUID, webhookUID, deviceUID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.CreateWebhookDeviceEventByProduct``: %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. | |
| productUID | string | ||
| webhookUID | string | Webhook UID | |
| deviceUID | string |
Other parameters are passed through a pointer to a apiCreateWebhookDeviceEventByProductRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
requestBody | map[string]interface{} | The event body (arbitrary JSON) |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateWebhookEventByProduct(ctx, productUID, webhookUID).RequestBody(requestBody).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
productUID := "com.blues.bridge:sensors" // string |
webhookUID := "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" // string | Webhook UID
requestBody := map[string]interface{}{"key": interface{}(123)} // map[string]interface{} | The event body (arbitrary JSON)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WebhookAPI.CreateWebhookEventByProduct(context.Background(), productUID, webhookUID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.CreateWebhookEventByProduct``: %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. | |
| productUID | string | ||
| webhookUID | string | Webhook UID |
Other parameters are passed through a pointer to a apiCreateWebhookEventByProductRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
requestBody | map[string]interface{} | The event body (arbitrary JSON) |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteWebhook(ctx, projectOrProductUID, webhookUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
webhookUID := "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" // string | Webhook UID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WebhookAPI.DeleteWebhook(context.Background(), projectOrProductUID, webhookUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.DeleteWebhook``: %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. | |
| projectOrProductUID | string | ||
| webhookUID | string | Webhook UID |
Other parameters are passed through a pointer to a apiDeleteWebhookRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSettings GetWebhook(ctx, projectOrProductUID, webhookUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
webhookUID := "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" // string | Webhook UID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhookAPI.GetWebhook(context.Background(), projectOrProductUID, webhookUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.GetWebhook``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWebhook`: WebhookSettings
fmt.Fprintf(os.Stdout, "Response from `WebhookAPI.GetWebhook`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string | ||
| webhookUID | string | Webhook UID |
Other parameters are passed through a pointer to a apiGetWebhookRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WebhookSettings GetWebhookSettingsByProduct(ctx, productUID, webhookUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
productUID := "com.blues.bridge:sensors" // string |
webhookUID := "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" // string | Webhook UID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhookAPI.GetWebhookSettingsByProduct(context.Background(), productUID, webhookUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.GetWebhookSettingsByProduct``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWebhookSettingsByProduct`: WebhookSettings
fmt.Fprintf(os.Stdout, "Response from `WebhookAPI.GetWebhookSettingsByProduct`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| productUID | string | ||
| webhookUID | string | Webhook UID |
Other parameters are passed through a pointer to a apiGetWebhookSettingsByProductRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetWebhooks200Response GetWebhooks(ctx, projectOrProductUID).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhookAPI.GetWebhooks(context.Background(), projectOrProductUID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.GetWebhooks``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWebhooks`: GetWebhooks200Response
fmt.Fprintf(os.Stdout, "Response from `WebhookAPI.GetWebhooks`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectOrProductUID | string |
Other parameters are passed through a pointer to a apiGetWebhooksRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateLegacyWebhookSession(ctx, productUID, deviceUID).RequestBody(requestBody).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
productUID := "com.blues.bridge:sensors" // string |
deviceUID := "dev:000000000000000" // string |
requestBody := map[string]interface{}{"key": interface{}(123)} // map[string]interface{} | Optional session metadata. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WebhookAPI.UpdateLegacyWebhookSession(context.Background(), productUID, deviceUID).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.UpdateLegacyWebhookSession``: %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. | |
| productUID | string | ||
| deviceUID | string |
Other parameters are passed through a pointer to a apiUpdateLegacyWebhookSessionRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
requestBody | map[string]interface{} | Optional session metadata. |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateWebhook(ctx, projectOrProductUID, webhookUID).WebhookSettings(webhookSettings).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
projectOrProductUID := "app:2606f411-dea6-44a0-9743-1130f57d77d8" // string |
webhookUID := "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" // string | Webhook UID
webhookSettings := *openapiclient.NewWebhookSettings() // WebhookSettings |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WebhookAPI.UpdateWebhook(context.Background(), projectOrProductUID, webhookUID).WebhookSettings(webhookSettings).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.UpdateWebhook``: %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. | |
| projectOrProductUID | string | ||
| webhookUID | string | Webhook UID |
Other parameters are passed through a pointer to a apiUpdateWebhookRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
webhookSettings | WebhookSettings | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateWebhookSettingsByProduct(ctx, productUID, webhookUID).WebhookSettings(webhookSettings).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/blues/notehub-go"
)
func main() {
productUID := "com.blues.bridge:sensors" // string |
webhookUID := "Abc_123-2646f411-dc56-44a0-9743-4130f47a74h8" // string | Webhook UID
webhookSettings := *openapiclient.NewWebhookSettings() // WebhookSettings |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.WebhookAPI.UpdateWebhookSettingsByProduct(context.Background(), productUID, webhookUID).WebhookSettings(webhookSettings).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhookAPI.UpdateWebhookSettingsByProduct``: %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. | |
| productUID | string | ||
| webhookUID | string | Webhook UID |
Other parameters are passed through a pointer to a apiUpdateWebhookSettingsByProductRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
webhookSettings | WebhookSettings | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]