Skip to main content

Get user role pairings

GET 

https://acmeco.nonemployee.com/api/user_roles

This endpoint can retrieve user role pairings from Lifecycle or you can search for user role pairings using parameters

Request

Query Parameters

    query object

    Allows for pagination and sorting.

    user_id uuid

    The ID of a user for filtering

    role_id uuid

    The ID of a role for filtering

    metadata boolean

    Returns batching metadata in the response. This includes total as the total quantity, next as the path of the following query url, limit and after_id (if requested) with the next following id (null if it is the last "page").

    Default value: false

Responses

Expected response to a valid request

Schema
    user_roles object[]
  • Array [
  • iduuid
    uidstring

    Possible values: >= 32 characters and <= 32 characters

    user_iduuid
    role_iduuid
  • ]
  • _metadata object
    limitinteger
    offsetinteger
    totalinteger
    nextstring
    Example: /endpoint?limit=10&offset=60
    previousstring
    Example: /endpoint?limit=10&offset=40

Authorization: http

name: bearerAuthtype: httpscheme: bearerbearerFormat: Token token=your token
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://acmeco.nonemployee.com/api/user_roles"
method := "GET"

client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)

if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <TOKEN>")

res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()

body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Request Collapse all
Base URL
https://acmeco.nonemployee.com/api
Auth
Parameters
— query
— query
— query
— query
ResponseClear

Click the Send API Request button above and see the response here!