Skip to main content
GET
/
roles
/
{role_id}
Go (SDK)
package main

import(
	"context"
	"os"
	latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
	"log"
)

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

    s := latitudeshgosdk.New(
        latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
    )

    res, err := s.Roles.Get(ctx, "role_LMmAD8vldwop2")
    if err != nil {
        log.Fatal(err)
    }
    if res.Role != nil {
        // handle response
    }
}
{
  "data": {
    "id": "role_LMmAD8vldwop2",
    "type": "roles",
    "attributes": {
      "name": "billing"
    }
  },
  "meta": {}
}

Authorizations

Authorization
string
header
required

Path Parameters

role_id
string
required

Response

200 - application/vnd.api+json

Success

data
object
meta
object