Spatio.Api.PersonalAccessTokens (spatio_sdk v0.0.2)
API calls for all endpoints tagged PersonalAccessTokens.
Summary
Functions
Create a new PAT. The full token is returned only once on creation; the API never reveals the secret again.
List the scope strings PATs can be issued with.
List the caller's personal access tokens (with available scopes).
Revoke a PAT.
Rename or re-describe a PAT (scopes are immutable).
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):id(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):id(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
Functions
@spec create_personal_access_token( Tesla.Env.client(), Spatio.Model.CreatePatRequest.t(), keyword() ) :: {:ok, Spatio.Model.CreatePatResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Create a new PAT. The full token is returned only once on creation; the API never reveals the secret again.
Parameters
connection(Spatio.Connection): Connection to servercreate_pat_request(CreatePatRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.CreatePatResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_available_pat_scopes( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.PatScopesResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List the scope strings PATs can be issued with.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.PatScopesResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_personal_access_tokens( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.PatListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List the caller's personal access tokens (with available scopes).
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.PatListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec revoke_personal_access_token(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Revoke a PAT.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec update_personal_access_token( Tesla.Env.client(), String.t(), Spatio.Model.UpdatePatRequest.t(), keyword() ) :: {:ok, Spatio.Model.PersonalAccessToken.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Rename or re-describe a PAT (scopes are immutable).
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):update_pat_request(UpdatePatRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.PersonalAccessToken.t}on success{:error, Tesla.Env.t}on failure
@spec workspace_create_pat( Tesla.Env.client(), String.t(), String.t(), %{optional(String.t()) => any()}, keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec workspace_list_pats(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec workspace_revoke_pat( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):id(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec workspace_update_pat( Tesla.Env.client(), String.t(), String.t(), String.t(), %{optional(String.t()) => any()}, keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):id(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure