Skip to content

Latest commit

 

History

History
434 lines (279 loc) · 16.2 KB

File metadata and controls

434 lines (279 loc) · 16.2 KB

\AuthenticationAPI

All URIs are relative to https://all.api.keil.arm.com

Method HTTP request Description
CreateUser Post /users/ Create a user.
GetMe Get /users/me Get my user information
GetUser Get /users/{userName} Get user information
InviteUser Post /users/invite Invite a user.
ListUsers Get /users/ List all users
TokenIntrospect Post /token/introspect Introspect a token.

CreateUser

UserItem CreateUser(ctx).UserItem(userItem).AcceptVersion(acceptVersion).Execute()

Create a user.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ARM-software/embedded-development-services-client/client"
)

func main() {
	userItem := *openapiclient.NewUserItem(*openapiclient.NewUserItemLinks(*openapiclient.NewHalLinkData("/endpoint/?limit=20&offset=0")), "TODO", "854f1167-e1f6-4182-a051-f83a8d588a47") // UserItem | Data required to create a new user.
	acceptVersion := "1.0.0" // string | Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning. (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
userItem UserItem Data required to create a new user.
acceptVersion string Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning.

Return type

UserItem

Authorization

TokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

GetMe

UserItem GetMe(ctx).AcceptVersion(acceptVersion).Execute()

Get my user information

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ARM-software/embedded-development-services-client/client"
)

func main() {
	acceptVersion := "1.0.0" // string | Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning. (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
acceptVersion string Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning.

Return type

UserItem

Authorization

TokenAuth

HTTP request headers

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

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

GetUser

UserItem GetUser(ctx, userName).AcceptVersion(acceptVersion).Execute()

Get user information

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ARM-software/embedded-development-services-client/client"
)

func main() {
	userName := "userName_example" // string | The identifier of the user.
	acceptVersion := "1.0.0" // string | Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning. (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
userName string The identifier of the user.

Other Parameters

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

Name Type Description Notes

acceptVersion | string | Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning. |

Return type

UserItem

Authorization

TokenAuth

HTTP request headers

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

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

InviteUser

UserItem InviteUser(ctx).UserInviteItem(userInviteItem).AcceptVersion(acceptVersion).Execute()

Invite a user.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ARM-software/embedded-development-services-client/client"
)

func main() {
	userInviteItem := *openapiclient.NewUserInviteItem("johndoe@doe.com") // UserInviteItem | Data required to invite a new user.
	acceptVersion := "1.0.0" // string | Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning. (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
userInviteItem UserInviteItem Data required to invite a new user.
acceptVersion string Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning.

Return type

UserItem

Authorization

TokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

ListUsers

UserCollection ListUsers(ctx).AcceptVersion(acceptVersion).Embed(embed).IfNoneMatch(ifNoneMatch).Limit(limit).Offset(offset).Execute()

List all users

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ARM-software/embedded-development-services-client/client"
)

func main() {
	acceptVersion := "1.0.0" // string | Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning. (optional)
	embed := false // bool | Embedding: The whether or not to embed resources into the collection (rather than return links). (optional) (default to false)
	ifNoneMatch := "ifNoneMatch_example" // string | Caching: Optional header to improve performance. The value of this header should be the `ETag` of the resource when last read. If this is provided and there have been no changes to the resource then a 304 will be returned without content. (optional)
	limit := int32(20) // int32 | Paging: The maximum number of items to return in a resource. (optional) (default to 20)
	offset := int32(0) // int32 | Paging:  The index of the first item to return in the resource. (optional) (default to 0)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AuthenticationAPI.ListUsers(context.Background()).AcceptVersion(acceptVersion).Embed(embed).IfNoneMatch(ifNoneMatch).Limit(limit).Offset(offset).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.ListUsers``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListUsers`: UserCollection
	fmt.Fprintf(os.Stdout, "Response from `AuthenticationAPI.ListUsers`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
acceptVersion string Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning.
embed bool Embedding: The whether or not to embed resources into the collection (rather than return links). [default to false]
ifNoneMatch string Caching: Optional header to improve performance. The value of this header should be the `ETag` of the resource when last read. If this is provided and there have been no changes to the resource then a 304 will be returned without content.
limit int32 Paging: The maximum number of items to return in a resource. [default to 20]
offset int32 Paging: The index of the first item to return in the resource. [default to 0]

Return type

UserCollection

Authorization

TokenAuth

HTTP request headers

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

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

TokenIntrospect

TokenIntrospectionResponseItem TokenIntrospect(ctx).TokenIntrospectionRequestItem(tokenIntrospectionRequestItem).AcceptVersion(acceptVersion).Execute()

Introspect a token.

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/ARM-software/embedded-development-services-client/client"
)

func main() {
	tokenIntrospectionRequestItem := *openapiclient.NewTokenIntrospectionRequestItem("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...") // TokenIntrospectionRequestItem | Data required to introspect a token.
	acceptVersion := "1.0.0" // string | Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning. (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
tokenIntrospectionRequestItem TokenIntrospectionRequestItem Data required to introspect a token.
acceptVersion string Versioning: Optional header to request a specific version of the API. While it is possible to specify a particular major, minor or patch version it is not recommended for production use cases. Only the major version number should be specified as minor and patch versions can be updated without warning.

Return type

TokenIntrospectionResponseItem

Authorization

TokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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