Skip to content
  • Auto
  • Light
  • Dark
Get Started

Retrieve

Get
client.Users.Get(ctx, id) (*ExpandedarrayUserViewUserViewUserGetResponse, error)
get/api/v1/users/{id}

Get a user by ID.

Parameters
idstring

The id field.

Returns
UserGetResponsestruct

The UserServiceGetResponse returns a user view which has a user including JSONPATHs to the expanded items in the expanded array.

Hide ParametersShow Parameters
Expandedarray
optional

List of serialized related objects.

Hide ParametersShow Parameters
Typestring
optional

The type of the serialized message.

UserViewDelegatedUserPathstringDirectoriesPathstringManagersPathstringRolesPathstringUserC1APIUserV1UserUserView
optional

The UserView object provides a user response object, as well as JSONPATHs to related objects provided by expanders.

Request example Go
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := conductoronesdk.NewClient(
    option.WithAPIKey("My API Key"),
  )
  user, err := client.Users.Get(context.TODO(), "id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", user.Expanded)
}
200 Example
{
  "expanded": [
    {
      "@type": "@type"
    }
  ],
  "userView": {
    "user": {
      "delegatedUserId": "delegatedUserId",
      "roleIds": [
        "string"
      ],
      "status": "UNKNOWN"
    }
  }
}