Custom Roles API

returns all users for role

GET /api/v1/custom_roles/:id/users

Parameters

Name Description
id id
name role's name

Request

Headers

Accept: application/json
X-Api-Token: zz-w9Qaxznxv1dKr4YWXx-iENsT1W1iDTg
X-Api-Email: user-316@example.com

Route

GET /api/v1/custom_roles/6/users

Query Parameters

{}: 

cURL

curl "http://localhost:3000/api/v1/custom_roles/6/users" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: zz-w9Qaxznxv1dKr4YWXx-iENsT1W1iDTg" \
	-H "X-Api-Email: user-316@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1389

Status

200 OK

Body

{
  "users": [
    {
      "id": 676,
      "email": "user-317@example.com",
      "created_at": "2019-10-31T22:03:40Z",
      "updated_at": "2019-10-31T22:03:40Z",
      "school_id": 342,
      "is_author": false,
      "is_affiliate": false,
      "is_student": true,
      "is_owner": false,
      "is_active": true,
      "authentication_token": "ysN2x84zm3stszmhxCW-R2RzAkTu85k2PA",
      "last_four": null,
      "card_type": null,
      "stripe_token": null,
      "paypal_token": null,
      "name": "User Name",
      "affiliate_revenue_share": null,
      "days_cookie_valid": null,
      "affiliate_code": "342_63oshdaa",
      "notes": null,
      "last_touch": null,
      "referring_domain": null,
      "first_touch": null,
      "legacy_id": null,
      "country": null,
      "legacy_sales": null,
      "src": null,
      "joined_at": "2019-10-31T22:03:40Z",
      "transactions_gross": 0,
      "signed_up_affiliate_code": null,
      "last_sign_out_at": null,
      "unsubscribe_from_marketing_emails": null,
      "destroy_memo": null,
      "destroyed_email_hash": null,
      "destroyer_id": null,
      "destroyed_at": null,
      "author_revenue_share": 0.0,
      "non_devise_password": {
      },
      "agreed_to_terms": true,
      "external_registration": null,
      "record_source": null,
      "teachable_account_id": null,
      "created_by_teachable_account": null,
      "payout_method": null,
      "destroyer_type": null,
      "payment_method_migrated": "2019-10-31T22:03:40Z",
      "is_staff_user": null,
      "active_payout_method_id": null,
      "allowed_manual_wire_payouts": null,
      "allowed_manual_ach_payouts": null,
      "primary_owner_confirmation_token": null,
      "current_impersonated_user_id": null,
      "read_only_staff_user": null,
      "paypal_email": null
    }
  ],
  "count": 1
}