All URIs are relative to https://api.lab5e.com
Method | HTTP request | Description |
---|---|---|
CreateCertificate | Post /span/collections/{collectionId}/certificates/create | Create certificate |
RetrieveCertificateChain | Get /span/collections/{collectionId}/certificates | Get certificate chain |
SignCertificate | Post /span/collections/{collectionId}/certificates/sign | Sign certificate |
VerifyCertificate | Post /span/collections/{collectionId}/certificates/verify | Verify certificate |
CreateCertificateResponse CreateCertificate(ctx, collectionId).Body(body).Execute()
Create certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
collectionId := "collectionId_example" // string |
body := *openapiclient.NewCreateCertificateBody() // CreateCertificateBody |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesApi.CreateCertificate(context.Background(), collectionId).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesApi.CreateCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateCertificate`: CreateCertificateResponse
fmt.Fprintf(os.Stdout, "Response from `CertificatesApi.CreateCertificate`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string |
Other parameters are passed through a pointer to a apiCreateCertificateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
body | CreateCertificateBody | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CertificateChainResponse RetrieveCertificateChain(ctx, collectionId).GatewayId(gatewayId).DeviceId(deviceId).Execute()
Get certificate chain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
collectionId := "collectionId_example" // string |
gatewayId := "gatewayId_example" // string | (optional)
deviceId := "deviceId_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesApi.RetrieveCertificateChain(context.Background(), collectionId).GatewayId(gatewayId).DeviceId(deviceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesApi.RetrieveCertificateChain``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RetrieveCertificateChain`: CertificateChainResponse
fmt.Fprintf(os.Stdout, "Response from `CertificatesApi.RetrieveCertificateChain`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string |
Other parameters are passed through a pointer to a apiRetrieveCertificateChainRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
gatewayId | string | | deviceId | string | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SignCertificateResponse SignCertificate(ctx, collectionId).Body(body).Execute()
Sign certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
collectionId := "collectionId_example" // string |
body := *openapiclient.NewSignCertificateBody() // SignCertificateBody |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesApi.SignCertificate(context.Background(), collectionId).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesApi.SignCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SignCertificate`: SignCertificateResponse
fmt.Fprintf(os.Stdout, "Response from `CertificatesApi.SignCertificate`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string |
Other parameters are passed through a pointer to a apiSignCertificateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
body | SignCertificateBody | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VerifyCertificateResponse VerifyCertificate(ctx, collectionId).Body(body).Execute()
Verify certificate
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/lab5e/go-spanapi"
)
func main() {
collectionId := "collectionId_example" // string |
body := *openapiclient.NewVerifyCertificateBody() // VerifyCertificateBody |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CertificatesApi.VerifyCertificate(context.Background(), collectionId).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CertificatesApi.VerifyCertificate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `VerifyCertificate`: VerifyCertificateResponse
fmt.Fprintf(os.Stdout, "Response from `CertificatesApi.VerifyCertificate`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collectionId | string |
Other parameters are passed through a pointer to a apiVerifyCertificateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
body | VerifyCertificateBody | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]