Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Latest commit

 

History

History
421 lines (263 loc) · 9.96 KB

TeamsApi.md

File metadata and controls

421 lines (263 loc) · 9.96 KB

\TeamsApi

All URIs are relative to https://app.corellium.com/api

Method HTTP request Description
V1AddUserToTeam Put /v1/teams/{teamId}/users/{userId} Add user to team
V1RemoveUserFromTeam Delete /v1/teams/{teamId}/users/{userId} Remove user from team
V1TeamChange Patch /v1/teams/{teamId} Update team
V1TeamCreate Post /v1/teams Create team
V1TeamDelete Delete /v1/teams/{teamId} Delete team
V1Teams Get /v1/teams Get teams

V1AddUserToTeam

V1AddUserToTeam(ctx, teamId, userId).Execute()

Add user to team

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/aimoda/go-corellium-api-client"
)

func main() {
    teamId := "teamId_example" // string | Team ID - uuid
    userId := "userId_example" // string | User ID - uuid

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.TeamsApi.V1AddUserToTeam(context.Background(), teamId, userId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.V1AddUserToTeam``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamId string Team ID - uuid
userId string User ID - uuid

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

BearerAuth

HTTP request headers

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

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

V1RemoveUserFromTeam

V1RemoveUserFromTeam(ctx, teamId, userId).Execute()

Remove user from team

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/aimoda/go-corellium-api-client"
)

func main() {
    teamId := "teamId_example" // string | Team ID - uuid
    userId := "userId_example" // string | User ID - uuid

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.TeamsApi.V1RemoveUserFromTeam(context.Background(), teamId, userId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.V1RemoveUserFromTeam``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamId string Team ID - uuid
userId string User ID - uuid

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

BearerAuth

HTTP request headers

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

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

V1TeamChange

V1TeamChange(ctx, teamId).CreateTeam(createTeam).Execute()

Update team

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/aimoda/go-corellium-api-client"
)

func main() {
    teamId := "teamId_example" // string | Team ID - uuid
    createTeam := *openapiclient.NewCreateTeam("Name_example") // CreateTeam | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.TeamsApi.V1TeamChange(context.Background(), teamId).CreateTeam(createTeam).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.V1TeamChange``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamId string Team ID - uuid

Other Parameters

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

Name Type Description Notes

createTeam | CreateTeam | |

Return type

(empty response body)

Authorization

BearerAuth

HTTP request headers

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

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

V1TeamCreate

TeamCreate V1TeamCreate(ctx).CreateTeam(createTeam).Execute()

Create team

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/aimoda/go-corellium-api-client"
)

func main() {
    createTeam := *openapiclient.NewCreateTeam("Name_example") // CreateTeam | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
createTeam CreateTeam

Return type

TeamCreate

Authorization

BearerAuth

HTTP request headers

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

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

V1TeamDelete

V1TeamDelete(ctx, teamId).Execute()

Delete team

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/aimoda/go-corellium-api-client"
)

func main() {
    teamId := "teamId_example" // string | Team ID - uuid

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.TeamsApi.V1TeamDelete(context.Background(), teamId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.V1TeamDelete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamId string Team ID - uuid

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

BearerAuth

HTTP request headers

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

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

V1Teams

[]Team V1Teams(ctx).Execute()

Get teams

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/aimoda/go-corellium-api-client"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]Team

Authorization

BearerAuth

HTTP request headers

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

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