Skip to content

Latest commit

 

History

History
77 lines (48 loc) · 2.53 KB

File metadata and controls

77 lines (48 loc) · 2.53 KB

\RegisterAPI

All URIs are relative to https://api.uptrends.com/v4

Method HTTP request Description
RegisterCreateApiUser Post /Register Creates a new API account.

RegisterCreateApiUser

RegistrationResponse RegisterCreateApiUser(ctx).Description(description).OperatorGuid(operatorGuid).Execute()

Creates a new API account.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/JetManiack/go-uptrends-api"
)

func main() {
	description := "description_example" // string | An optional description for the new API account, e.g. \"API\". If this is empty, it will be defaulted to \"API\" (optional) (default to "API")
	operatorGuid := "operatorGuid_example" // string | The operator guid for which the new API account needs to be created. Leave empty to create an API acount for your own operator. (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
description string An optional description for the new API account, e.g. "API". If this is empty, it will be defaulted to "API" [default to "API"]
operatorGuid string The operator guid for which the new API account needs to be created. Leave empty to create an API acount for your own operator.

Return type

RegistrationResponse

Authorization

user-basicauth

HTTP request headers

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

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