Cloudflare.AccessApplication (Cloudflare v0.5.0)

Copy Markdown View Source

Access applications

Add an Access application

POST /accounts/{account_id}/access/apps

Adds a new application to Access.

Responses

201 Add an Access application response

Data is at body["result"]

null
4XX Add an Access application 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 Access applications

GET /accounts/{account_id}/access/apps

Lists all Access applications in an account.

Responses

200 List Access applications response

Data is at body["result"]

[
  null
]
4XX List Access applications 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 an Access application

PUT /accounts/{account_id}/access/apps/{app_id}

Updates an Access application.

Responses

200 Update an Access application response

Data is at body["result"]

null
4XX Update an Access application 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*"
}

Get an Access application

GET /accounts/{account_id}/access/apps/{app_id}

Fetches information about an Access application.

Responses

200 Get an Access application response

Data is at body["result"]

null
4XX Get an Access application 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*"
}

Delete an Access application

DELETE /accounts/{account_id}/access/apps/{app_id}

Deletes an application from Access.

Responses

202 Delete an Access application response

Data is at body["result"]

{
  "id": "*string*"
}
4XX Delete an Access application 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*"
}

Revoke application tokens

POST /accounts/{account_id}/access/apps/{app_id}/revoke_tokens

Revokes all tokens issued for an application.

Responses

202 Revoke application tokens response

Data is at body["result"]

{}
4XX Revoke application tokens 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 Access application settings

PUT /accounts/{account_id}/access/apps/{app_id}/settings

Updates Access application settings.

Responses

202 Update Access application settings response

Data is at body["result"]

{
  "allow_iframe": "*boolean*",
  "skip_interstitial": "*boolean*"
}
4XX Update Access application settings 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 Access application settings

PATCH /accounts/{account_id}/access/apps/{app_id}/settings

Updates Access application settings.

Responses

202 Update Access application settings response

Data is at body["result"]

{
  "allow_iframe": "*boolean*",
  "skip_interstitial": "*boolean*"
}
4XX Update Access application settings 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*"
}

Test Access policies

GET /accounts/{account_id}/access/apps/{app_id}/user_policy_checks

Tests if a specific user has permission to access an application.

Responses

200 Test Access policies response

Data is at body["result"]

{
  "app_state": {
    "app_uid": "*string*",
    "aud": "*string*",
    "hostname": "*string*",
    "name": "*string*",
    "policies": [
      {}
    ],
    "status": "*string*"
  },
  "user_identity": {
    "account_id": "*string*",
    "device_sessions": {},
    "email": "*string*",
    "geo": {
      "country": "*string*"
    },
    "iat": "*integer*",
    "id": "*string*",
    "is_gateway": "*boolean*",
    "is_warp": "*boolean*",
    "name": "*string*",
    "user_uuid": "*string*",
    "version": "*integer*"
  }
}
4XX Test Access policies 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()

revoke_tokens(id, opts \\ [])

Revokes all tokens issued for an application.

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()

update_settings(id, settings, opts \\ [])

Updates Access application settings.