Aura.Orgs (Aura v0.9.3)
View SourceService module for interacting with Hex Organizations
๐ Resources
- ๐ Hex
- ๐ Hex API Specifications
- ๐พ hexpm/hex_core
- ๐พ hexpm/hexpm
- ๐ฌ Contact the maintainer (he's happy to help!)
Summary
Functions
Adds a user to an org with a given role
Changes a user's role to new_role
Grabs an organization, given an org_name
Grabs an org member, given their org_name and username
Grabs a list of members to an organization, given an org_name
Lists all the organizations the requester can see
Removes a user to an org
Streams audit logs, scoped to an organization
Functions
Adds a user to an org with a given role
๐ท๏ธ Params
- opts :: option parameters used to modify requests
- role ::
Aura.Model.HexOrgMember.role/0
- username ::
Aura.Common.username/0
- org_name ::
Aura.Common.org_name/0
โคต๏ธ Returns
โ On Success
{:ok, %HexOrgMember{...}}
โ On Failure
{:error, (some error)}
๐ฉโ๐ป API Details
Method | Path | Controller | Action |
---|---|---|---|
POST | /orgs/:org_name/members | OrganizationUserController | :create |
Changes a user's role to new_role
๐ท๏ธ Params
- opts :: option parameters used to modify requests
- username ::
Aura.Common.username/0
- org_name ::
Aura.Common.org_name/0
- new_role ::
Aura.Model.HexOrgMember.role/0
โคต๏ธ Returns
โ On Success
{:ok, %HexOrgMember{...}}
โ On Failure
{:error, (some error)}
๐ฉโ๐ป API Details
Method | Path | Controller | Action |
---|---|---|---|
POST | /orgs/:org_name/members/:username | OrganizationUserController | :update |
Grabs an organization, given an org_name
๐ท๏ธ Params
- opts :: option parameters used to modify requests
- org_name ::
Aura.Common.org_name/0
โคต๏ธ Returns
โ On Success
{:ok, %HexOrg{...}}
โ On Failure
{:error, (some error)}
๐ฉโ๐ป API Details
Method | Path | Controller | Action |
---|---|---|---|
GET | /orgs/:org_name | OrganizationController | :show |
Grabs an org member, given their org_name and username
๐ท๏ธ Params
- opts :: option parameters used to modify requests
- username ::
Aura.Common.username/0
- org_name ::
Aura.Common.org_name/0
โคต๏ธ Returns
โ On Success
{:ok, %HexOrgMember{...}}
โ On Failure
{:error, (some error)}
๐ฉโ๐ป API Details
Method | Path | Controller | Action |
---|---|---|---|
GET | /orgs/:org_name/members/:username | OrganizationUserController | :show |
Grabs a list of members to an organization, given an org_name
๐ท๏ธ Params
- opts :: option parameters used to modify requests
- org_name ::
Aura.Common.org_name/0
โคต๏ธ Returns
โ On Success
{:ok, [%HexOrgMember{...}]}
โ On Failure
{:error, (some error)}
๐ฉโ๐ป API Details
Method | Path | Controller | Action |
---|---|---|---|
GET | /orgs/:org_name/members | OrganizationUserController | :index |
Lists all the organizations the requester can see
๐ท๏ธ Params
- opts :: option parameters used to modify requests
โคต๏ธ Returns
โ On Success
{:ok, [%HexOrg{...}]}
โ On Failure
{:error, (some error)}
๐ฉโ๐ป API Details
Method | Path | Controller | Action |
---|---|---|---|
GET | /orgs | OrganizationController | :index |
Removes a user to an org
๐ท๏ธ Params
- opts :: option parameters used to modify requests
- username ::
Aura.Common.username/0
- org_name ::
Aura.Common.org_name/0
โคต๏ธ Returns
โ On Success
:ok
โ On Failure
{:error, (some error)}
๐ฉโ๐ป API Details
Method | Path | Controller | Action |
---|---|---|---|
DELETE | /orgs/:org_name/members/:username | OrganizationUserController | :delete |
Streams audit logs, scoped to an organization
๐ท๏ธ Params
- opts.page :: start from this page number
โคต๏ธ Returns
โ On Success
Stream.resource/3
๐ฉโ๐ป API Details
Method | Path | Controller | Action |
---|---|---|---|
GET | /orgs/:org_name/audit-logs | OrganizationController | :audit_logs |