circle-info
Squadcast is now SolarWinds Incident Response

Users

Overview

Available Operations

GetAll

Returns all the users of the organization. Requires access_token as a Bearer {{token}} in the Authorization header with read scope.

Example Usage

package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_BEARER_AUTH")),
    )

    res, err := s.Users.GetAll(ctx)
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

opts

The options for this request.

Response

*operations.UsersGetAllUsersResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

Add

Add user to the organization with given role if not exists. Returns the user object in response. Requires access_token as a Bearer {{token}} in the Authorization header with user-write scope.

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

request

✔️

The request object to use for the request.

opts

The options for this request.

Response

*operations.UsersAddUserResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

UpdateOrgLevelPermissions

Update Org Level Permissions

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

request

✔️

The request object to use for the request.

opts

The options for this request.

Response

*operations.UsersUpdateOrgLevelPermissionsResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

Delete

This API replaces the swap_user for all the entities in Squadcast with user_id provided and deletes the user.

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

request

✔️

The request object to use for the request.

opts

The options for this request.

Response

*operations.UsersDeleteUserResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

GetRoles

Returns all available user roles. Requires access_token as a Bearer {{token}} in the Authorization header with read scope.

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

opts

The options for this request.

Response

*operations.UsersGetUserRolesResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

RemoveFromOrg

Remove user from organization. Upon sccess the user will be removed from the organization. Requires access_token as a Bearer {{token}} in the Authorization header with user-write scope.

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

userID

string

✔️

(Required) user id

opts

The options for this request.

Response

*operations.UsersRemoveUserFromOrgResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

GetByID

Returns a users details of the given userID in the request param. Requires access_token as a Bearer {{token}} in the Authorization header with read scope.

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

userID

string

✔️

(Required) user id

opts

The options for this request.

Response

*operations.UsersGetUserByIDResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

Update

Update User by userID. Requires access_token as a Bearer {{token}} in the Authorization header with user-write scope.

Example Usage

Parameters

Parameter
Type
Required
Description

ctx

✔️

The context to use for the request.

userID

string

✔️

(Required) user id

v3UsersUpdateUserRequest

✔️

N/A

opts

The options for this request.

Response

*operations.UsersUpdateUserByIDResponse, error

Errors

Error Type
Status Code
Content Type

apierrors.BadRequestError

400

application/json

apierrors.UnauthorizedError

401

application/json

apierrors.PaymentRequiredError

402

application/json

apierrors.ForbiddenError

403

application/json

apierrors.NotFoundError

404

application/json

apierrors.ConflictError

409

application/json

apierrors.UnprocessableEntityError

422

application/json

apierrors.InternalServerError

500

application/json

apierrors.BadGatewayError

502

application/json

apierrors.ServiceUnavailableError

503

application/json

apierrors.GatewayTimeoutError

504

application/json

apierrors.APIError

4XX, 5XX

*/*

Last updated