Files

32 KiB

\TrustAPI

All URIs are relative to https://api.hanzo.ai

Method HTTP request Description
DeleteTrustByKindById Delete /v1/trust/{kind}/{id} Removes one record from a section of your organization's trust centre.
GetTrust Get /v1/trust Reads YOUR organization's whole trust centre, including the addresses of your own gated documents.
GetTrustControls Get /v1/trust/controls Lists every control your organization publishes, with the counts.
GetTrustControlsById Get /v1/trust/controls/{id} Reads one control by id.
GetTrustCoverage Get /v1/trust/coverage Reads coverage: per framework, how many clauses have an automated control behind them, how many are partial, and how many have none — each carrying the unit it is counted in, because "12 of 20" is not a fact until you know what the 20 are.
GetTrustCoverageByFramework Get /v1/trust/coverage/{framework} Reads one framework clause by clause: every clause the standard publishes, what covers it, and which controls stand behind it — so a coverage number can be checked line by line rather than taken on trust.
GetTrustDocuments Get /v1/trust/documents Lists your organization's documents.
GetTrustEvidence Get /v1/trust/evidence Reads the audit rows that stand behind one control, over a window.
GetTrustFaq Get /v1/trust/faq Lists your knowledge base — the questions a reviewer asks, answered once.
GetTrustFrameworks Get /v1/trust/frameworks Lists the frameworks coverage is computed against, and how many clauses each publishes.
GetTrustPolicies Get /v1/trust/policies Lists your organization's published policies.
GetTrustProfile Get /v1/trust/profile Reads your organization's trust-centre profile — the name, tagline and summary a visitor sees, whether the centre is published, and where to send somebody who wants a gated document.
GetTrustPublishedByOrg Get /v1/trust/published/{org} Reads a published trust centre — the whole thing in one answer: the organization's profile, its control inventory, coverage computed against each framework's whole published clause list, its documents, subprocessors, policies, knowledge base, updates and risk profile.
GetTrustRisk Get /v1/trust/risk Reads your risk profile — the label and value pairs describing what your organization handles and how.
GetTrustSubprocessors Get /v1/trust/subprocessors Lists the third parties your organization sends data to, each naming what it is for.
GetTrustUpdates Get /v1/trust/updates Lists your trust-centre updates, newest as you ordered them.
PutTrustByKindById Put /v1/trust/{kind}/{id} Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk.

DeleteTrustByKindById

TrustDropped DeleteTrustByKindById(ctx, kind, id).Execute()

Removes one record from a section of your organization's trust centre.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	kind := "faq" // string | Kind is the section — profile, control, document, subprocessor, policy, faq, update or risk. Anything else is not found. The URL is the authority: a value here is bound from the path, which zip binds last.
	id := "where-is-data-held" // string | ID is the record's id within that section. The single-valued sections (profile, risk) hold one record whatever id is named.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.DeleteTrustByKindById(context.Background(), kind, id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.DeleteTrustByKindById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DeleteTrustByKindById`: TrustDropped
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.DeleteTrustByKindById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
kind string Kind is the section — profile, control, document, subprocessor, policy, faq, update or risk. Anything else is not found. The URL is the authority: a value here is bound from the path, which zip binds last.
id string ID is the record's id within that section. The single-valued sections (profile, risk) hold one record whatever id is named.

Other Parameters

Other parameters are passed through a pointer to a apiDeleteTrustByKindByIdRequest struct via the builder pattern

Name Type Description Notes

Return type

TrustDropped

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrust

TrustCentre GetTrust(ctx).Execute()

Reads YOUR organization's whole trust centre, including the addresses of your own gated documents.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrust(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrust``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrust`: TrustCentre
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrust`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustRequest struct via the builder pattern

Return type

TrustCentre

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustControls

TrustControlList GetTrustControls(ctx).Execute()

Lists every control your organization publishes, with the counts.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustControls(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustControls``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustControls`: TrustControlList
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustControls`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustControlsRequest struct via the builder pattern

Return type

TrustControlList

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustControlsById

interface{} GetTrustControlsById(ctx, id).Execute()

Reads one control by id.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	id := "iam.pkce.s256" // string | ID is the control's id, dotted lowercase — \"iam.pkce.s256\".

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustControlsById(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustControlsById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustControlsById`: interface{}
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustControlsById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID is the control's id, dotted lowercase — "iam.pkce.s256".

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustControlsByIdRequest struct via the builder pattern

Name Type Description Notes

Return type

interface{}

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustCoverage

TrustTrustCoverage GetTrustCoverage(ctx).Execute()

Reads coverage: per framework, how many clauses have an automated control behind them, how many are partial, and how many have none — each carrying the unit it is counted in, because "12 of 20" is not a fact until you know what the 20 are.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustCoverage(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustCoverage``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustCoverage`: TrustTrustCoverage
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustCoverage`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustCoverageRequest struct via the builder pattern

Return type

TrustTrustCoverage

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustCoverageByFramework

TrustClauseCoverage GetTrustCoverageByFramework(ctx, framework).Execute()

Reads one framework clause by clause: every clause the standard publishes, what covers it, and which controls stand behind it — so a coverage number can be checked line by line rather than taken on trust.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	framework := "soc2" // string | Framework is the framework id — \"soc2\", \"iso27001\", \"nist80053\".

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustCoverageByFramework(context.Background(), framework).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustCoverageByFramework``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustCoverageByFramework`: TrustClauseCoverage
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustCoverageByFramework`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
framework string Framework is the framework id — "soc2", "iso27001", "nist80053".

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustCoverageByFrameworkRequest struct via the builder pattern

Name Type Description Notes

Return type

TrustClauseCoverage

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustDocuments

TrustTrustDocuments GetTrustDocuments(ctx).Execute()

Lists your organization's documents.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustDocuments(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustDocuments``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustDocuments`: TrustTrustDocuments
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustDocuments`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustDocumentsRequest struct via the builder pattern

Return type

TrustTrustDocuments

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustEvidence

interface{} GetTrustEvidence(ctx).Control(control).From(from).To(to).Limit(limit).Execute()

Reads the audit rows that stand behind one control, over a window.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	control := "iam.refresh.rotation" // string | Control is the control id whose trail to read. Required. (optional)
	from := "2026-01-01" // string | From is the inclusive lower bound, an RFC 3339 date or instant (\"2026-01-01\" or \"2026-01-01T00:00:00Z\"). Empty leaves it unbounded. A malformed bound is refused rather than silently widening the window. (optional)
	to := "to_example" // string | To is the upper bound, same form and same tolerance. (optional)
	limit := "50" // string | Limit caps the rows returned, 1..1000, default 100. It is a string because an unparseable value is refused rather than read as zero. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustEvidence(context.Background()).Control(control).From(from).To(to).Limit(limit).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustEvidence``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustEvidence`: interface{}
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustEvidence`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustEvidenceRequest struct via the builder pattern

Name Type Description Notes
control string Control is the control id whose trail to read. Required.
from string From is the inclusive lower bound, an RFC 3339 date or instant ("2026-01-01" or "2026-01-01T00:00:00Z"). Empty leaves it unbounded. A malformed bound is refused rather than silently widening the window.
to string To is the upper bound, same form and same tolerance.
limit string Limit caps the rows returned, 1..1000, default 100. It is a string because an unparseable value is refused rather than read as zero.

Return type

interface{}

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustFaq

TrustFaqList GetTrustFaq(ctx).Execute()

Lists your knowledge base — the questions a reviewer asks, answered once.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustFaq(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustFaq``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustFaq`: TrustFaqList
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustFaq`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustFaqRequest struct via the builder pattern

Return type

TrustFaqList

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustFrameworks

TrustFrameworkList GetTrustFrameworks(ctx).Execute()

Lists the frameworks coverage is computed against, and how many clauses each publishes.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustFrameworks(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustFrameworks``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustFrameworks`: TrustFrameworkList
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustFrameworks`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustFrameworksRequest struct via the builder pattern

Return type

TrustFrameworkList

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustPolicies

TrustPolicyList GetTrustPolicies(ctx).Execute()

Lists your organization's published policies.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustPolicies(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustPolicies``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustPolicies`: TrustPolicyList
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustPolicies`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustPoliciesRequest struct via the builder pattern

Return type

TrustPolicyList

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustProfile

interface{} GetTrustProfile(ctx).Execute()

Reads your organization's trust-centre profile — the name, tagline and summary a visitor sees, whether the centre is published, and where to send somebody who wants a gated document.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustProfile(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustProfile``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustProfile`: interface{}
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustProfile`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustProfileRequest struct via the builder pattern

Return type

interface{}

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustPublishedByOrg

TrustCentre GetTrustPublishedByOrg(ctx, org).Execute()

Reads a published trust centre — the whole thing in one answer: the organization's profile, its control inventory, coverage computed against each framework's whole published clause list, its documents, subprocessors, policies, knowledge base, updates and risk profile.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	org := "hanzo" // string | Org is the organization's slug — the name in its address.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustPublishedByOrg(context.Background(), org).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustPublishedByOrg``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustPublishedByOrg`: TrustCentre
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustPublishedByOrg`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
org string Org is the organization's slug — the name in its address.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustPublishedByOrgRequest struct via the builder pattern

Name Type Description Notes

Return type

TrustCentre

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustRisk

interface{} GetTrustRisk(ctx).Execute()

Reads your risk profile — the label and value pairs describing what your organization handles and how.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustRisk(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustRisk``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustRisk`: interface{}
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustRisk`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustRiskRequest struct via the builder pattern

Return type

interface{}

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustSubprocessors

TrustSubprocessorList GetTrustSubprocessors(ctx).Execute()

Lists the third parties your organization sends data to, each naming what it is for.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustSubprocessors(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustSubprocessors``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustSubprocessors`: TrustSubprocessorList
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustSubprocessors`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustSubprocessorsRequest struct via the builder pattern

Return type

TrustSubprocessorList

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTrustUpdates

TrustUpdateList GetTrustUpdates(ctx).Execute()

Lists your trust-centre updates, newest as you ordered them.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.GetTrustUpdates(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.GetTrustUpdates``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetTrustUpdates`: TrustUpdateList
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.GetTrustUpdates`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTrustUpdatesRequest struct via the builder pattern

Return type

TrustUpdateList

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutTrustByKindById

TrustWritten PutTrustByKindById(ctx, kind, id).TrustSectionWrite(trustSectionWrite).Execute()

Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/hanzoai/go-sdk/v8"
)

func main() {
	kind := "subprocessor" // string | Kind is the section being written. The URL is the authority.
	id := "acme-cloud" // string | ID is the record's id. Omit it on a create and one is minted; the single-valued sections (profile, risk) hold one record whatever is named.
	trustSectionWrite := *openapiclient.NewTrustSectionWrite() // TrustSectionWrite | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.TrustAPI.PutTrustByKindById(context.Background(), kind, id).TrustSectionWrite(trustSectionWrite).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TrustAPI.PutTrustByKindById``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PutTrustByKindById`: TrustWritten
	fmt.Fprintf(os.Stdout, "Response from `TrustAPI.PutTrustByKindById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
kind string Kind is the section being written. The URL is the authority.
id string ID is the record's id. Omit it on a create and one is minted; the single-valued sections (profile, risk) hold one record whatever is named.

Other Parameters

Other parameters are passed through a pointer to a apiPutTrustByKindByIdRequest struct via the builder pattern

Name Type Description Notes

trustSectionWrite | TrustSectionWrite | |

Return type

TrustWritten

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]