Cloudflare.AccountMember (Cloudflare v0.5.0)

Copy Markdown View Source

Account Members

Add Member

POST /accounts/{account_id}/members

Add a user to the list of members for this account.

Responses

200 Add Member response

Data is at body["result"]

{
  "email": "*string*",
  "id": "*string*",
  "policies": [
    null
  ],
  "roles": [
    {
      "description": "*string*",
      "id": "*string*",
      "name": "*string*",
      "permissions": null
    }
  ],
  "status": null,
  "user": {
    "email": "*string*",
    "first_name": "*string*",
    "id": "*string*",
    "last_name": "*string*",
    "two_factor_authentication_enabled": "*boolean*"
  }
}
4XX Add Member response failure
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

List Members

GET /accounts/{account_id}/members

List all members of an account.

Responses

200 List Members response

Data is at body["result"]

[
  {
    "email": "*string*",
    "id": "*string*",
    "policies": [
      null
    ],
    "roles": [
      {
        "description": null,
        "id": null,
        "name": null,
        "permissions": null
      }
    ],
    "status": null,
    "user": {
      "email": "*string*",
      "first_name": "*string*",
      "id": "*string*",
      "last_name": "*string*",
      "two_factor_authentication_enabled": "*boolean*"
    }
  }
]
4XX List Members response failure
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Update Member

PUT /accounts/{account_id}/members/{member_id}

Modify an account member.

Responses

200 Update Member response

Data is at body["result"]

{
  "email": "*string*",
  "id": "*string*",
  "policies": [
    null
  ],
  "roles": [
    {
      "description": "*string*",
      "id": "*string*",
      "name": "*string*",
      "permissions": null
    }
  ],
  "status": null,
  "user": {
    "email": "*string*",
    "first_name": "*string*",
    "id": "*string*",
    "last_name": "*string*",
    "two_factor_authentication_enabled": "*boolean*"
  }
}
4XX Update Member response failure
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Member Details

GET /accounts/{account_id}/members/{member_id}

Get information about a specific member of an account.

Responses

200 Member Details response

Data is at body["result"]

{
  "email": "*string*",
  "id": "*string*",
  "policies": [
    null
  ],
  "roles": [
    {
      "description": "*string*",
      "id": "*string*",
      "name": "*string*",
      "permissions": null
    }
  ],
  "status": null,
  "user": {
    "email": "*string*",
    "first_name": "*string*",
    "id": "*string*",
    "last_name": "*string*",
    "two_factor_authentication_enabled": "*boolean*"
  }
}
4XX Member Details response failure
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Remove Member

DELETE /accounts/{account_id}/members/{member_id}

Remove a member from an account.

Responses

200 Remove Member response

Data is at body["result"]

{
  "id": "*string*"
}
4XX Remove Member response failure
{
  "errors": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "messages": [
    {
      "code": "*integer*",
      "documentation_url": "*string*",
      "message": "*string*",
      "source": {
        "pointer": "*string*"
      }
    }
  ],
  "result": {},
  "success": "*boolean*"
}

Summary

Functions

client(opts \\ [])

create(body, opts \\ [])

@spec create(
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) ::
  {:ok, map()} | {:error, term()}

create!(body, opts \\ [])

@spec create!(
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) ::
  map() | no_return()

delete(id, opts \\ [])

@spec delete(id :: term(), opts :: Restlax.Resource.action_options()) ::
  {:ok, map()} | {:error, term()}

delete!(id, opts \\ [])

@spec delete!(id :: term(), opts :: Restlax.Resource.action_options()) ::
  map() | no_return()

index(opts \\ [])

@spec index(opts :: Restlax.Resource.action_options()) ::
  {:ok, map()} | {:error, term()}

index!(opts \\ [])

@spec index!(opts :: Restlax.Resource.action_options()) :: map() | no_return()

path_for(id, opts \\ [])

@spec path_for(term(), [{:action, String.t()}]) :: String.t()

show(id, opts \\ [])

@spec show(id :: term(), opts :: Restlax.Resource.action_options()) ::
  {:ok, map()} | {:error, term()}

show!(id, opts \\ [])

@spec show!(id :: term(), opts :: Restlax.Resource.action_options()) ::
  map() | no_return()

update(id, body, opts \\ [])

@spec update(
  id :: term(),
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) :: {:ok, map()} | {:error, term()}

update!(id, body, opts \\ [])

@spec update!(
  id :: term(),
  body :: Restlax.Resource.action_body(),
  opts :: Restlax.Resource.action_options()
) :: map() | no_return()