Cloudera Documentation

Anywhere Cloud Auth API

AccessKeys

exchangeAccessKeyToken

Exchange access key credentials for a session token (OAuth2 client_credentials)

RFC 6749 client_credentials grant. Exchanges a client_id/client_secret pair for a short-lived session token. Credentials can be provided via HTTP Basic authentication (recommended) or as form-encoded body parameters.


/api/v1/auth/access-keys/token

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Basic [[basicHash]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 "http://localhost:8082/api/v1/auth/access-keys/token"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccessKeysApi;

import java.io.File;
import java.util.*;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
        basicAuth.setUsername("YOUR USERNAME");
        basicAuth.setPassword("YOUR PASSWORD");

        // Create an instance of the API class
        AccessKeysApi apiInstance = new AccessKeysApi();
        String grantType = grantType_example; // String | Must be "client_credentials"
        String clientId = clientId_example; // String | OAuth client ID (alternative to Basic auth header)
        String clientSecret = clientSecret_example; // String | OAuth client secret (alternative to Basic auth header)

        try {
            AccessKeyTokenResponse result = apiInstance.exchangeAccessKeyToken(grantType, clientId, clientSecret);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#exchangeAccessKeyToken");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String grantType = new String(); // String | Must be "client_credentials"
final String clientId = new String(); // String | OAuth client ID (alternative to Basic auth header)
final String clientSecret = new String(); // String | OAuth client secret (alternative to Basic auth header)

try {
    final result = await api_instance.exchangeAccessKeyToken(grantType, clientId, clientSecret);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->exchangeAccessKeyToken: $e\n');
}

import org.openapitools.client.api.AccessKeysApi;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        AccessKeysApi apiInstance = new AccessKeysApi();
        String grantType = grantType_example; // String | Must be "client_credentials"
        String clientId = clientId_example; // String | OAuth client ID (alternative to Basic auth header)
        String clientSecret = clientSecret_example; // String | OAuth client secret (alternative to Basic auth header)

        try {
            AccessKeyTokenResponse result = apiInstance.exchangeAccessKeyToken(grantType, clientId, clientSecret);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#exchangeAccessKeyToken");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];

// Create an instance of the API class
AccessKeysApi *apiInstance = [[AccessKeysApi alloc] init];
String *grantType = grantType_example; // Must be "client_credentials" (default to null)
String *clientId = clientId_example; // OAuth client ID (alternative to Basic auth header) (optional) (default to null)
String *clientSecret = clientSecret_example; // OAuth client secret (alternative to Basic auth header) (optional) (default to null)

// Exchange access key credentials for a session token (OAuth2 client_credentials)
[apiInstance exchangeAccessKeyTokenWith:grantType
    clientId:clientId
    clientSecret:clientSecret
              completionHandler: ^(AccessKeyTokenResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.AccessKeysApi()
var grantType = grantType_example; // {String} Must be "client_credentials"
var opts = {
  'clientId': clientId_example, // {String} OAuth client ID (alternative to Basic auth header)
  'clientSecret': clientSecret_example // {String} OAuth client secret (alternative to Basic auth header)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.exchangeAccessKeyToken(grantType, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class exchangeAccessKeyTokenExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            // Create an instance of the API class
            var apiInstance = new AccessKeysApi();
            var grantType = grantType_example;  // String | Must be "client_credentials" (default to null)
            var clientId = clientId_example;  // String | OAuth client ID (alternative to Basic auth header) (optional)  (default to null)
            var clientSecret = clientSecret_example;  // String | OAuth client secret (alternative to Basic auth header) (optional)  (default to null)

            try {
                // Exchange access key credentials for a session token (OAuth2 client_credentials)
                AccessKeyTokenResponse result = apiInstance.exchangeAccessKeyToken(grantType, clientId, clientSecret);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccessKeysApi.exchangeAccessKeyToken: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccessKeysApi();
$grantType = grantType_example; // String | Must be "client_credentials"
$clientId = clientId_example; // String | OAuth client ID (alternative to Basic auth header)
$clientSecret = clientSecret_example; // String | OAuth client secret (alternative to Basic auth header)

try {
    $result = $api_instance->exchangeAccessKeyToken($grantType, $clientId, $clientSecret);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->exchangeAccessKeyToken: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccessKeysApi;
# Configure HTTP basic authorization: basicAuth
$WWW::OPenAPIClient::Configuration::username = 'YOUR_USERNAME';
$WWW::OPenAPIClient::Configuration::password = 'YOUR_PASSWORD';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccessKeysApi->new();
my $grantType = grantType_example; # String | Must be "client_credentials"
my $clientId = clientId_example; # String | OAuth client ID (alternative to Basic auth header)
my $clientSecret = clientSecret_example; # String | OAuth client secret (alternative to Basic auth header)

eval {
    my $result = $api_instance->exchangeAccessKeyToken(grantType => $grantType, clientId => $clientId, clientSecret => $clientSecret);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccessKeysApi->exchangeAccessKeyToken: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
openapi_client.configuration.username = 'YOUR_USERNAME'
openapi_client.configuration.password = 'YOUR_PASSWORD'

# Create an instance of the API class
api_instance = openapi_client.AccessKeysApi()
grantType = grantType_example # String | Must be "client_credentials" (default to null)
clientId = clientId_example # String | OAuth client ID (alternative to Basic auth header) (optional) (default to null)
clientSecret = clientSecret_example # String | OAuth client secret (alternative to Basic auth header) (optional) (default to null)

try:
    # Exchange access key credentials for a session token (OAuth2 client_credentials)
    api_response = api_instance.exchange_access_key_token(grantType, clientId=clientId, clientSecret=clientSecret)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccessKeysApi->exchangeAccessKeyToken: %s\n" % e)
extern crate AccessKeysApi;

pub fn main() {
    let grantType = grantType_example; // String
    let clientId = clientId_example; // String
    let clientSecret = clientSecret_example; // String

    let mut context = AccessKeysApi::Context::default();
    let result = client.exchangeAccessKeyToken(grantType, clientId, clientSecret, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Form parameters
Name Description
grant_type*
String
Must be "client_credentials"
Enum: client_credentials
Required
client_id
String
OAuth client ID (alternative to Basic auth header)
client_secret
String
OAuth client secret (alternative to Basic auth header)

Responses

Name Type Format Description
WWW-Authenticate String


listAccessKeys

List the caller's access key credentials

Lists the client credentials owned by the requesting user, newest first. The owner is always the authenticated caller; there is no parameter to list another user's credentials. Secrets are never returned.


/api/v1/auth/access-keys/credentials

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/access-keys/credentials?limit=50&offset=0"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccessKeysApi;

import java.io.File;
import java.util.*;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AccessKeysApi apiInstance = new AccessKeysApi();
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            AccessKeySummaryList result = apiInstance.listAccessKeys(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#listAccessKeys");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer limit = new Integer(); // Integer | Maximum number of items to return
final Integer offset = new Integer(); // Integer | Number of items to skip before the returned page

try {
    final result = await api_instance.listAccessKeys(limit, offset);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listAccessKeys: $e\n');
}

import org.openapitools.client.api.AccessKeysApi;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        AccessKeysApi apiInstance = new AccessKeysApi();
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            AccessKeySummaryList result = apiInstance.listAccessKeys(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#listAccessKeys");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AccessKeysApi *apiInstance = [[AccessKeysApi alloc] init];
Integer *limit = 50; // Maximum number of items to return (optional) (default to 50)
Integer *offset = 0; // Number of items to skip before the returned page (optional) (default to 0)

// List the caller's access key credentials
[apiInstance listAccessKeysWith:limit
    offset:offset
              completionHandler: ^(AccessKeySummaryList output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.AccessKeysApi()
var opts = {
  'limit': 50, // {Integer} Maximum number of items to return
  'offset': 0 // {Integer} Number of items to skip before the returned page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listAccessKeys(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listAccessKeysExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AccessKeysApi();
            var limit = 50;  // Integer | Maximum number of items to return (optional)  (default to 50)
            var offset = 0;  // Integer | Number of items to skip before the returned page (optional)  (default to 0)

            try {
                // List the caller's access key credentials
                AccessKeySummaryList result = apiInstance.listAccessKeys(limit, offset);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccessKeysApi.listAccessKeys: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccessKeysApi();
$limit = 50; // Integer | Maximum number of items to return
$offset = 0; // Integer | Number of items to skip before the returned page

try {
    $result = $api_instance->listAccessKeys($limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->listAccessKeys: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccessKeysApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccessKeysApi->new();
my $limit = 50; # Integer | Maximum number of items to return
my $offset = 0; # Integer | Number of items to skip before the returned page

eval {
    my $result = $api_instance->listAccessKeys(limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccessKeysApi->listAccessKeys: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AccessKeysApi()
limit = 50 # Integer | Maximum number of items to return (optional) (default to 50)
offset = 0 # Integer | Number of items to skip before the returned page (optional) (default to 0)

try:
    # List the caller's access key credentials
    api_response = api_instance.list_access_keys(limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccessKeysApi->listAccessKeys: %s\n" % e)
extern crate AccessKeysApi;

pub fn main() {
    let limit = 50; // Integer
    let offset = 0; // Integer

    let mut context = AccessKeysApi::Context::default();
    let result = client.listAccessKeys(limit, offset, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
limit
Integer
Maximum number of items to return
offset
Integer
Number of items to skip before the returned page

Responses


listApiKeys

List the caller's API keys

Lists the API keys owned by the requesting user, newest first. The owner is always the authenticated caller; there is no parameter to list another user's keys. Secrets are never returned.


/api/v1/auth/access-keys/apikey

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/access-keys/apikey?limit=50&offset=0"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccessKeysApi;

import java.io.File;
import java.util.*;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AccessKeysApi apiInstance = new AccessKeysApi();
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            AccessKeySummaryList result = apiInstance.listApiKeys(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#listApiKeys");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer limit = new Integer(); // Integer | Maximum number of items to return
final Integer offset = new Integer(); // Integer | Number of items to skip before the returned page

try {
    final result = await api_instance.listApiKeys(limit, offset);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listApiKeys: $e\n');
}

import org.openapitools.client.api.AccessKeysApi;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        AccessKeysApi apiInstance = new AccessKeysApi();
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            AccessKeySummaryList result = apiInstance.listApiKeys(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#listApiKeys");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AccessKeysApi *apiInstance = [[AccessKeysApi alloc] init];
Integer *limit = 50; // Maximum number of items to return (optional) (default to 50)
Integer *offset = 0; // Number of items to skip before the returned page (optional) (default to 0)

// List the caller's API keys
[apiInstance listApiKeysWith:limit
    offset:offset
              completionHandler: ^(AccessKeySummaryList output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.AccessKeysApi()
var opts = {
  'limit': 50, // {Integer} Maximum number of items to return
  'offset': 0 // {Integer} Number of items to skip before the returned page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listApiKeys(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listApiKeysExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AccessKeysApi();
            var limit = 50;  // Integer | Maximum number of items to return (optional)  (default to 50)
            var offset = 0;  // Integer | Number of items to skip before the returned page (optional)  (default to 0)

            try {
                // List the caller's API keys
                AccessKeySummaryList result = apiInstance.listApiKeys(limit, offset);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccessKeysApi.listApiKeys: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccessKeysApi();
$limit = 50; // Integer | Maximum number of items to return
$offset = 0; // Integer | Number of items to skip before the returned page

try {
    $result = $api_instance->listApiKeys($limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->listApiKeys: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccessKeysApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccessKeysApi->new();
my $limit = 50; # Integer | Maximum number of items to return
my $offset = 0; # Integer | Number of items to skip before the returned page

eval {
    my $result = $api_instance->listApiKeys(limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccessKeysApi->listApiKeys: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AccessKeysApi()
limit = 50 # Integer | Maximum number of items to return (optional) (default to 50)
offset = 0 # Integer | Number of items to skip before the returned page (optional) (default to 0)

try:
    # List the caller's API keys
    api_response = api_instance.list_api_keys(limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccessKeysApi->listApiKeys: %s\n" % e)
extern crate AccessKeysApi;

pub fn main() {
    let limit = 50; // Integer
    let offset = 0; // Integer

    let mut context = AccessKeysApi::Context::default();
    let result = client.listApiKeys(limit, offset, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
limit
Integer
Maximum number of items to return
offset
Integer
Number of items to skip before the returned page

Responses


listUserAccessKeys

List a user's access keys

Lists the API keys and client credentials belonging to {username}. Admin surface: the caller must hold `manage_iam` and need not be the key owner. Secrets (`api_key` / `client_secret`) are returned only at issuance and are never part of a listing.


/api/v1/auth/users/{username}/access-keys

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/users/{username}/access-keys?limit=50&offset=0"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccessKeysApi;

import java.io.File;
import java.util.*;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AccessKeysApi apiInstance = new AccessKeysApi();
        String username = jdoe; // String | Username of the access key owner, as asserted by the IdP
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            listUserAccessKeys_200_response result = apiInstance.listUserAccessKeys(username, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#listUserAccessKeys");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String username = new String(); // String | Username of the access key owner, as asserted by the IdP
final Integer limit = new Integer(); // Integer | Maximum number of items to return
final Integer offset = new Integer(); // Integer | Number of items to skip before the returned page

try {
    final result = await api_instance.listUserAccessKeys(username, limit, offset);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listUserAccessKeys: $e\n');
}

import org.openapitools.client.api.AccessKeysApi;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        AccessKeysApi apiInstance = new AccessKeysApi();
        String username = jdoe; // String | Username of the access key owner, as asserted by the IdP
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            listUserAccessKeys_200_response result = apiInstance.listUserAccessKeys(username, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#listUserAccessKeys");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AccessKeysApi *apiInstance = [[AccessKeysApi alloc] init];
String *username = jdoe; // Username of the access key owner, as asserted by the IdP (default to null)
Integer *limit = 50; // Maximum number of items to return (optional) (default to 50)
Integer *offset = 0; // Number of items to skip before the returned page (optional) (default to 0)

// List a user's access keys
[apiInstance listUserAccessKeysWith:username
    limit:limit
    offset:offset
              completionHandler: ^(listUserAccessKeys_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.AccessKeysApi()
var username = jdoe; // {String} Username of the access key owner, as asserted by the IdP
var opts = {
  'limit': 50, // {Integer} Maximum number of items to return
  'offset': 0 // {Integer} Number of items to skip before the returned page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listUserAccessKeys(username, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listUserAccessKeysExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AccessKeysApi();
            var username = jdoe;  // String | Username of the access key owner, as asserted by the IdP (default to null)
            var limit = 50;  // Integer | Maximum number of items to return (optional)  (default to 50)
            var offset = 0;  // Integer | Number of items to skip before the returned page (optional)  (default to 0)

            try {
                // List a user's access keys
                listUserAccessKeys_200_response result = apiInstance.listUserAccessKeys(username, limit, offset);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccessKeysApi.listUserAccessKeys: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccessKeysApi();
$username = jdoe; // String | Username of the access key owner, as asserted by the IdP
$limit = 50; // Integer | Maximum number of items to return
$offset = 0; // Integer | Number of items to skip before the returned page

try {
    $result = $api_instance->listUserAccessKeys($username, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->listUserAccessKeys: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccessKeysApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccessKeysApi->new();
my $username = jdoe; # String | Username of the access key owner, as asserted by the IdP
my $limit = 50; # Integer | Maximum number of items to return
my $offset = 0; # Integer | Number of items to skip before the returned page

eval {
    my $result = $api_instance->listUserAccessKeys(username => $username, limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccessKeysApi->listUserAccessKeys: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AccessKeysApi()
username = jdoe # String | Username of the access key owner, as asserted by the IdP (default to null)
limit = 50 # Integer | Maximum number of items to return (optional) (default to 50)
offset = 0 # Integer | Number of items to skip before the returned page (optional) (default to 0)

try:
    # List a user's access keys
    api_response = api_instance.list_user_access_keys(username, limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccessKeysApi->listUserAccessKeys: %s\n" % e)
extern crate AccessKeysApi;

pub fn main() {
    let username = jdoe; // String
    let limit = 50; // Integer
    let offset = 0; // Integer

    let mut context = AccessKeysApi::Context::default();
    let result = client.listUserAccessKeys(username, limit, offset, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
username*
String
Username of the access key owner, as asserted by the IdP
Required
Query parameters
Name Description
limit
Integer
Maximum number of items to return
offset
Integer
Number of items to skip before the returned page

Responses


provisionAccessKey

Provision access key credentials

Provisions a new client_id/client_secret pair bound to the requesting user's identity. The client_secret is returned once and is not stored by the service. Compact JWT Bearer values use `knox-jwtclientcreds`; other authenticated callers use `knox-clientcreds`. Returns `503` if the JWT topology is not deployed.


/api/v1/auth/access-keys/credentials

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/access-keys/credentials" \
 -d '{
  "name" : "etl-nightly",
  "description" : "Nightly ETL pipeline in Jenkins"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccessKeysApi;

import java.io.File;
import java.util.*;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AccessKeysApi apiInstance = new AccessKeysApi();
        ProvisionAccessKeyRequest provisionAccessKeyRequest = ; // ProvisionAccessKeyRequest | 

        try {
            AccessKeyResponse result = apiInstance.provisionAccessKey(provisionAccessKeyRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#provisionAccessKey");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final ProvisionAccessKeyRequest provisionAccessKeyRequest = new ProvisionAccessKeyRequest(); // ProvisionAccessKeyRequest | 

try {
    final result = await api_instance.provisionAccessKey(provisionAccessKeyRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->provisionAccessKey: $e\n');
}

import org.openapitools.client.api.AccessKeysApi;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        AccessKeysApi apiInstance = new AccessKeysApi();
        ProvisionAccessKeyRequest provisionAccessKeyRequest = ; // ProvisionAccessKeyRequest | 

        try {
            AccessKeyResponse result = apiInstance.provisionAccessKey(provisionAccessKeyRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#provisionAccessKey");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AccessKeysApi *apiInstance = [[AccessKeysApi alloc] init];
ProvisionAccessKeyRequest *provisionAccessKeyRequest = ; // 

// Provision access key credentials
[apiInstance provisionAccessKeyWith:provisionAccessKeyRequest
              completionHandler: ^(AccessKeyResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.AccessKeysApi()
var provisionAccessKeyRequest = ; // {ProvisionAccessKeyRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.provisionAccessKey(provisionAccessKeyRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class provisionAccessKeyExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AccessKeysApi();
            var provisionAccessKeyRequest = new ProvisionAccessKeyRequest(); // ProvisionAccessKeyRequest | 

            try {
                // Provision access key credentials
                AccessKeyResponse result = apiInstance.provisionAccessKey(provisionAccessKeyRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccessKeysApi.provisionAccessKey: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccessKeysApi();
$provisionAccessKeyRequest = ; // ProvisionAccessKeyRequest | 

try {
    $result = $api_instance->provisionAccessKey($provisionAccessKeyRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->provisionAccessKey: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccessKeysApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccessKeysApi->new();
my $provisionAccessKeyRequest = WWW::OPenAPIClient::Object::ProvisionAccessKeyRequest->new(); # ProvisionAccessKeyRequest | 

eval {
    my $result = $api_instance->provisionAccessKey(provisionAccessKeyRequest => $provisionAccessKeyRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccessKeysApi->provisionAccessKey: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AccessKeysApi()
provisionAccessKeyRequest =  # ProvisionAccessKeyRequest | 

try:
    # Provision access key credentials
    api_response = api_instance.provision_access_key(provisionAccessKeyRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccessKeysApi->provisionAccessKey: %s\n" % e)
extern crate AccessKeysApi;

pub fn main() {
    let provisionAccessKeyRequest = ; // ProvisionAccessKeyRequest

    let mut context = AccessKeysApi::Context::default();
    let result = client.provisionAccessKey(provisionAccessKeyRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
provisionAccessKeyRequest *

Responses


provisionApiKey

Provision a long-lived API key

Provisions a long-lived API key bound to the requesting user's identity, by proxying to the Knox APIKEY service. Intended for clients that cannot perform the two-step client_credentials exchange — for example OpenAI-compatible libraries that accept a single long-lived bearer token and have no hook for a credential exchange. The api_key is returned once at issuance and is not stored by the service; treat it like a password. Prefer /access-keys/credentials where the client can exchange credentials, since an API key is a standalone bearer credential that does not expire by default.


/api/v1/auth/access-keys/apikey

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/access-keys/apikey" \
 -d '{
  "name" : "caii-inference-client",
  "description" : "OpenAI-compatible client for the CAII inference service"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccessKeysApi;

import java.io.File;
import java.util.*;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AccessKeysApi apiInstance = new AccessKeysApi();
        ProvisionApiKeyRequest provisionApiKeyRequest = ; // ProvisionApiKeyRequest | 

        try {
            ApiKeyResponse result = apiInstance.provisionApiKey(provisionApiKeyRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#provisionApiKey");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final ProvisionApiKeyRequest provisionApiKeyRequest = new ProvisionApiKeyRequest(); // ProvisionApiKeyRequest | 

try {
    final result = await api_instance.provisionApiKey(provisionApiKeyRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->provisionApiKey: $e\n');
}

import org.openapitools.client.api.AccessKeysApi;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        AccessKeysApi apiInstance = new AccessKeysApi();
        ProvisionApiKeyRequest provisionApiKeyRequest = ; // ProvisionApiKeyRequest | 

        try {
            ApiKeyResponse result = apiInstance.provisionApiKey(provisionApiKeyRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#provisionApiKey");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AccessKeysApi *apiInstance = [[AccessKeysApi alloc] init];
ProvisionApiKeyRequest *provisionApiKeyRequest = ; // 

// Provision a long-lived API key
[apiInstance provisionApiKeyWith:provisionApiKeyRequest
              completionHandler: ^(ApiKeyResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.AccessKeysApi()
var provisionApiKeyRequest = ; // {ProvisionApiKeyRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.provisionApiKey(provisionApiKeyRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class provisionApiKeyExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AccessKeysApi();
            var provisionApiKeyRequest = new ProvisionApiKeyRequest(); // ProvisionApiKeyRequest | 

            try {
                // Provision a long-lived API key
                ApiKeyResponse result = apiInstance.provisionApiKey(provisionApiKeyRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccessKeysApi.provisionApiKey: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccessKeysApi();
$provisionApiKeyRequest = ; // ProvisionApiKeyRequest | 

try {
    $result = $api_instance->provisionApiKey($provisionApiKeyRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->provisionApiKey: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccessKeysApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccessKeysApi->new();
my $provisionApiKeyRequest = WWW::OPenAPIClient::Object::ProvisionApiKeyRequest->new(); # ProvisionApiKeyRequest | 

eval {
    my $result = $api_instance->provisionApiKey(provisionApiKeyRequest => $provisionApiKeyRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccessKeysApi->provisionApiKey: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AccessKeysApi()
provisionApiKeyRequest =  # ProvisionApiKeyRequest | 

try:
    # Provision a long-lived API key
    api_response = api_instance.provision_api_key(provisionApiKeyRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccessKeysApi->provisionApiKey: %s\n" % e)
extern crate AccessKeysApi;

pub fn main() {
    let provisionApiKeyRequest = ; // ProvisionApiKeyRequest

    let mut context = AccessKeysApi::Context::default();
    let result = client.provisionApiKey(provisionApiKeyRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
provisionApiKeyRequest *

Responses


revokeAllUserAccessKeys

Revoke all of a user's access keys

Revokes every API key and client credential belonging to {username} in a single Knox batch revocation. Intended for offboarding: a departed user's client_id/client_secret keeps exchanging for tokens until revoked, even after the IdP removes the account. Idempotent — an exact principal with no access keys yields `revoked_count: 0`. If the exact lookup is empty but Knox has credentials under a principal differing only by case, the operation returns 409 with the stored principal in the problem detail instead of reporting success.


/api/v1/auth/users/{username}/access-keys

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/users/{username}/access-keys"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccessKeysApi;

import java.io.File;
import java.util.*;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AccessKeysApi apiInstance = new AccessKeysApi();
        String username = jdoe; // String | Username of the access key owner, as asserted by the IdP

        try {
            RevokeAllAccessKeysResponse result = apiInstance.revokeAllUserAccessKeys(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#revokeAllUserAccessKeys");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String username = new String(); // String | Username of the access key owner, as asserted by the IdP

try {
    final result = await api_instance.revokeAllUserAccessKeys(username);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->revokeAllUserAccessKeys: $e\n');
}

import org.openapitools.client.api.AccessKeysApi;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        AccessKeysApi apiInstance = new AccessKeysApi();
        String username = jdoe; // String | Username of the access key owner, as asserted by the IdP

        try {
            RevokeAllAccessKeysResponse result = apiInstance.revokeAllUserAccessKeys(username);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#revokeAllUserAccessKeys");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AccessKeysApi *apiInstance = [[AccessKeysApi alloc] init];
String *username = jdoe; // Username of the access key owner, as asserted by the IdP (default to null)

// Revoke all of a user's access keys
[apiInstance revokeAllUserAccessKeysWith:username
              completionHandler: ^(RevokeAllAccessKeysResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.AccessKeysApi()
var username = jdoe; // {String} Username of the access key owner, as asserted by the IdP

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.revokeAllUserAccessKeys(username, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class revokeAllUserAccessKeysExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AccessKeysApi();
            var username = jdoe;  // String | Username of the access key owner, as asserted by the IdP (default to null)

            try {
                // Revoke all of a user's access keys
                RevokeAllAccessKeysResponse result = apiInstance.revokeAllUserAccessKeys(username);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccessKeysApi.revokeAllUserAccessKeys: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccessKeysApi();
$username = jdoe; // String | Username of the access key owner, as asserted by the IdP

try {
    $result = $api_instance->revokeAllUserAccessKeys($username);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->revokeAllUserAccessKeys: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccessKeysApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccessKeysApi->new();
my $username = jdoe; # String | Username of the access key owner, as asserted by the IdP

eval {
    my $result = $api_instance->revokeAllUserAccessKeys(username => $username);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccessKeysApi->revokeAllUserAccessKeys: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AccessKeysApi()
username = jdoe # String | Username of the access key owner, as asserted by the IdP (default to null)

try:
    # Revoke all of a user's access keys
    api_response = api_instance.revoke_all_user_access_keys(username)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccessKeysApi->revokeAllUserAccessKeys: %s\n" % e)
extern crate AccessKeysApi;

pub fn main() {
    let username = jdoe; // String

    let mut context = AccessKeysApi::Context::default();
    let result = client.revokeAllUserAccessKeys(username, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
username*
String
Username of the access key owner, as asserted by the IdP
Required

Responses


revokeApiKey

Revoke an API key

Revokes the API key identified by key_id. Requires a valid user session. Users can only revoke their own keys: the service verifies the key belongs to the caller before revoking it, and returns 404 otherwise. Cross-user revocation is not possible.


/api/v1/auth/access-keys/apikey/revoke

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/access-keys/apikey/revoke" \
 -d '{
  "key_id" : "9c03ffaa-ab2d-4a44-a359-f7fe338eb17a"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccessKeysApi;

import java.io.File;
import java.util.*;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AccessKeysApi apiInstance = new AccessKeysApi();
        RevokeApiKeyRequest revokeApiKeyRequest = ; // RevokeApiKeyRequest | 

        try {
            apiInstance.revokeApiKey(revokeApiKeyRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#revokeApiKey");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final RevokeApiKeyRequest revokeApiKeyRequest = new RevokeApiKeyRequest(); // RevokeApiKeyRequest | 

try {
    final result = await api_instance.revokeApiKey(revokeApiKeyRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->revokeApiKey: $e\n');
}

import org.openapitools.client.api.AccessKeysApi;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        AccessKeysApi apiInstance = new AccessKeysApi();
        RevokeApiKeyRequest revokeApiKeyRequest = ; // RevokeApiKeyRequest | 

        try {
            apiInstance.revokeApiKey(revokeApiKeyRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#revokeApiKey");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AccessKeysApi *apiInstance = [[AccessKeysApi alloc] init];
RevokeApiKeyRequest *revokeApiKeyRequest = ; // 

// Revoke an API key
[apiInstance revokeApiKeyWith:revokeApiKeyRequest
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.AccessKeysApi()
var revokeApiKeyRequest = ; // {RevokeApiKeyRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.revokeApiKey(revokeApiKeyRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class revokeApiKeyExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AccessKeysApi();
            var revokeApiKeyRequest = new RevokeApiKeyRequest(); // RevokeApiKeyRequest | 

            try {
                // Revoke an API key
                apiInstance.revokeApiKey(revokeApiKeyRequest);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccessKeysApi.revokeApiKey: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccessKeysApi();
$revokeApiKeyRequest = ; // RevokeApiKeyRequest | 

try {
    $api_instance->revokeApiKey($revokeApiKeyRequest);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->revokeApiKey: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccessKeysApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccessKeysApi->new();
my $revokeApiKeyRequest = WWW::OPenAPIClient::Object::RevokeApiKeyRequest->new(); # RevokeApiKeyRequest | 

eval {
    $api_instance->revokeApiKey(revokeApiKeyRequest => $revokeApiKeyRequest);
};
if ($@) {
    warn "Exception when calling AccessKeysApi->revokeApiKey: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AccessKeysApi()
revokeApiKeyRequest =  # RevokeApiKeyRequest | 

try:
    # Revoke an API key
    api_instance.revoke_api_key(revokeApiKeyRequest)
except ApiException as e:
    print("Exception when calling AccessKeysApi->revokeApiKey: %s\n" % e)
extern crate AccessKeysApi;

pub fn main() {
    let revokeApiKeyRequest = ; // RevokeApiKeyRequest

    let mut context = AccessKeysApi::Context::default();
    let result = client.revokeApiKey(revokeApiKeyRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
revokeApiKeyRequest *

Responses


revokeCredentials

Revoke client credentials

Revokes the client credentials identified by client_id. Requires a valid user session. Users can only revoke their own credentials: the service verifies the credential belongs to the caller before revoking it, and returns 404 otherwise. Cross-user revocation is not possible.


/api/v1/auth/access-keys/credentials/revoke

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/access-keys/credentials/revoke" \
 -d '{
  "client_id" : "c3dc2e84-63ce-481b-8e67-75f754894f87"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccessKeysApi;

import java.io.File;
import java.util.*;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AccessKeysApi apiInstance = new AccessKeysApi();
        RevokeCredentialsRequest revokeCredentialsRequest = ; // RevokeCredentialsRequest | 

        try {
            apiInstance.revokeCredentials(revokeCredentialsRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#revokeCredentials");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final RevokeCredentialsRequest revokeCredentialsRequest = new RevokeCredentialsRequest(); // RevokeCredentialsRequest | 

try {
    final result = await api_instance.revokeCredentials(revokeCredentialsRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->revokeCredentials: $e\n');
}

import org.openapitools.client.api.AccessKeysApi;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        AccessKeysApi apiInstance = new AccessKeysApi();
        RevokeCredentialsRequest revokeCredentialsRequest = ; // RevokeCredentialsRequest | 

        try {
            apiInstance.revokeCredentials(revokeCredentialsRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#revokeCredentials");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AccessKeysApi *apiInstance = [[AccessKeysApi alloc] init];
RevokeCredentialsRequest *revokeCredentialsRequest = ; // 

// Revoke client credentials
[apiInstance revokeCredentialsWith:revokeCredentialsRequest
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.AccessKeysApi()
var revokeCredentialsRequest = ; // {RevokeCredentialsRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.revokeCredentials(revokeCredentialsRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class revokeCredentialsExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AccessKeysApi();
            var revokeCredentialsRequest = new RevokeCredentialsRequest(); // RevokeCredentialsRequest | 

            try {
                // Revoke client credentials
                apiInstance.revokeCredentials(revokeCredentialsRequest);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccessKeysApi.revokeCredentials: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccessKeysApi();
$revokeCredentialsRequest = ; // RevokeCredentialsRequest | 

try {
    $api_instance->revokeCredentials($revokeCredentialsRequest);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->revokeCredentials: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccessKeysApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccessKeysApi->new();
my $revokeCredentialsRequest = WWW::OPenAPIClient::Object::RevokeCredentialsRequest->new(); # RevokeCredentialsRequest | 

eval {
    $api_instance->revokeCredentials(revokeCredentialsRequest => $revokeCredentialsRequest);
};
if ($@) {
    warn "Exception when calling AccessKeysApi->revokeCredentials: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AccessKeysApi()
revokeCredentialsRequest =  # RevokeCredentialsRequest | 

try:
    # Revoke client credentials
    api_instance.revoke_credentials(revokeCredentialsRequest)
except ApiException as e:
    print("Exception when calling AccessKeysApi->revokeCredentials: %s\n" % e)
extern crate AccessKeysApi;

pub fn main() {
    let revokeCredentialsRequest = ; // RevokeCredentialsRequest

    let mut context = AccessKeysApi::Context::default();
    let result = client.revokeCredentials(revokeCredentialsRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
revokeCredentialsRequest *

Responses


revokeUserAccessKey

Revoke one of a user's access keys

Revokes the single access key {keyId} belonging to {username}, whether it is an API key or a client credential. Returns 404 when {keyId} is not one of that user's access keys.


/api/v1/auth/users/{username}/access-keys/{keyId}

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/problem+json" \
 "http://localhost:8082/api/v1/auth/users/{username}/access-keys/{keyId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccessKeysApi;

import java.io.File;
import java.util.*;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        AccessKeysApi apiInstance = new AccessKeysApi();
        String username = jdoe; // String | Username of the access key owner, as asserted by the IdP
        String keyId = 9c2d22fb-e28d-4495-aaae-d4103dada8d1; // String | Identifier of the access key (`key_id` for an API key, `client_id` for client credentials)

        try {
            apiInstance.revokeUserAccessKey(username, keyId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#revokeUserAccessKey");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String username = new String(); // String | Username of the access key owner, as asserted by the IdP
final String keyId = new String(); // String | Identifier of the access key (`key_id` for an API key, `client_id` for client credentials)

try {
    final result = await api_instance.revokeUserAccessKey(username, keyId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->revokeUserAccessKey: $e\n');
}

import org.openapitools.client.api.AccessKeysApi;

public class AccessKeysApiExample {
    public static void main(String[] args) {
        AccessKeysApi apiInstance = new AccessKeysApi();
        String username = jdoe; // String | Username of the access key owner, as asserted by the IdP
        String keyId = 9c2d22fb-e28d-4495-aaae-d4103dada8d1; // String | Identifier of the access key (`key_id` for an API key, `client_id` for client credentials)

        try {
            apiInstance.revokeUserAccessKey(username, keyId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccessKeysApi#revokeUserAccessKey");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
AccessKeysApi *apiInstance = [[AccessKeysApi alloc] init];
String *username = jdoe; // Username of the access key owner, as asserted by the IdP (default to null)
String *keyId = 9c2d22fb-e28d-4495-aaae-d4103dada8d1; // Identifier of the access key (`key_id` for an API key, `client_id` for client credentials) (default to null)

// Revoke one of a user's access keys
[apiInstance revokeUserAccessKeyWith:username
    keyId:keyId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.AccessKeysApi()
var username = jdoe; // {String} Username of the access key owner, as asserted by the IdP
var keyId = 9c2d22fb-e28d-4495-aaae-d4103dada8d1; // {String} Identifier of the access key (`key_id` for an API key, `client_id` for client credentials)

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.revokeUserAccessKey(username, keyId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class revokeUserAccessKeyExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new AccessKeysApi();
            var username = jdoe;  // String | Username of the access key owner, as asserted by the IdP (default to null)
            var keyId = 9c2d22fb-e28d-4495-aaae-d4103dada8d1;  // String | Identifier of the access key (`key_id` for an API key, `client_id` for client credentials) (default to null)

            try {
                // Revoke one of a user's access keys
                apiInstance.revokeUserAccessKey(username, keyId);
            } catch (Exception e) {
                Debug.Print("Exception when calling AccessKeysApi.revokeUserAccessKey: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AccessKeysApi();
$username = jdoe; // String | Username of the access key owner, as asserted by the IdP
$keyId = 9c2d22fb-e28d-4495-aaae-d4103dada8d1; // String | Identifier of the access key (`key_id` for an API key, `client_id` for client credentials)

try {
    $api_instance->revokeUserAccessKey($username, $keyId);
} catch (Exception $e) {
    echo 'Exception when calling AccessKeysApi->revokeUserAccessKey: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AccessKeysApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AccessKeysApi->new();
my $username = jdoe; # String | Username of the access key owner, as asserted by the IdP
my $keyId = 9c2d22fb-e28d-4495-aaae-d4103dada8d1; # String | Identifier of the access key (`key_id` for an API key, `client_id` for client credentials)

eval {
    $api_instance->revokeUserAccessKey(username => $username, keyId => $keyId);
};
if ($@) {
    warn "Exception when calling AccessKeysApi->revokeUserAccessKey: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.AccessKeysApi()
username = jdoe # String | Username of the access key owner, as asserted by the IdP (default to null)
keyId = 9c2d22fb-e28d-4495-aaae-d4103dada8d1 # String | Identifier of the access key (`key_id` for an API key, `client_id` for client credentials) (default to null)

try:
    # Revoke one of a user's access keys
    api_instance.revoke_user_access_key(username, keyId)
except ApiException as e:
    print("Exception when calling AccessKeysApi->revokeUserAccessKey: %s\n" % e)
extern crate AccessKeysApi;

pub fn main() {
    let username = jdoe; // String
    let keyId = 9c2d22fb-e28d-4495-aaae-d4103dada8d1; // String

    let mut context = AccessKeysApi::Context::default();
    let result = client.revokeUserAccessKey(username, keyId, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
username*
String
Username of the access key owner, as asserted by the IdP
Required
keyId*
String
Identifier of the access key (`key_id` for an API key, `client_id` for client credentials)
Required

Responses


Health

getHealth

Liveness check

Simple health check to verify the service process is running


/health

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "http://localhost:8082/health"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.HealthApi;

import java.io.File;
import java.util.*;

public class HealthApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        HealthApi apiInstance = new HealthApi();

        try {
            HealthResponse result = apiInstance.getHealth();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HealthApi#getHealth");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.getHealth();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getHealth: $e\n');
}

import org.openapitools.client.api.HealthApi;

public class HealthApiExample {
    public static void main(String[] args) {
        HealthApi apiInstance = new HealthApi();

        try {
            HealthResponse result = apiInstance.getHealth();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HealthApi#getHealth");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
HealthApi *apiInstance = [[HealthApi alloc] init];

// Liveness check
[apiInstance getHealthWithCompletionHandler: 
              ^(HealthResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.HealthApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getHealth(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getHealthExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new HealthApi();

            try {
                // Liveness check
                HealthResponse result = apiInstance.getHealth();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling HealthApi.getHealth: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\HealthApi();

try {
    $result = $api_instance->getHealth();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HealthApi->getHealth: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::HealthApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::HealthApi->new();

eval {
    my $result = $api_instance->getHealth();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HealthApi->getHealth: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.HealthApi()

try:
    # Liveness check
    api_response = api_instance.get_health()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HealthApi->getHealth: %s\n" % e)
extern crate HealthApi;

pub fn main() {

    let mut context = HealthApi::Context::default();
    let result = client.getHealth(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


getReady

Readiness check

Detailed check to verify the service can handle requests


/ready

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "http://localhost:8082/ready"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.HealthApi;

import java.io.File;
import java.util.*;

public class HealthApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        HealthApi apiInstance = new HealthApi();

        try {
            ReadyResponse result = apiInstance.getReady();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HealthApi#getReady");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.getReady();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getReady: $e\n');
}

import org.openapitools.client.api.HealthApi;

public class HealthApiExample {
    public static void main(String[] args) {
        HealthApi apiInstance = new HealthApi();

        try {
            ReadyResponse result = apiInstance.getReady();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HealthApi#getReady");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
HealthApi *apiInstance = [[HealthApi alloc] init];

// Readiness check
[apiInstance getReadyWithCompletionHandler: 
              ^(ReadyResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.HealthApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getReady(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getReadyExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new HealthApi();

            try {
                // Readiness check
                ReadyResponse result = apiInstance.getReady();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling HealthApi.getReady: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\HealthApi();

try {
    $result = $api_instance->getReady();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HealthApi->getReady: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::HealthApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::HealthApi->new();

eval {
    my $result = $api_instance->getReady();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HealthApi->getReady: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.HealthApi()

try:
    # Readiness check
    api_response = api_instance.get_ready()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HealthApi->getReady: %s\n" % e)
extern crate HealthApi;

pub fn main() {

    let mut context = HealthApi::Context::default();
    let result = client.getReady(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


getVersion

API version

Returns service and API version information


/version

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json" \
 "http://localhost:8082/version"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.HealthApi;

import java.io.File;
import java.util.*;

public class HealthApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        HealthApi apiInstance = new HealthApi();

        try {
            VersionResponse result = apiInstance.getVersion();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HealthApi#getVersion");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.getVersion();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getVersion: $e\n');
}

import org.openapitools.client.api.HealthApi;

public class HealthApiExample {
    public static void main(String[] args) {
        HealthApi apiInstance = new HealthApi();

        try {
            VersionResponse result = apiInstance.getVersion();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HealthApi#getVersion");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
HealthApi *apiInstance = [[HealthApi alloc] init];

// API version
[apiInstance getVersionWithCompletionHandler: 
              ^(VersionResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.HealthApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getVersion(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getVersionExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new HealthApi();

            try {
                // API version
                VersionResponse result = apiInstance.getVersion();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling HealthApi.getVersion: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\HealthApi();

try {
    $result = $api_instance->getVersion();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HealthApi->getVersion: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::HealthApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::HealthApi->new();

eval {
    my $result = $api_instance->getVersion();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HealthApi->getVersion: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.HealthApi()

try:
    # API version
    api_response = api_instance.get_version()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HealthApi->getVersion: %s\n" % e)
extern crate HealthApi;

pub fn main() {

    let mut context = HealthApi::Context::default();
    let result = client.getVersion(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


IDP

getDefaultIDP

Get default identity provider

Returns the active default identity provider configuration. Always returns 200. When no default has been configured, `configured` is false and all other fields are absent. For SAML providers, includes the SP metadata XML for IdP registration.


/api/v1/auth/idp/default

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/idp/default"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.IDPApi;

import java.io.File;
import java.util.*;

public class IDPApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        IDPApi apiInstance = new IDPApi();

        try {
            DefaultIDPResponse result = apiInstance.getDefaultIDP();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IDPApi#getDefaultIDP");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.getDefaultIDP();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getDefaultIDP: $e\n');
}

import org.openapitools.client.api.IDPApi;

public class IDPApiExample {
    public static void main(String[] args) {
        IDPApi apiInstance = new IDPApi();

        try {
            DefaultIDPResponse result = apiInstance.getDefaultIDP();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IDPApi#getDefaultIDP");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
IDPApi *apiInstance = [[IDPApi alloc] init];

// Get default identity provider
[apiInstance getDefaultIDPWithCompletionHandler: 
              ^(DefaultIDPResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.IDPApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDefaultIDP(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getDefaultIDPExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new IDPApi();

            try {
                // Get default identity provider
                DefaultIDPResponse result = apiInstance.getDefaultIDP();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling IDPApi.getDefaultIDP: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\IDPApi();

try {
    $result = $api_instance->getDefaultIDP();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling IDPApi->getDefaultIDP: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::IDPApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::IDPApi->new();

eval {
    my $result = $api_instance->getDefaultIDP();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling IDPApi->getDefaultIDP: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.IDPApi()

try:
    # Get default identity provider
    api_response = api_instance.get_default_idp()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling IDPApi->getDefaultIDP: %s\n" % e)
extern crate IDPApi;

pub fn main() {

    let mut context = IDPApi::Context::default();
    let result = client.getDefaultIDP(&context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Responses


getIDPStatus

Get identity provider status

Returns whether an identity provider (IdP) has been configured.


/api/v1/auth/idp/status

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/idp/status"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.IDPApi;

import java.io.File;
import java.util.*;

public class IDPApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        IDPApi apiInstance = new IDPApi();

        try {
            IDPStatusResponse result = apiInstance.getIDPStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IDPApi#getIDPStatus");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.getIDPStatus();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getIDPStatus: $e\n');
}

import org.openapitools.client.api.IDPApi;

public class IDPApiExample {
    public static void main(String[] args) {
        IDPApi apiInstance = new IDPApi();

        try {
            IDPStatusResponse result = apiInstance.getIDPStatus();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IDPApi#getIDPStatus");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
IDPApi *apiInstance = [[IDPApi alloc] init];

// Get identity provider status
[apiInstance getIDPStatusWithCompletionHandler: 
              ^(IDPStatusResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.IDPApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getIDPStatus(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getIDPStatusExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new IDPApi();

            try {
                // Get identity provider status
                IDPStatusResponse result = apiInstance.getIDPStatus();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling IDPApi.getIDPStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\IDPApi();

try {
    $result = $api_instance->getIDPStatus();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling IDPApi->getIDPStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::IDPApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::IDPApi->new();

eval {
    my $result = $api_instance->getIDPStatus();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling IDPApi->getIDPStatus: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.IDPApi()

try:
    # Get identity provider status
    api_response = api_instance.get_idp_status()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling IDPApi->getIDPStatus: %s\n" % e)
extern crate IDPApi;

pub fn main() {

    let mut context = IDPApi::Context::default();
    let result = client.getIDPStatus(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


searchIdp

Search users and groups in the identity provider

Prefix search for users and groups by querying Knox's LDAP proxy. Returns combined results (both users and groups). Results are capped server-side (10 users + 10 groups = 20 max). No pagination — the admin refines by typing more characters. AWC does not store user or group records — those live in the customer's IdP. This endpoint enables discovery of members for role assignment. secret-service's mesh identity (x-awc-source-workload-id) may also call this endpoint without view_iam, to resolve share grantees.


/api/v1/auth/idp/search

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/idp/search?q=ali&member_type=memberType_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.IDPApi;

import java.io.File;
import java.util.*;

public class IDPApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        IDPApi apiInstance = new IDPApi();
        String q = ali; // String | Search prefix (minimum 3 characters)
        String memberType = memberType_example; // String | Filter results by member type. Omit to return both users and groups.

        try {
            IDPSearchResponse result = apiInstance.searchIdp(q, memberType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IDPApi#searchIdp");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String q = new String(); // String | Search prefix (minimum 3 characters)
final String memberType = new String(); // String | Filter results by member type. Omit to return both users and groups.

try {
    final result = await api_instance.searchIdp(q, memberType);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->searchIdp: $e\n');
}

import org.openapitools.client.api.IDPApi;

public class IDPApiExample {
    public static void main(String[] args) {
        IDPApi apiInstance = new IDPApi();
        String q = ali; // String | Search prefix (minimum 3 characters)
        String memberType = memberType_example; // String | Filter results by member type. Omit to return both users and groups.

        try {
            IDPSearchResponse result = apiInstance.searchIdp(q, memberType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IDPApi#searchIdp");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
IDPApi *apiInstance = [[IDPApi alloc] init];
String *q = ali; // Search prefix (minimum 3 characters) (default to null)
String *memberType = memberType_example; // Filter results by member type. Omit to return both users and groups. (optional) (default to null)

// Search users and groups in the identity provider
[apiInstance searchIdpWith:q
    memberType:memberType
              completionHandler: ^(IDPSearchResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.IDPApi()
var q = ali; // {String} Search prefix (minimum 3 characters)
var opts = {
  'memberType': memberType_example // {String} Filter results by member type. Omit to return both users and groups.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchIdp(q, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class searchIdpExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new IDPApi();
            var q = ali;  // String | Search prefix (minimum 3 characters) (default to null)
            var memberType = memberType_example;  // String | Filter results by member type. Omit to return both users and groups. (optional)  (default to null)

            try {
                // Search users and groups in the identity provider
                IDPSearchResponse result = apiInstance.searchIdp(q, memberType);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling IDPApi.searchIdp: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\IDPApi();
$q = ali; // String | Search prefix (minimum 3 characters)
$memberType = memberType_example; // String | Filter results by member type. Omit to return both users and groups.

try {
    $result = $api_instance->searchIdp($q, $memberType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling IDPApi->searchIdp: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::IDPApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::IDPApi->new();
my $q = ali; # String | Search prefix (minimum 3 characters)
my $memberType = memberType_example; # String | Filter results by member type. Omit to return both users and groups.

eval {
    my $result = $api_instance->searchIdp(q => $q, memberType => $memberType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling IDPApi->searchIdp: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.IDPApi()
q = ali # String | Search prefix (minimum 3 characters) (default to null)
memberType = memberType_example # String | Filter results by member type. Omit to return both users and groups. (optional) (default to null)

try:
    # Search users and groups in the identity provider
    api_response = api_instance.search_idp(q, memberType=memberType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling IDPApi->searchIdp: %s\n" % e)
extern crate IDPApi;

pub fn main() {
    let q = ali; // String
    let memberType = memberType_example; // String

    let mut context = IDPApi::Context::default();
    let result = client.searchIdp(q, memberType, &context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Query parameters
Name Description
q*
String
Search prefix (minimum 3 characters)
Required
member_type
String
Filter results by member type. Omit to return both users and groups.

Responses


MachineUsers

createMachineUser

Create machine user

Create a new machine user for machine-to-machine authentication


/api/v1/auth/machine-users

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/machine-users" \
 -d '{
  "name" : "ci-pipeline-bot",
  "description" : "CI/CD pipeline automation account"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.MachineUsersApi;

import java.io.File;
import java.util.*;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        MachineUsersApi apiInstance = new MachineUsersApi();
        CreateMachineUserRequest createMachineUserRequest = ; // CreateMachineUserRequest | 

        try {
            MachineUser result = apiInstance.createMachineUser(createMachineUserRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#createMachineUser");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateMachineUserRequest createMachineUserRequest = new CreateMachineUserRequest(); // CreateMachineUserRequest | 

try {
    final result = await api_instance.createMachineUser(createMachineUserRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createMachineUser: $e\n');
}

import org.openapitools.client.api.MachineUsersApi;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        MachineUsersApi apiInstance = new MachineUsersApi();
        CreateMachineUserRequest createMachineUserRequest = ; // CreateMachineUserRequest | 

        try {
            MachineUser result = apiInstance.createMachineUser(createMachineUserRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#createMachineUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
MachineUsersApi *apiInstance = [[MachineUsersApi alloc] init];
CreateMachineUserRequest *createMachineUserRequest = ; // 

// Create machine user
[apiInstance createMachineUserWith:createMachineUserRequest
              completionHandler: ^(MachineUser output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.MachineUsersApi()
var createMachineUserRequest = ; // {CreateMachineUserRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createMachineUser(createMachineUserRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createMachineUserExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new MachineUsersApi();
            var createMachineUserRequest = new CreateMachineUserRequest(); // CreateMachineUserRequest | 

            try {
                // Create machine user
                MachineUser result = apiInstance.createMachineUser(createMachineUserRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling MachineUsersApi.createMachineUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\MachineUsersApi();
$createMachineUserRequest = ; // CreateMachineUserRequest | 

try {
    $result = $api_instance->createMachineUser($createMachineUserRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MachineUsersApi->createMachineUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::MachineUsersApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::MachineUsersApi->new();
my $createMachineUserRequest = WWW::OPenAPIClient::Object::CreateMachineUserRequest->new(); # CreateMachineUserRequest | 

eval {
    my $result = $api_instance->createMachineUser(createMachineUserRequest => $createMachineUserRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MachineUsersApi->createMachineUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.MachineUsersApi()
createMachineUserRequest =  # CreateMachineUserRequest | 

try:
    # Create machine user
    api_response = api_instance.create_machine_user(createMachineUserRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MachineUsersApi->createMachineUser: %s\n" % e)
extern crate MachineUsersApi;

pub fn main() {
    let createMachineUserRequest = ; // CreateMachineUserRequest

    let mut context = MachineUsersApi::Context::default();
    let result = client.createMachineUser(createMachineUserRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Body parameters
Name Description
createMachineUserRequest *

Responses


deleteMachineUser

Delete machine user

Remove a machine user. Every access key it holds is revoked in Knox first; if any revocation fails the machine user is kept and the call returns 503, so it can be retried. Deleting or disabling the human who created the machine user does not affect it.


/api/v1/auth/machine-users/{machineUserId}

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/problem+json" \
 "http://localhost:8082/api/v1/auth/machine-users/{machineUserId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.MachineUsersApi;

import java.io.File;
import java.util.*;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user

        try {
            apiInstance.deleteMachineUser(machineUserId);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#deleteMachineUser");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID machineUserId = new UUID(); // UUID | UUID of the machine user

try {
    final result = await api_instance.deleteMachineUser(machineUserId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteMachineUser: $e\n');
}

import org.openapitools.client.api.MachineUsersApi;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user

        try {
            apiInstance.deleteMachineUser(machineUserId);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#deleteMachineUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
MachineUsersApi *apiInstance = [[MachineUsersApi alloc] init];
UUID *machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID of the machine user (default to null)

// Delete machine user
[apiInstance deleteMachineUserWith:machineUserId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.MachineUsersApi()
var machineUserId = 550e8400-e29b-41d4-a716-446655440001; // {UUID} UUID of the machine user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteMachineUser(machineUserId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteMachineUserExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new MachineUsersApi();
            var machineUserId = 550e8400-e29b-41d4-a716-446655440001;  // UUID | UUID of the machine user (default to null)

            try {
                // Delete machine user
                apiInstance.deleteMachineUser(machineUserId);
            } catch (Exception e) {
                Debug.Print("Exception when calling MachineUsersApi.deleteMachineUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\MachineUsersApi();
$machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user

try {
    $api_instance->deleteMachineUser($machineUserId);
} catch (Exception $e) {
    echo 'Exception when calling MachineUsersApi->deleteMachineUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::MachineUsersApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::MachineUsersApi->new();
my $machineUserId = 550e8400-e29b-41d4-a716-446655440001; # UUID | UUID of the machine user

eval {
    $api_instance->deleteMachineUser(machineUserId => $machineUserId);
};
if ($@) {
    warn "Exception when calling MachineUsersApi->deleteMachineUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.MachineUsersApi()
machineUserId = 550e8400-e29b-41d4-a716-446655440001 # UUID | UUID of the machine user (default to null)

try:
    # Delete machine user
    api_instance.delete_machine_user(machineUserId)
except ApiException as e:
    print("Exception when calling MachineUsersApi->deleteMachineUser: %s\n" % e)
extern crate MachineUsersApi;

pub fn main() {
    let machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID

    let mut context = MachineUsersApi::Context::default();
    let result = client.deleteMachineUser(machineUserId, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
machineUserId*
UUID (uuid)
UUID of the machine user
Required

Responses


getMachineUser

Get machine user

Get details of a specific machine user


/api/v1/auth/machine-users/{machineUserId}

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/machine-users/{machineUserId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.MachineUsersApi;

import java.io.File;
import java.util.*;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user

        try {
            MachineUser result = apiInstance.getMachineUser(machineUserId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#getMachineUser");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID machineUserId = new UUID(); // UUID | UUID of the machine user

try {
    final result = await api_instance.getMachineUser(machineUserId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getMachineUser: $e\n');
}

import org.openapitools.client.api.MachineUsersApi;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user

        try {
            MachineUser result = apiInstance.getMachineUser(machineUserId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#getMachineUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
MachineUsersApi *apiInstance = [[MachineUsersApi alloc] init];
UUID *machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID of the machine user (default to null)

// Get machine user
[apiInstance getMachineUserWith:machineUserId
              completionHandler: ^(MachineUser output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.MachineUsersApi()
var machineUserId = 550e8400-e29b-41d4-a716-446655440001; // {UUID} UUID of the machine user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMachineUser(machineUserId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getMachineUserExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new MachineUsersApi();
            var machineUserId = 550e8400-e29b-41d4-a716-446655440001;  // UUID | UUID of the machine user (default to null)

            try {
                // Get machine user
                MachineUser result = apiInstance.getMachineUser(machineUserId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling MachineUsersApi.getMachineUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\MachineUsersApi();
$machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user

try {
    $result = $api_instance->getMachineUser($machineUserId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MachineUsersApi->getMachineUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::MachineUsersApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::MachineUsersApi->new();
my $machineUserId = 550e8400-e29b-41d4-a716-446655440001; # UUID | UUID of the machine user

eval {
    my $result = $api_instance->getMachineUser(machineUserId => $machineUserId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MachineUsersApi->getMachineUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.MachineUsersApi()
machineUserId = 550e8400-e29b-41d4-a716-446655440001 # UUID | UUID of the machine user (default to null)

try:
    # Get machine user
    api_response = api_instance.get_machine_user(machineUserId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MachineUsersApi->getMachineUser: %s\n" % e)
extern crate MachineUsersApi;

pub fn main() {
    let machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID

    let mut context = MachineUsersApi::Context::default();
    let result = client.getMachineUser(machineUserId, &context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
machineUserId*
UUID (uuid)
UUID of the machine user
Required

Responses


listMachineUserAccessKeys

List access keys for a machine user

Lists the active client credentials held by this machine user, newest first, in the same shape as GET /api/v1/auth/access-keys/credentials. Knox is the source of truth; AWC keeps no copy. The machine user in the path is the only selector. Secrets are never returned.


/api/v1/auth/machine-users/{machineUserId}/access-keys

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/machine-users/{machineUserId}/access-keys?limit=50&offset=0"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.MachineUsersApi;

import java.io.File;
import java.util.*;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            AccessKeySummaryList result = apiInstance.listMachineUserAccessKeys(machineUserId, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#listMachineUserAccessKeys");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID machineUserId = new UUID(); // UUID | UUID of the machine user
final Integer limit = new Integer(); // Integer | Maximum number of items to return
final Integer offset = new Integer(); // Integer | Number of items to skip before the returned page

try {
    final result = await api_instance.listMachineUserAccessKeys(machineUserId, limit, offset);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listMachineUserAccessKeys: $e\n');
}

import org.openapitools.client.api.MachineUsersApi;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            AccessKeySummaryList result = apiInstance.listMachineUserAccessKeys(machineUserId, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#listMachineUserAccessKeys");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
MachineUsersApi *apiInstance = [[MachineUsersApi alloc] init];
UUID *machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID of the machine user (default to null)
Integer *limit = 50; // Maximum number of items to return (optional) (default to 50)
Integer *offset = 0; // Number of items to skip before the returned page (optional) (default to 0)

// List access keys for a machine user
[apiInstance listMachineUserAccessKeysWith:machineUserId
    limit:limit
    offset:offset
              completionHandler: ^(AccessKeySummaryList output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.MachineUsersApi()
var machineUserId = 550e8400-e29b-41d4-a716-446655440001; // {UUID} UUID of the machine user
var opts = {
  'limit': 50, // {Integer} Maximum number of items to return
  'offset': 0 // {Integer} Number of items to skip before the returned page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listMachineUserAccessKeys(machineUserId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listMachineUserAccessKeysExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new MachineUsersApi();
            var machineUserId = 550e8400-e29b-41d4-a716-446655440001;  // UUID | UUID of the machine user (default to null)
            var limit = 50;  // Integer | Maximum number of items to return (optional)  (default to 50)
            var offset = 0;  // Integer | Number of items to skip before the returned page (optional)  (default to 0)

            try {
                // List access keys for a machine user
                AccessKeySummaryList result = apiInstance.listMachineUserAccessKeys(machineUserId, limit, offset);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling MachineUsersApi.listMachineUserAccessKeys: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\MachineUsersApi();
$machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
$limit = 50; // Integer | Maximum number of items to return
$offset = 0; // Integer | Number of items to skip before the returned page

try {
    $result = $api_instance->listMachineUserAccessKeys($machineUserId, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MachineUsersApi->listMachineUserAccessKeys: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::MachineUsersApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::MachineUsersApi->new();
my $machineUserId = 550e8400-e29b-41d4-a716-446655440001; # UUID | UUID of the machine user
my $limit = 50; # Integer | Maximum number of items to return
my $offset = 0; # Integer | Number of items to skip before the returned page

eval {
    my $result = $api_instance->listMachineUserAccessKeys(machineUserId => $machineUserId, limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MachineUsersApi->listMachineUserAccessKeys: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.MachineUsersApi()
machineUserId = 550e8400-e29b-41d4-a716-446655440001 # UUID | UUID of the machine user (default to null)
limit = 50 # Integer | Maximum number of items to return (optional) (default to 50)
offset = 0 # Integer | Number of items to skip before the returned page (optional) (default to 0)

try:
    # List access keys for a machine user
    api_response = api_instance.list_machine_user_access_keys(machineUserId, limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MachineUsersApi->listMachineUserAccessKeys: %s\n" % e)
extern crate MachineUsersApi;

pub fn main() {
    let machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID
    let limit = 50; // Integer
    let offset = 0; // Integer

    let mut context = MachineUsersApi::Context::default();
    let result = client.listMachineUserAccessKeys(machineUserId, limit, offset, &context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
machineUserId*
UUID (uuid)
UUID of the machine user
Required
Query parameters
Name Description
limit
Integer
Maximum number of items to return
offset
Integer
Number of items to skip before the returned page

Responses


listMachineUsers

List all machine users

Returns all machine users


/api/v1/auth/machine-users

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/machine-users?limit=50&offset=0"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.MachineUsersApi;

import java.io.File;
import java.util.*;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        MachineUsersApi apiInstance = new MachineUsersApi();
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            listMachineUsers_200_response result = apiInstance.listMachineUsers(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#listMachineUsers");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer limit = new Integer(); // Integer | Maximum number of items to return
final Integer offset = new Integer(); // Integer | Number of items to skip before the returned page

try {
    final result = await api_instance.listMachineUsers(limit, offset);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listMachineUsers: $e\n');
}

import org.openapitools.client.api.MachineUsersApi;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        MachineUsersApi apiInstance = new MachineUsersApi();
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            listMachineUsers_200_response result = apiInstance.listMachineUsers(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#listMachineUsers");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
MachineUsersApi *apiInstance = [[MachineUsersApi alloc] init];
Integer *limit = 50; // Maximum number of items to return (optional) (default to 50)
Integer *offset = 0; // Number of items to skip before the returned page (optional) (default to 0)

// List all machine users
[apiInstance listMachineUsersWith:limit
    offset:offset
              completionHandler: ^(listMachineUsers_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.MachineUsersApi()
var opts = {
  'limit': 50, // {Integer} Maximum number of items to return
  'offset': 0 // {Integer} Number of items to skip before the returned page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listMachineUsers(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listMachineUsersExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new MachineUsersApi();
            var limit = 50;  // Integer | Maximum number of items to return (optional)  (default to 50)
            var offset = 0;  // Integer | Number of items to skip before the returned page (optional)  (default to 0)

            try {
                // List all machine users
                listMachineUsers_200_response result = apiInstance.listMachineUsers(limit, offset);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling MachineUsersApi.listMachineUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\MachineUsersApi();
$limit = 50; // Integer | Maximum number of items to return
$offset = 0; // Integer | Number of items to skip before the returned page

try {
    $result = $api_instance->listMachineUsers($limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MachineUsersApi->listMachineUsers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::MachineUsersApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::MachineUsersApi->new();
my $limit = 50; # Integer | Maximum number of items to return
my $offset = 0; # Integer | Number of items to skip before the returned page

eval {
    my $result = $api_instance->listMachineUsers(limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MachineUsersApi->listMachineUsers: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.MachineUsersApi()
limit = 50 # Integer | Maximum number of items to return (optional) (default to 50)
offset = 0 # Integer | Number of items to skip before the returned page (optional) (default to 0)

try:
    # List all machine users
    api_response = api_instance.list_machine_users(limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MachineUsersApi->listMachineUsers: %s\n" % e)
extern crate MachineUsersApi;

pub fn main() {
    let limit = 50; // Integer
    let offset = 0; // Integer

    let mut context = MachineUsersApi::Context::default();
    let result = client.listMachineUsers(limit, offset, &context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Query parameters
Name Description
limit
Integer
Maximum number of items to return
offset
Integer
Number of items to skip before the returned page

Responses


provisionMachineUserAccessKey

Provision access key for a machine user

Mint a new client_id/client_secret pair for a machine user via Knox. The credentials authenticate as the machine user's `principal` and are exchanged for a short-lived JWT at POST /api/v1/auth/access-keys/token. The secret is returned only in this response. Knox keeps at most 100 credentials per machine user; minting past that silently revokes the oldest one. Requires Knox integration to be enabled (KNOX_BOUNDARY_ENABLED=false).


/api/v1/auth/machine-users/{machineUserId}/access-keys

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/machine-users/{machineUserId}/access-keys" \
 -d '{
  "name" : "etl-nightly",
  "description" : "Nightly ETL pipeline in Jenkins"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.MachineUsersApi;

import java.io.File;
import java.util.*;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
        ProvisionAccessKeyRequest provisionAccessKeyRequest = ; // ProvisionAccessKeyRequest | 

        try {
            MachineUserAccessKeyResponse result = apiInstance.provisionMachineUserAccessKey(machineUserId, provisionAccessKeyRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#provisionMachineUserAccessKey");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID machineUserId = new UUID(); // UUID | UUID of the machine user
final ProvisionAccessKeyRequest provisionAccessKeyRequest = new ProvisionAccessKeyRequest(); // ProvisionAccessKeyRequest | 

try {
    final result = await api_instance.provisionMachineUserAccessKey(machineUserId, provisionAccessKeyRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->provisionMachineUserAccessKey: $e\n');
}

import org.openapitools.client.api.MachineUsersApi;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
        ProvisionAccessKeyRequest provisionAccessKeyRequest = ; // ProvisionAccessKeyRequest | 

        try {
            MachineUserAccessKeyResponse result = apiInstance.provisionMachineUserAccessKey(machineUserId, provisionAccessKeyRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#provisionMachineUserAccessKey");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
MachineUsersApi *apiInstance = [[MachineUsersApi alloc] init];
UUID *machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID of the machine user (default to null)
ProvisionAccessKeyRequest *provisionAccessKeyRequest = ; //  (optional)

// Provision access key for a machine user
[apiInstance provisionMachineUserAccessKeyWith:machineUserId
    provisionAccessKeyRequest:provisionAccessKeyRequest
              completionHandler: ^(MachineUserAccessKeyResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.MachineUsersApi()
var machineUserId = 550e8400-e29b-41d4-a716-446655440001; // {UUID} UUID of the machine user
var opts = {
  'provisionAccessKeyRequest':  // {ProvisionAccessKeyRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.provisionMachineUserAccessKey(machineUserId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class provisionMachineUserAccessKeyExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new MachineUsersApi();
            var machineUserId = 550e8400-e29b-41d4-a716-446655440001;  // UUID | UUID of the machine user (default to null)
            var provisionAccessKeyRequest = new ProvisionAccessKeyRequest(); // ProvisionAccessKeyRequest |  (optional) 

            try {
                // Provision access key for a machine user
                MachineUserAccessKeyResponse result = apiInstance.provisionMachineUserAccessKey(machineUserId, provisionAccessKeyRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling MachineUsersApi.provisionMachineUserAccessKey: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\MachineUsersApi();
$machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
$provisionAccessKeyRequest = ; // ProvisionAccessKeyRequest | 

try {
    $result = $api_instance->provisionMachineUserAccessKey($machineUserId, $provisionAccessKeyRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MachineUsersApi->provisionMachineUserAccessKey: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::MachineUsersApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::MachineUsersApi->new();
my $machineUserId = 550e8400-e29b-41d4-a716-446655440001; # UUID | UUID of the machine user
my $provisionAccessKeyRequest = WWW::OPenAPIClient::Object::ProvisionAccessKeyRequest->new(); # ProvisionAccessKeyRequest | 

eval {
    my $result = $api_instance->provisionMachineUserAccessKey(machineUserId => $machineUserId, provisionAccessKeyRequest => $provisionAccessKeyRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MachineUsersApi->provisionMachineUserAccessKey: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.MachineUsersApi()
machineUserId = 550e8400-e29b-41d4-a716-446655440001 # UUID | UUID of the machine user (default to null)
provisionAccessKeyRequest =  # ProvisionAccessKeyRequest |  (optional)

try:
    # Provision access key for a machine user
    api_response = api_instance.provision_machine_user_access_key(machineUserId, provisionAccessKeyRequest=provisionAccessKeyRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MachineUsersApi->provisionMachineUserAccessKey: %s\n" % e)
extern crate MachineUsersApi;

pub fn main() {
    let machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID
    let provisionAccessKeyRequest = ; // ProvisionAccessKeyRequest

    let mut context = MachineUsersApi::Context::default();
    let result = client.provisionMachineUserAccessKey(machineUserId, provisionAccessKeyRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
machineUserId*
UUID (uuid)
UUID of the machine user
Required
Body parameters
Name Description
provisionAccessKeyRequest

Responses


revokeMachineUserAccessKey

Revoke an access key for a machine user

Revoke one of this machine user's client credentials. Takes no body. Returns 404 if the client_id does not belong to this machine user. The credential stops working at Knox immediately; a token already minted from it stays valid until it expires (about 1 hour).


/api/v1/auth/machine-users/{machineUserId}/access-keys/{clientId}

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/problem+json" \
 "http://localhost:8082/api/v1/auth/machine-users/{machineUserId}/access-keys/{clientId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.MachineUsersApi;

import java.io.File;
import java.util.*;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
        String clientId = clientId_example; // String | The client_id of the credential to revoke

        try {
            apiInstance.revokeMachineUserAccessKey(machineUserId, clientId);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#revokeMachineUserAccessKey");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID machineUserId = new UUID(); // UUID | UUID of the machine user
final String clientId = new String(); // String | The client_id of the credential to revoke

try {
    final result = await api_instance.revokeMachineUserAccessKey(machineUserId, clientId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->revokeMachineUserAccessKey: $e\n');
}

import org.openapitools.client.api.MachineUsersApi;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
        String clientId = clientId_example; // String | The client_id of the credential to revoke

        try {
            apiInstance.revokeMachineUserAccessKey(machineUserId, clientId);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#revokeMachineUserAccessKey");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
MachineUsersApi *apiInstance = [[MachineUsersApi alloc] init];
UUID *machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID of the machine user (default to null)
String *clientId = clientId_example; // The client_id of the credential to revoke (default to null)

// Revoke an access key for a machine user
[apiInstance revokeMachineUserAccessKeyWith:machineUserId
    clientId:clientId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.MachineUsersApi()
var machineUserId = 550e8400-e29b-41d4-a716-446655440001; // {UUID} UUID of the machine user
var clientId = clientId_example; // {String} The client_id of the credential to revoke

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.revokeMachineUserAccessKey(machineUserId, clientId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class revokeMachineUserAccessKeyExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new MachineUsersApi();
            var machineUserId = 550e8400-e29b-41d4-a716-446655440001;  // UUID | UUID of the machine user (default to null)
            var clientId = clientId_example;  // String | The client_id of the credential to revoke (default to null)

            try {
                // Revoke an access key for a machine user
                apiInstance.revokeMachineUserAccessKey(machineUserId, clientId);
            } catch (Exception e) {
                Debug.Print("Exception when calling MachineUsersApi.revokeMachineUserAccessKey: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\MachineUsersApi();
$machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
$clientId = clientId_example; // String | The client_id of the credential to revoke

try {
    $api_instance->revokeMachineUserAccessKey($machineUserId, $clientId);
} catch (Exception $e) {
    echo 'Exception when calling MachineUsersApi->revokeMachineUserAccessKey: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::MachineUsersApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::MachineUsersApi->new();
my $machineUserId = 550e8400-e29b-41d4-a716-446655440001; # UUID | UUID of the machine user
my $clientId = clientId_example; # String | The client_id of the credential to revoke

eval {
    $api_instance->revokeMachineUserAccessKey(machineUserId => $machineUserId, clientId => $clientId);
};
if ($@) {
    warn "Exception when calling MachineUsersApi->revokeMachineUserAccessKey: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.MachineUsersApi()
machineUserId = 550e8400-e29b-41d4-a716-446655440001 # UUID | UUID of the machine user (default to null)
clientId = clientId_example # String | The client_id of the credential to revoke (default to null)

try:
    # Revoke an access key for a machine user
    api_instance.revoke_machine_user_access_key(machineUserId, clientId)
except ApiException as e:
    print("Exception when calling MachineUsersApi->revokeMachineUserAccessKey: %s\n" % e)
extern crate MachineUsersApi;

pub fn main() {
    let machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID
    let clientId = clientId_example; // String

    let mut context = MachineUsersApi::Context::default();
    let result = client.revokeMachineUserAccessKey(machineUserId, clientId, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
machineUserId*
UUID (uuid)
UUID of the machine user
Required
clientId*
String
The client_id of the credential to revoke
Required

Responses


updateMachineUser

Update machine user

Update an existing machine user


/api/v1/auth/machine-users/{machineUserId}

Usage and SDK Samples

curl -X PATCH \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/machine-users/{machineUserId}" \
 -d '{
  "name" : "updated-bot-name",
  "description" : "Updated description",
  "enabled" : false
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.MachineUsersApi;

import java.io.File;
import java.util.*;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
        UpdateMachineUserRequest updateMachineUserRequest = ; // UpdateMachineUserRequest | 

        try {
            MachineUser result = apiInstance.updateMachineUser(machineUserId, updateMachineUserRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#updateMachineUser");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID machineUserId = new UUID(); // UUID | UUID of the machine user
final UpdateMachineUserRequest updateMachineUserRequest = new UpdateMachineUserRequest(); // UpdateMachineUserRequest | 

try {
    final result = await api_instance.updateMachineUser(machineUserId, updateMachineUserRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateMachineUser: $e\n');
}

import org.openapitools.client.api.MachineUsersApi;

public class MachineUsersApiExample {
    public static void main(String[] args) {
        MachineUsersApi apiInstance = new MachineUsersApi();
        UUID machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
        UpdateMachineUserRequest updateMachineUserRequest = ; // UpdateMachineUserRequest | 

        try {
            MachineUser result = apiInstance.updateMachineUser(machineUserId, updateMachineUserRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MachineUsersApi#updateMachineUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
MachineUsersApi *apiInstance = [[MachineUsersApi alloc] init];
UUID *machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID of the machine user (default to null)
UpdateMachineUserRequest *updateMachineUserRequest = ; // 

// Update machine user
[apiInstance updateMachineUserWith:machineUserId
    updateMachineUserRequest:updateMachineUserRequest
              completionHandler: ^(MachineUser output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.MachineUsersApi()
var machineUserId = 550e8400-e29b-41d4-a716-446655440001; // {UUID} UUID of the machine user
var updateMachineUserRequest = ; // {UpdateMachineUserRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateMachineUser(machineUserId, updateMachineUserRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateMachineUserExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new MachineUsersApi();
            var machineUserId = 550e8400-e29b-41d4-a716-446655440001;  // UUID | UUID of the machine user (default to null)
            var updateMachineUserRequest = new UpdateMachineUserRequest(); // UpdateMachineUserRequest | 

            try {
                // Update machine user
                MachineUser result = apiInstance.updateMachineUser(machineUserId, updateMachineUserRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling MachineUsersApi.updateMachineUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\MachineUsersApi();
$machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID | UUID of the machine user
$updateMachineUserRequest = ; // UpdateMachineUserRequest | 

try {
    $result = $api_instance->updateMachineUser($machineUserId, $updateMachineUserRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MachineUsersApi->updateMachineUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::MachineUsersApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::MachineUsersApi->new();
my $machineUserId = 550e8400-e29b-41d4-a716-446655440001; # UUID | UUID of the machine user
my $updateMachineUserRequest = WWW::OPenAPIClient::Object::UpdateMachineUserRequest->new(); # UpdateMachineUserRequest | 

eval {
    my $result = $api_instance->updateMachineUser(machineUserId => $machineUserId, updateMachineUserRequest => $updateMachineUserRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MachineUsersApi->updateMachineUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.MachineUsersApi()
machineUserId = 550e8400-e29b-41d4-a716-446655440001 # UUID | UUID of the machine user (default to null)
updateMachineUserRequest =  # UpdateMachineUserRequest | 

try:
    # Update machine user
    api_response = api_instance.update_machine_user(machineUserId, updateMachineUserRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MachineUsersApi->updateMachineUser: %s\n" % e)
extern crate MachineUsersApi;

pub fn main() {
    let machineUserId = 550e8400-e29b-41d4-a716-446655440001; // UUID
    let updateMachineUserRequest = ; // UpdateMachineUserRequest

    let mut context = MachineUsersApi::Context::default();
    let result = client.updateMachineUser(machineUserId, updateMachineUserRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
machineUserId*
UUID (uuid)
UUID of the machine user
Required
Body parameters
Name Description
updateMachineUserRequest *

Responses


Permissions

listPermissions

List all permissions

Returns the full permissions catalog. Used by the UI for role management screens (assigning permissions to roles).


/api/v1/auth/permissions

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/permissions?limit=50&offset=0"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PermissionsApi;

import java.io.File;
import java.util.*;

public class PermissionsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        PermissionsApi apiInstance = new PermissionsApi();
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            listRolePermissions_200_response result = apiInstance.listPermissions(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#listPermissions");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer limit = new Integer(); // Integer | Maximum number of items to return
final Integer offset = new Integer(); // Integer | Number of items to skip before the returned page

try {
    final result = await api_instance.listPermissions(limit, offset);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listPermissions: $e\n');
}

import org.openapitools.client.api.PermissionsApi;

public class PermissionsApiExample {
    public static void main(String[] args) {
        PermissionsApi apiInstance = new PermissionsApi();
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            listRolePermissions_200_response result = apiInstance.listPermissions(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PermissionsApi#listPermissions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
PermissionsApi *apiInstance = [[PermissionsApi alloc] init];
Integer *limit = 50; // Maximum number of items to return (optional) (default to 50)
Integer *offset = 0; // Number of items to skip before the returned page (optional) (default to 0)

// List all permissions
[apiInstance listPermissionsWith:limit
    offset:offset
              completionHandler: ^(listRolePermissions_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.PermissionsApi()
var opts = {
  'limit': 50, // {Integer} Maximum number of items to return
  'offset': 0 // {Integer} Number of items to skip before the returned page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listPermissions(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listPermissionsExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new PermissionsApi();
            var limit = 50;  // Integer | Maximum number of items to return (optional)  (default to 50)
            var offset = 0;  // Integer | Number of items to skip before the returned page (optional)  (default to 0)

            try {
                // List all permissions
                listRolePermissions_200_response result = apiInstance.listPermissions(limit, offset);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PermissionsApi.listPermissions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PermissionsApi();
$limit = 50; // Integer | Maximum number of items to return
$offset = 0; // Integer | Number of items to skip before the returned page

try {
    $result = $api_instance->listPermissions($limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PermissionsApi->listPermissions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PermissionsApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PermissionsApi->new();
my $limit = 50; # Integer | Maximum number of items to return
my $offset = 0; # Integer | Number of items to skip before the returned page

eval {
    my $result = $api_instance->listPermissions(limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PermissionsApi->listPermissions: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.PermissionsApi()
limit = 50 # Integer | Maximum number of items to return (optional) (default to 50)
offset = 0 # Integer | Number of items to skip before the returned page (optional) (default to 0)

try:
    # List all permissions
    api_response = api_instance.list_permissions(limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PermissionsApi->listPermissions: %s\n" % e)
extern crate PermissionsApi;

pub fn main() {
    let limit = 50; // Integer
    let offset = 0; // Integer

    let mut context = PermissionsApi::Context::default();
    let result = client.listPermissions(limit, offset, &context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Query parameters
Name Description
limit
Integer
Maximum number of items to return
offset
Integer
Number of items to skip before the returned page

Responses


Roles

addRoleMember

Add role member

Add a user or group to a role. Idempotent: if the member already belongs to the role, the request succeeds and the existing membership is returned. Role membership is a set — duplicate adds have the same postcondition as a fresh insert and do not produce an error. When the member is a machine user (a `user` member whose id is an `awc-mu-` principal), the caller must hold the same role themselves; otherwise the request is rejected with 403 `ROLE_CEILING_EXCEEDED`.


/api/v1/auth/roles/{roleId}/members

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/roles/{roleId}/members?scope=global" \
 -d '{
  "member_type" : "user",
  "member_id" : "john.doe@example.com"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        AddRoleMemberRequest addRoleMemberRequest = ; // AddRoleMemberRequest | 
        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            RoleMember result = apiInstance.addRoleMember(roleId, addRoleMemberRequest, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#addRoleMember");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String roleId = new String(); // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

final AddRoleMemberRequest addRoleMemberRequest = new AddRoleMemberRequest(); // AddRoleMemberRequest | 
final String scope = new String(); // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    final result = await api_instance.addRoleMember(roleId, addRoleMemberRequest, scope);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->addRoleMember: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        AddRoleMemberRequest addRoleMemberRequest = ; // AddRoleMemberRequest | 
        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            RoleMember result = apiInstance.addRoleMember(roleId, addRoleMemberRequest, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#addRoleMember");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
String *roleId = platform-admin; // UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
AddRoleMemberRequest *addRoleMemberRequest = ; // 
String *scope = global; // Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

// Add role member
[apiInstance addRoleMemberWith:roleId
    addRoleMemberRequest:addRoleMemberRequest
    scope:scope
              completionHandler: ^(RoleMember output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var roleId = platform-admin; // {String} UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

var addRoleMemberRequest = ; // {AddRoleMemberRequest} 
var opts = {
  'scope': global // {String} Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.addRoleMember(roleId, addRoleMemberRequest, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class addRoleMemberExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var roleId = platform-admin;  // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
            var addRoleMemberRequest = new AddRoleMemberRequest(); // AddRoleMemberRequest | 
            var scope = global;  // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional)  (default to null)

            try {
                // Add role member
                RoleMember result = apiInstance.addRoleMember(roleId, addRoleMemberRequest, scope);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.addRoleMember: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

$addRoleMemberRequest = ; // AddRoleMemberRequest | 
$scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    $result = $api_instance->addRoleMember($roleId, $addRoleMemberRequest, $scope);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->addRoleMember: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $roleId = platform-admin; # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

my $addRoleMemberRequest = WWW::OPenAPIClient::Object::AddRoleMemberRequest->new(); # AddRoleMemberRequest | 
my $scope = global; # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


eval {
    my $result = $api_instance->addRoleMember(roleId => $roleId, addRoleMemberRequest => $addRoleMemberRequest, scope => $scope);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->addRoleMember: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
roleId = platform-admin # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
addRoleMemberRequest =  # AddRoleMemberRequest | 
scope = global # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

try:
    # Add role member
    api_response = api_instance.add_role_member(roleId, addRoleMemberRequest, scope=scope)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->addRoleMember: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let roleId = platform-admin; // String
    let addRoleMemberRequest = ; // AddRoleMemberRequest
    let scope = global; // String

    let mut context = RolesApi::Context::default();
    let result = client.addRoleMember(roleId, addRoleMemberRequest, scope, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
roleId*
String
UUID or name of the role. When a name is given, the `scope` query parameter is REQUIRED to disambiguate — role names are unique only within a scope (UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role directly.
Required
Body parameters
Name Description
addRoleMemberRequest *

Query parameters
Name Description
scope
String
Scope that qualifies a role addressed by name in the path. REQUIRED when `roleId` is a role name (names are unique only within a scope). When `roleId` is a UUID this parameter may be omitted; if supplied it must match the resolved role's scope, otherwise the role is reported as not found. When present the value must be a valid RFC 1123 label (max 63 characters, the Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than treated as absent, so a request that meant to scope a lookup is never silently resolved without one.

Responses


addRolePermission

Add permission to role

Adds a single permission to a role. Idempotent: adding a permission that is already assigned is a no-op. Returns 404 if the role or permission does not exist.


/api/v1/auth/roles/{roleId}/permissions/{permissionId}

Usage and SDK Samples

curl -X PUT \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/problem+json" \
 "http://localhost:8082/api/v1/auth/roles/{roleId}/permissions/{permissionId}?scope=global"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        UUID permissionId = 550e8400-e29b-41d4-a716-446655440010; // UUID | UUID of the permission
        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            apiInstance.addRolePermission(roleId, permissionId, scope);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#addRolePermission");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String roleId = new String(); // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

final UUID permissionId = new UUID(); // UUID | UUID of the permission
final String scope = new String(); // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    final result = await api_instance.addRolePermission(roleId, permissionId, scope);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->addRolePermission: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        UUID permissionId = 550e8400-e29b-41d4-a716-446655440010; // UUID | UUID of the permission
        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            apiInstance.addRolePermission(roleId, permissionId, scope);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#addRolePermission");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
String *roleId = platform-admin; // UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
UUID *permissionId = 550e8400-e29b-41d4-a716-446655440010; // UUID of the permission (default to null)
String *scope = global; // Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

// Add permission to role
[apiInstance addRolePermissionWith:roleId
    permissionId:permissionId
    scope:scope
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var roleId = platform-admin; // {String} UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

var permissionId = 550e8400-e29b-41d4-a716-446655440010; // {UUID} UUID of the permission
var opts = {
  'scope': global // {String} Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addRolePermission(roleId, permissionId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class addRolePermissionExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var roleId = platform-admin;  // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
            var permissionId = 550e8400-e29b-41d4-a716-446655440010;  // UUID | UUID of the permission (default to null)
            var scope = global;  // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional)  (default to null)

            try {
                // Add permission to role
                apiInstance.addRolePermission(roleId, permissionId, scope);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.addRolePermission: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

$permissionId = 550e8400-e29b-41d4-a716-446655440010; // UUID | UUID of the permission
$scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    $api_instance->addRolePermission($roleId, $permissionId, $scope);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->addRolePermission: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $roleId = platform-admin; # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

my $permissionId = 550e8400-e29b-41d4-a716-446655440010; # UUID | UUID of the permission
my $scope = global; # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


eval {
    $api_instance->addRolePermission(roleId => $roleId, permissionId => $permissionId, scope => $scope);
};
if ($@) {
    warn "Exception when calling RolesApi->addRolePermission: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
roleId = platform-admin # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
permissionId = 550e8400-e29b-41d4-a716-446655440010 # UUID | UUID of the permission (default to null)
scope = global # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

try:
    # Add permission to role
    api_instance.add_role_permission(roleId, permissionId, scope=scope)
except ApiException as e:
    print("Exception when calling RolesApi->addRolePermission: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let roleId = platform-admin; // String
    let permissionId = 550e8400-e29b-41d4-a716-446655440010; // UUID
    let scope = global; // String

    let mut context = RolesApi::Context::default();
    let result = client.addRolePermission(roleId, permissionId, scope, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
roleId*
String
UUID or name of the role. When a name is given, the `scope` query parameter is REQUIRED to disambiguate — role names are unique only within a scope (UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role directly.
Required
permissionId*
UUID (uuid)
UUID of the permission
Required
Query parameters
Name Description
scope
String
Scope that qualifies a role addressed by name in the path. REQUIRED when `roleId` is a role name (names are unique only within a scope). When `roleId` is a UUID this parameter may be omitted; if supplied it must match the resolved role's scope, otherwise the role is reported as not found. When present the value must be a valid RFC 1123 label (max 63 characters, the Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than treated as absent, so a request that meant to scope a lookup is never silently resolved without one.

Responses


createRole

Create role

Create a new role for access control


/api/v1/auth/roles

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/roles" \
 -d '{
  "scope" : "platform",
  "name" : "cluster-admin",
  "description" : "Full administrative access to all clusters"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        CreateRoleRequest createRoleRequest = ; // CreateRoleRequest | 

        try {
            Role result = apiInstance.createRole(createRoleRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#createRole");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateRoleRequest createRoleRequest = new CreateRoleRequest(); // CreateRoleRequest | 

try {
    final result = await api_instance.createRole(createRoleRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createRole: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        CreateRoleRequest createRoleRequest = ; // CreateRoleRequest | 

        try {
            Role result = apiInstance.createRole(createRoleRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#createRole");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
CreateRoleRequest *createRoleRequest = ; // 

// Create role
[apiInstance createRoleWith:createRoleRequest
              completionHandler: ^(Role output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var createRoleRequest = ; // {CreateRoleRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createRole(createRoleRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createRoleExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var createRoleRequest = new CreateRoleRequest(); // CreateRoleRequest | 

            try {
                // Create role
                Role result = apiInstance.createRole(createRoleRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.createRole: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$createRoleRequest = ; // CreateRoleRequest | 

try {
    $result = $api_instance->createRole($createRoleRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->createRole: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $createRoleRequest = WWW::OPenAPIClient::Object::CreateRoleRequest->new(); # CreateRoleRequest | 

eval {
    my $result = $api_instance->createRole(createRoleRequest => $createRoleRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->createRole: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
createRoleRequest =  # CreateRoleRequest | 

try:
    # Create role
    api_response = api_instance.create_role(createRoleRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->createRole: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let createRoleRequest = ; // CreateRoleRequest

    let mut context = RolesApi::Context::default();
    let result = client.createRole(createRoleRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Body parameters
Name Description
createRoleRequest *

Responses


deleteRole

Delete role

Remove a role (also removes all member associations)


/api/v1/auth/roles/{roleId}

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/problem+json" \
 "http://localhost:8082/api/v1/auth/roles/{roleId}?scope=global"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            apiInstance.deleteRole(roleId, scope);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#deleteRole");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String roleId = new String(); // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

final String scope = new String(); // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    final result = await api_instance.deleteRole(roleId, scope);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteRole: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            apiInstance.deleteRole(roleId, scope);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#deleteRole");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
String *roleId = platform-admin; // UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
String *scope = global; // Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

// Delete role
[apiInstance deleteRoleWith:roleId
    scope:scope
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var roleId = platform-admin; // {String} UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

var opts = {
  'scope': global // {String} Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteRole(roleId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteRoleExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var roleId = platform-admin;  // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
            var scope = global;  // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional)  (default to null)

            try {
                // Delete role
                apiInstance.deleteRole(roleId, scope);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.deleteRole: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

$scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    $api_instance->deleteRole($roleId, $scope);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->deleteRole: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $roleId = platform-admin; # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

my $scope = global; # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


eval {
    $api_instance->deleteRole(roleId => $roleId, scope => $scope);
};
if ($@) {
    warn "Exception when calling RolesApi->deleteRole: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
roleId = platform-admin # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
scope = global # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

try:
    # Delete role
    api_instance.delete_role(roleId, scope=scope)
except ApiException as e:
    print("Exception when calling RolesApi->deleteRole: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let roleId = platform-admin; // String
    let scope = global; // String

    let mut context = RolesApi::Context::default();
    let result = client.deleteRole(roleId, scope, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
roleId*
String
UUID or name of the role. When a name is given, the `scope` query parameter is REQUIRED to disambiguate — role names are unique only within a scope (UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role directly.
Required
Query parameters
Name Description
scope
String
Scope that qualifies a role addressed by name in the path. REQUIRED when `roleId` is a role name (names are unique only within a scope). When `roleId` is a UUID this parameter may be omitted; if supplied it must match the resolved role's scope, otherwise the role is reported as not found. When present the value must be a valid RFC 1123 label (max 63 characters, the Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than treated as absent, so a request that meant to scope a lookup is never silently resolved without one.

Responses


getRole

Get role

Get details of a specific role including its members. The Knox gateway's mesh identity (x-awc-source-workload-id) may also call this endpoint without view_iam, for its LDAP proxy group lookups.


/api/v1/auth/roles/{roleId}

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/roles/{roleId}?scope=global"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            Role result = apiInstance.getRole(roleId, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#getRole");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String roleId = new String(); // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

final String scope = new String(); // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    final result = await api_instance.getRole(roleId, scope);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getRole: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            Role result = apiInstance.getRole(roleId, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#getRole");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
String *roleId = platform-admin; // UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
String *scope = global; // Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

// Get role
[apiInstance getRoleWith:roleId
    scope:scope
              completionHandler: ^(Role output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var roleId = platform-admin; // {String} UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

var opts = {
  'scope': global // {String} Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getRole(roleId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getRoleExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var roleId = platform-admin;  // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
            var scope = global;  // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional)  (default to null)

            try {
                // Get role
                Role result = apiInstance.getRole(roleId, scope);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.getRole: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

$scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    $result = $api_instance->getRole($roleId, $scope);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->getRole: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $roleId = platform-admin; # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

my $scope = global; # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


eval {
    my $result = $api_instance->getRole(roleId => $roleId, scope => $scope);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->getRole: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
roleId = platform-admin # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
scope = global # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

try:
    # Get role
    api_response = api_instance.get_role(roleId, scope=scope)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->getRole: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let roleId = platform-admin; // String
    let scope = global; // String

    let mut context = RolesApi::Context::default();
    let result = client.getRole(roleId, scope, &context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
roleId*
String
UUID or name of the role. When a name is given, the `scope` query parameter is REQUIRED to disambiguate — role names are unique only within a scope (UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role directly.
Required
Query parameters
Name Description
scope
String
Scope that qualifies a role addressed by name in the path. REQUIRED when `roleId` is a role name (names are unique only within a scope). When `roleId` is a UUID this parameter may be omitted; if supplied it must match the resolved role's scope, otherwise the role is reported as not found. When present the value must be a valid RFC 1123 label (max 63 characters, the Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than treated as absent, so a request that meant to scope a lookup is never silently resolved without one.

Responses


listRolePermissions

List role permissions

Returns the permissions assigned to a specific role. The roleId parameter accepts either a UUID or a role name.


/api/v1/auth/roles/{roleId}/permissions

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/roles/{roleId}/permissions?scope=global&limit=50&offset=0"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            listRolePermissions_200_response result = apiInstance.listRolePermissions(roleId, scope, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#listRolePermissions");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String roleId = new String(); // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

final String scope = new String(); // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

final Integer limit = new Integer(); // Integer | Maximum number of items to return
final Integer offset = new Integer(); // Integer | Number of items to skip before the returned page

try {
    final result = await api_instance.listRolePermissions(roleId, scope, limit, offset);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listRolePermissions: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            listRolePermissions_200_response result = apiInstance.listRolePermissions(roleId, scope, limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#listRolePermissions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
String *roleId = platform-admin; // UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
String *scope = global; // Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)
Integer *limit = 50; // Maximum number of items to return (optional) (default to 50)
Integer *offset = 0; // Number of items to skip before the returned page (optional) (default to 0)

// List role permissions
[apiInstance listRolePermissionsWith:roleId
    scope:scope
    limit:limit
    offset:offset
              completionHandler: ^(listRolePermissions_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var roleId = platform-admin; // {String} UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

var opts = {
  'scope': global, // {String} Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

  'limit': 50, // {Integer} Maximum number of items to return
  'offset': 0 // {Integer} Number of items to skip before the returned page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listRolePermissions(roleId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listRolePermissionsExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var roleId = platform-admin;  // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
            var scope = global;  // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional)  (default to null)
            var limit = 50;  // Integer | Maximum number of items to return (optional)  (default to 50)
            var offset = 0;  // Integer | Number of items to skip before the returned page (optional)  (default to 0)

            try {
                // List role permissions
                listRolePermissions_200_response result = apiInstance.listRolePermissions(roleId, scope, limit, offset);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.listRolePermissions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

$scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

$limit = 50; // Integer | Maximum number of items to return
$offset = 0; // Integer | Number of items to skip before the returned page

try {
    $result = $api_instance->listRolePermissions($roleId, $scope, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->listRolePermissions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $roleId = platform-admin; # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

my $scope = global; # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

my $limit = 50; # Integer | Maximum number of items to return
my $offset = 0; # Integer | Number of items to skip before the returned page

eval {
    my $result = $api_instance->listRolePermissions(roleId => $roleId, scope => $scope, limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->listRolePermissions: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
roleId = platform-admin # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
scope = global # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)
limit = 50 # Integer | Maximum number of items to return (optional) (default to 50)
offset = 0 # Integer | Number of items to skip before the returned page (optional) (default to 0)

try:
    # List role permissions
    api_response = api_instance.list_role_permissions(roleId, scope=scope, limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->listRolePermissions: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let roleId = platform-admin; // String
    let scope = global; // String
    let limit = 50; // Integer
    let offset = 0; // Integer

    let mut context = RolesApi::Context::default();
    let result = client.listRolePermissions(roleId, scope, limit, offset, &context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
roleId*
String
UUID or name of the role. When a name is given, the `scope` query parameter is REQUIRED to disambiguate — role names are unique only within a scope (UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role directly.
Required
Query parameters
Name Description
scope
String
Scope that qualifies a role addressed by name in the path. REQUIRED when `roleId` is a role name (names are unique only within a scope). When `roleId` is a UUID this parameter may be omitted; if supplied it must match the resolved role's scope, otherwise the role is reported as not found. When present the value must be a valid RFC 1123 label (max 63 characters, the Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than treated as absent, so a request that meant to scope a lookup is never silently resolved without one.
limit
Integer
Maximum number of items to return
offset
Integer
Number of items to skip before the returned page

Responses


listRoles

List all roles

Returns all roles. Members are not included (performance). `name` and `scope` are exact-match filters that narrow the same list. A role name is unique only within a scope, so `name` alone yields one entry per scope that defines that name (or an empty array when none does); combine `name` with `scope` to identify a single role. `scope` alone yields all roles in that scope. The Knox gateway's mesh identity (x-awc-source-workload-id) may also call this endpoint without view_iam, for its LDAP proxy group lookups. secret-service's mesh identity (x-awc-source-workload-id) may also call this endpoint without view_iam, to resolve share grantees.


/api/v1/auth/roles

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/roles?name=platform-admin&limit=50&offset=0&scope=cai-team-alpha"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        String name = platform-admin; // String | Exact role name to filter by. Returns an empty data array if not found.
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page
        String scope = cai-team-alpha; // String | Filter roles by exact scope value. Returns only roles matching this scope.
Max 63 characters (Kubernetes namespace name / DNS label limit).


        try {
            listRoles_200_response result = apiInstance.listRoles(name, limit, offset, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#listRoles");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String name = new String(); // String | Exact role name to filter by. Returns an empty data array if not found.
final Integer limit = new Integer(); // Integer | Maximum number of items to return
final Integer offset = new Integer(); // Integer | Number of items to skip before the returned page
final String scope = new String(); // String | Filter roles by exact scope value. Returns only roles matching this scope.
Max 63 characters (Kubernetes namespace name / DNS label limit).


try {
    final result = await api_instance.listRoles(name, limit, offset, scope);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listRoles: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        String name = platform-admin; // String | Exact role name to filter by. Returns an empty data array if not found.
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page
        String scope = cai-team-alpha; // String | Filter roles by exact scope value. Returns only roles matching this scope.
Max 63 characters (Kubernetes namespace name / DNS label limit).


        try {
            listRoles_200_response result = apiInstance.listRoles(name, limit, offset, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#listRoles");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
String *name = platform-admin; // Exact role name to filter by. Returns an empty data array if not found. (optional) (default to null)
Integer *limit = 50; // Maximum number of items to return (optional) (default to 50)
Integer *offset = 0; // Number of items to skip before the returned page (optional) (default to 0)
String *scope = cai-team-alpha; // Filter roles by exact scope value. Returns only roles matching this scope.
Max 63 characters (Kubernetes namespace name / DNS label limit).
 (optional) (default to null)

// List all roles
[apiInstance listRolesWith:name
    limit:limit
    offset:offset
    scope:scope
              completionHandler: ^(listRoles_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var opts = {
  'name': platform-admin, // {String} Exact role name to filter by. Returns an empty data array if not found.
  'limit': 50, // {Integer} Maximum number of items to return
  'offset': 0, // {Integer} Number of items to skip before the returned page
  'scope': cai-team-alpha // {String} Filter roles by exact scope value. Returns only roles matching this scope.
Max 63 characters (Kubernetes namespace name / DNS label limit).

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listRoles(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listRolesExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var name = platform-admin;  // String | Exact role name to filter by. Returns an empty data array if not found. (optional)  (default to null)
            var limit = 50;  // Integer | Maximum number of items to return (optional)  (default to 50)
            var offset = 0;  // Integer | Number of items to skip before the returned page (optional)  (default to 0)
            var scope = cai-team-alpha;  // String | Filter roles by exact scope value. Returns only roles matching this scope.
Max 63 characters (Kubernetes namespace name / DNS label limit).
 (optional)  (default to null)

            try {
                // List all roles
                listRoles_200_response result = apiInstance.listRoles(name, limit, offset, scope);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.listRoles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$name = platform-admin; // String | Exact role name to filter by. Returns an empty data array if not found.
$limit = 50; // Integer | Maximum number of items to return
$offset = 0; // Integer | Number of items to skip before the returned page
$scope = cai-team-alpha; // String | Filter roles by exact scope value. Returns only roles matching this scope.
Max 63 characters (Kubernetes namespace name / DNS label limit).


try {
    $result = $api_instance->listRoles($name, $limit, $offset, $scope);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->listRoles: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $name = platform-admin; # String | Exact role name to filter by. Returns an empty data array if not found.
my $limit = 50; # Integer | Maximum number of items to return
my $offset = 0; # Integer | Number of items to skip before the returned page
my $scope = cai-team-alpha; # String | Filter roles by exact scope value. Returns only roles matching this scope.
Max 63 characters (Kubernetes namespace name / DNS label limit).


eval {
    my $result = $api_instance->listRoles(name => $name, limit => $limit, offset => $offset, scope => $scope);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->listRoles: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
name = platform-admin # String | Exact role name to filter by. Returns an empty data array if not found. (optional) (default to null)
limit = 50 # Integer | Maximum number of items to return (optional) (default to 50)
offset = 0 # Integer | Number of items to skip before the returned page (optional) (default to 0)
scope = cai-team-alpha # String | Filter roles by exact scope value. Returns only roles matching this scope.
Max 63 characters (Kubernetes namespace name / DNS label limit).
 (optional) (default to null)

try:
    # List all roles
    api_response = api_instance.list_roles(name=name, limit=limit, offset=offset, scope=scope)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->listRoles: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let name = platform-admin; // String
    let limit = 50; // Integer
    let offset = 0; // Integer
    let scope = cai-team-alpha; // String

    let mut context = RolesApi::Context::default();
    let result = client.listRoles(name, limit, offset, scope, &context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Query parameters
Name Description
name
String
Exact role name to filter by. Returns an empty data array if not found.
limit
Integer
Maximum number of items to return
offset
Integer
Number of items to skip before the returned page
scope
String
Filter roles by exact scope value. Returns only roles matching this scope. Max 63 characters (Kubernetes namespace name / DNS label limit).

Responses


lookupRoles

Lookup roles for a user or group

Returns all roles mapped to the given user (directly or via group membership) or group. At least one user or group must be provided. Called by Knox on every authenticated request to populate the x-awc-roles header. Excluded from ext-authz via notPaths to avoid circular dependency. Only the Knox gateway's mesh identity (x-awc-source-workload-id) may call this endpoint. Any other caller, including a request through the console gateway, gets 403.


/api/v1/auth/roles/lookup

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/roles/lookup" \
 -d '{
  "user_id" : "alice",
  "groups" : [ "platform-admins", "ml-team", "engineering" ]
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        LookupRolesRequest lookupRolesRequest = ; // LookupRolesRequest | 

        try {
            LookupRolesResponse result = apiInstance.lookupRoles(lookupRolesRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#lookupRoles");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final LookupRolesRequest lookupRolesRequest = new LookupRolesRequest(); // LookupRolesRequest | 

try {
    final result = await api_instance.lookupRoles(lookupRolesRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->lookupRoles: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        LookupRolesRequest lookupRolesRequest = ; // LookupRolesRequest | 

        try {
            LookupRolesResponse result = apiInstance.lookupRoles(lookupRolesRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#lookupRoles");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
LookupRolesRequest *lookupRolesRequest = ; // 

// Lookup roles for a user or group
[apiInstance lookupRolesWith:lookupRolesRequest
              completionHandler: ^(LookupRolesResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var lookupRolesRequest = ; // {LookupRolesRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.lookupRoles(lookupRolesRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class lookupRolesExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var lookupRolesRequest = new LookupRolesRequest(); // LookupRolesRequest | 

            try {
                // Lookup roles for a user or group
                LookupRolesResponse result = apiInstance.lookupRoles(lookupRolesRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.lookupRoles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$lookupRolesRequest = ; // LookupRolesRequest | 

try {
    $result = $api_instance->lookupRoles($lookupRolesRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->lookupRoles: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $lookupRolesRequest = WWW::OPenAPIClient::Object::LookupRolesRequest->new(); # LookupRolesRequest | 

eval {
    my $result = $api_instance->lookupRoles(lookupRolesRequest => $lookupRolesRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->lookupRoles: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
lookupRolesRequest =  # LookupRolesRequest | 

try:
    # Lookup roles for a user or group
    api_response = api_instance.lookup_roles(lookupRolesRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->lookupRoles: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let lookupRolesRequest = ; // LookupRolesRequest

    let mut context = RolesApi::Context::default();
    let result = client.lookupRoles(lookupRolesRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
lookupRolesRequest *

Responses


removeRoleMember

Remove role member

Remove a user or group from a role


/api/v1/auth/roles/{roleId}/members/{memberId}

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/problem+json" \
 "http://localhost:8082/api/v1/auth/roles/{roleId}/members/{memberId}?scope=global"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        UUID memberId = 550e8400-e29b-41d4-a716-446655440003; // UUID | UUID of the role member
        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            apiInstance.removeRoleMember(roleId, memberId, scope);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#removeRoleMember");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String roleId = new String(); // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

final UUID memberId = new UUID(); // UUID | UUID of the role member
final String scope = new String(); // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    final result = await api_instance.removeRoleMember(roleId, memberId, scope);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->removeRoleMember: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        UUID memberId = 550e8400-e29b-41d4-a716-446655440003; // UUID | UUID of the role member
        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            apiInstance.removeRoleMember(roleId, memberId, scope);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#removeRoleMember");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
String *roleId = platform-admin; // UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
UUID *memberId = 550e8400-e29b-41d4-a716-446655440003; // UUID of the role member (default to null)
String *scope = global; // Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

// Remove role member
[apiInstance removeRoleMemberWith:roleId
    memberId:memberId
    scope:scope
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var roleId = platform-admin; // {String} UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

var memberId = 550e8400-e29b-41d4-a716-446655440003; // {UUID} UUID of the role member
var opts = {
  'scope': global // {String} Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeRoleMember(roleId, memberId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class removeRoleMemberExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var roleId = platform-admin;  // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
            var memberId = 550e8400-e29b-41d4-a716-446655440003;  // UUID | UUID of the role member (default to null)
            var scope = global;  // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional)  (default to null)

            try {
                // Remove role member
                apiInstance.removeRoleMember(roleId, memberId, scope);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.removeRoleMember: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

$memberId = 550e8400-e29b-41d4-a716-446655440003; // UUID | UUID of the role member
$scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    $api_instance->removeRoleMember($roleId, $memberId, $scope);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->removeRoleMember: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $roleId = platform-admin; # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

my $memberId = 550e8400-e29b-41d4-a716-446655440003; # UUID | UUID of the role member
my $scope = global; # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


eval {
    $api_instance->removeRoleMember(roleId => $roleId, memberId => $memberId, scope => $scope);
};
if ($@) {
    warn "Exception when calling RolesApi->removeRoleMember: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
roleId = platform-admin # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
memberId = 550e8400-e29b-41d4-a716-446655440003 # UUID | UUID of the role member (default to null)
scope = global # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

try:
    # Remove role member
    api_instance.remove_role_member(roleId, memberId, scope=scope)
except ApiException as e:
    print("Exception when calling RolesApi->removeRoleMember: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let roleId = platform-admin; // String
    let memberId = 550e8400-e29b-41d4-a716-446655440003; // UUID
    let scope = global; // String

    let mut context = RolesApi::Context::default();
    let result = client.removeRoleMember(roleId, memberId, scope, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
roleId*
String
UUID or name of the role. When a name is given, the `scope` query parameter is REQUIRED to disambiguate — role names are unique only within a scope (UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role directly.
Required
memberId*
UUID (uuid)
UUID of the role member
Required
Query parameters
Name Description
scope
String
Scope that qualifies a role addressed by name in the path. REQUIRED when `roleId` is a role name (names are unique only within a scope). When `roleId` is a UUID this parameter may be omitted; if supplied it must match the resolved role's scope, otherwise the role is reported as not found. When present the value must be a valid RFC 1123 label (max 63 characters, the Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than treated as absent, so a request that meant to scope a lookup is never silently resolved without one.

Responses


removeRolePermission

Remove permission from role

Removes a single permission from a role. Idempotent: removing a permission that is not currently assigned is a no-op. Returns 404 if the role or permission does not exist.


/api/v1/auth/roles/{roleId}/permissions/{permissionId}

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/problem+json" \
 "http://localhost:8082/api/v1/auth/roles/{roleId}/permissions/{permissionId}?scope=global"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        UUID permissionId = 550e8400-e29b-41d4-a716-446655440010; // UUID | UUID of the permission
        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            apiInstance.removeRolePermission(roleId, permissionId, scope);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#removeRolePermission");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String roleId = new String(); // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

final UUID permissionId = new UUID(); // UUID | UUID of the permission
final String scope = new String(); // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    final result = await api_instance.removeRolePermission(roleId, permissionId, scope);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->removeRolePermission: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        UUID permissionId = 550e8400-e29b-41d4-a716-446655440010; // UUID | UUID of the permission
        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            apiInstance.removeRolePermission(roleId, permissionId, scope);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#removeRolePermission");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
String *roleId = platform-admin; // UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
UUID *permissionId = 550e8400-e29b-41d4-a716-446655440010; // UUID of the permission (default to null)
String *scope = global; // Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

// Remove permission from role
[apiInstance removeRolePermissionWith:roleId
    permissionId:permissionId
    scope:scope
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var roleId = platform-admin; // {String} UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

var permissionId = 550e8400-e29b-41d4-a716-446655440010; // {UUID} UUID of the permission
var opts = {
  'scope': global // {String} Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.removeRolePermission(roleId, permissionId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class removeRolePermissionExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var roleId = platform-admin;  // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
            var permissionId = 550e8400-e29b-41d4-a716-446655440010;  // UUID | UUID of the permission (default to null)
            var scope = global;  // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional)  (default to null)

            try {
                // Remove permission from role
                apiInstance.removeRolePermission(roleId, permissionId, scope);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.removeRolePermission: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

$permissionId = 550e8400-e29b-41d4-a716-446655440010; // UUID | UUID of the permission
$scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    $api_instance->removeRolePermission($roleId, $permissionId, $scope);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->removeRolePermission: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $roleId = platform-admin; # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

my $permissionId = 550e8400-e29b-41d4-a716-446655440010; # UUID | UUID of the permission
my $scope = global; # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


eval {
    $api_instance->removeRolePermission(roleId => $roleId, permissionId => $permissionId, scope => $scope);
};
if ($@) {
    warn "Exception when calling RolesApi->removeRolePermission: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
roleId = platform-admin # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
permissionId = 550e8400-e29b-41d4-a716-446655440010 # UUID | UUID of the permission (default to null)
scope = global # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

try:
    # Remove permission from role
    api_instance.remove_role_permission(roleId, permissionId, scope=scope)
except ApiException as e:
    print("Exception when calling RolesApi->removeRolePermission: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let roleId = platform-admin; // String
    let permissionId = 550e8400-e29b-41d4-a716-446655440010; // UUID
    let scope = global; // String

    let mut context = RolesApi::Context::default();
    let result = client.removeRolePermission(roleId, permissionId, scope, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
roleId*
String
UUID or name of the role. When a name is given, the `scope` query parameter is REQUIRED to disambiguate — role names are unique only within a scope (UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role directly.
Required
permissionId*
UUID (uuid)
UUID of the permission
Required
Query parameters
Name Description
scope
String
Scope that qualifies a role addressed by name in the path. REQUIRED when `roleId` is a role name (names are unique only within a scope). When `roleId` is a UUID this parameter may be omitted; if supplied it must match the resolved role's scope, otherwise the role is reported as not found. When present the value must be a valid RFC 1123 label (max 63 characters, the Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than treated as absent, so a request that meant to scope a lookup is never silently resolved without one.

Responses


resolveRoles

Resolve roles for a member

Returns all roles mapped to a given member — directly or transitively through group membership. Used by AWC Console UI when admins want to see the full role picture for a member. - member_type=user: Queries Knox's LDAP proxy for the user's transitive group membership, then returns roles assigned to the user directly or to any of those groups. If the user is not found in LDAP (e.g., machine user), returns only direct DB assignments. - member_type=group: Pure DB lookup — returns roles directly assigned to this group. No LDAP query. Returns 200 with an empty roles array if no roles are found. Roles are not deduplicated — the same role from multiple paths appears multiple times.


/api/v1/auth/roles/resolve

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/roles/resolve?member_id=alice&member_type=user&scope=platform"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        String memberId = alice; // String | Identifier of the user or group in the customer's directory
        String memberType = user; // String | Whether the member is a user or group (required for disambiguation)
        String scope = platform; // String | Filter results to roles with this scope only

        try {
            ResolveRolesResponse result = apiInstance.resolveRoles(memberId, memberType, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#resolveRoles");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String memberId = new String(); // String | Identifier of the user or group in the customer's directory
final String memberType = new String(); // String | Whether the member is a user or group (required for disambiguation)
final String scope = new String(); // String | Filter results to roles with this scope only

try {
    final result = await api_instance.resolveRoles(memberId, memberType, scope);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->resolveRoles: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        String memberId = alice; // String | Identifier of the user or group in the customer's directory
        String memberType = user; // String | Whether the member is a user or group (required for disambiguation)
        String scope = platform; // String | Filter results to roles with this scope only

        try {
            ResolveRolesResponse result = apiInstance.resolveRoles(memberId, memberType, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#resolveRoles");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
String *memberId = alice; // Identifier of the user or group in the customer's directory (default to null)
String *memberType = user; // Whether the member is a user or group (required for disambiguation) (default to null)
String *scope = platform; // Filter results to roles with this scope only (optional) (default to null)

// Resolve roles for a member
[apiInstance resolveRolesWith:memberId
    memberType:memberType
    scope:scope
              completionHandler: ^(ResolveRolesResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var memberId = alice; // {String} Identifier of the user or group in the customer's directory
var memberType = user; // {String} Whether the member is a user or group (required for disambiguation)
var opts = {
  'scope': platform // {String} Filter results to roles with this scope only
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.resolveRoles(memberId, memberType, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class resolveRolesExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var memberId = alice;  // String | Identifier of the user or group in the customer's directory (default to null)
            var memberType = user;  // String | Whether the member is a user or group (required for disambiguation) (default to null)
            var scope = platform;  // String | Filter results to roles with this scope only (optional)  (default to null)

            try {
                // Resolve roles for a member
                ResolveRolesResponse result = apiInstance.resolveRoles(memberId, memberType, scope);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.resolveRoles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$memberId = alice; // String | Identifier of the user or group in the customer's directory
$memberType = user; // String | Whether the member is a user or group (required for disambiguation)
$scope = platform; // String | Filter results to roles with this scope only

try {
    $result = $api_instance->resolveRoles($memberId, $memberType, $scope);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->resolveRoles: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $memberId = alice; # String | Identifier of the user or group in the customer's directory
my $memberType = user; # String | Whether the member is a user or group (required for disambiguation)
my $scope = platform; # String | Filter results to roles with this scope only

eval {
    my $result = $api_instance->resolveRoles(memberId => $memberId, memberType => $memberType, scope => $scope);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->resolveRoles: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
memberId = alice # String | Identifier of the user or group in the customer's directory (default to null)
memberType = user # String | Whether the member is a user or group (required for disambiguation) (default to null)
scope = platform # String | Filter results to roles with this scope only (optional) (default to null)

try:
    # Resolve roles for a member
    api_response = api_instance.resolve_roles(memberId, memberType, scope=scope)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->resolveRoles: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let memberId = alice; // String
    let memberType = user; // String
    let scope = platform; // String

    let mut context = RolesApi::Context::default();
    let result = client.resolveRoles(memberId, memberType, scope, &context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Query parameters
Name Description
member_id*
String
Identifier of the user or group in the customer's directory
Required
member_type*
String
Whether the member is a user or group (required for disambiguation)
Required
scope
String
Filter results to roles with this scope only

Responses


updateRole

Update role

Update an existing role


/api/v1/auth/roles/{roleId}

Usage and SDK Samples

curl -X PATCH \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/roles/{roleId}?scope=global" \
 -d '{
  "scope" : "platform",
  "name" : "updated-role-name",
  "description" : "Updated role description"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RolesApi;

import java.io.File;
import java.util.*;

public class RolesApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        UpdateRoleRequest updateRoleRequest = ; // UpdateRoleRequest | 
        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            Role result = apiInstance.updateRole(roleId, updateRoleRequest, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#updateRole");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String roleId = new String(); // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

final UpdateRoleRequest updateRoleRequest = new UpdateRoleRequest(); // UpdateRoleRequest | 
final String scope = new String(); // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    final result = await api_instance.updateRole(roleId, updateRoleRequest, scope);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateRole: $e\n');
}

import org.openapitools.client.api.RolesApi;

public class RolesApiExample {
    public static void main(String[] args) {
        RolesApi apiInstance = new RolesApi();
        String roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

        UpdateRoleRequest updateRoleRequest = ; // UpdateRoleRequest | 
        String scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


        try {
            Role result = apiInstance.updateRole(roleId, updateRoleRequest, scope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RolesApi#updateRole");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
RolesApi *apiInstance = [[RolesApi alloc] init];
String *roleId = platform-admin; // UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
UpdateRoleRequest *updateRoleRequest = ; // 
String *scope = global; // Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

// Update role
[apiInstance updateRoleWith:roleId
    updateRoleRequest:updateRoleRequest
    scope:scope
              completionHandler: ^(Role output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.RolesApi()
var roleId = platform-admin; // {String} UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

var updateRoleRequest = ; // {UpdateRoleRequest} 
var opts = {
  'scope': global // {String} Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.

};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateRole(roleId, updateRoleRequest, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateRoleExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new RolesApi();
            var roleId = platform-admin;  // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
            var updateRoleRequest = new UpdateRoleRequest(); // UpdateRoleRequest | 
            var scope = global;  // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional)  (default to null)

            try {
                // Update role
                Role result = apiInstance.updateRole(roleId, updateRoleRequest, scope);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RolesApi.updateRole: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RolesApi();
$roleId = platform-admin; // String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

$updateRoleRequest = ; // UpdateRoleRequest | 
$scope = global; // String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


try {
    $result = $api_instance->updateRole($roleId, $updateRoleRequest, $scope);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RolesApi->updateRole: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RolesApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RolesApi->new();
my $roleId = platform-admin; # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.

my $updateRoleRequest = WWW::OPenAPIClient::Object::UpdateRoleRequest->new(); # UpdateRoleRequest | 
my $scope = global; # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.


eval {
    my $result = $api_instance->updateRole(roleId => $roleId, updateRoleRequest => $updateRoleRequest, scope => $scope);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RolesApi->updateRole: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.RolesApi()
roleId = platform-admin # String | UUID or name of the role. When a name is given, the `scope` query parameter
is REQUIRED to disambiguate — role names are unique only within a scope
(UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role
directly.
 (default to null)
updateRoleRequest =  # UpdateRoleRequest | 
scope = global # String | Scope that qualifies a role addressed by name in the path. REQUIRED when
`roleId` is a role name (names are unique only within a scope). When `roleId`
is a UUID this parameter may be omitted; if supplied it must match the resolved
role's scope, otherwise the role is reported as not found.

When present the value must be a valid RFC 1123 label (max 63 characters, the
Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or
a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than
treated as absent, so a request that meant to scope a lookup is never silently
resolved without one.
 (optional) (default to null)

try:
    # Update role
    api_response = api_instance.update_role(roleId, updateRoleRequest, scope=scope)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RolesApi->updateRole: %s\n" % e)
extern crate RolesApi;

pub fn main() {
    let roleId = platform-admin; // String
    let updateRoleRequest = ; // UpdateRoleRequest
    let scope = global; // String

    let mut context = RolesApi::Context::default();
    let result = client.updateRole(roleId, updateRoleRequest, scope, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
roleId*
String
UUID or name of the role. When a name is given, the `scope` query parameter is REQUIRED to disambiguate — role names are unique only within a scope (UNIQUE(scope, name)), so a name alone is ambiguous. A UUID resolves a role directly.
Required
Body parameters
Name Description
updateRoleRequest *

Query parameters
Name Description
scope
String
Scope that qualifies a role addressed by name in the path. REQUIRED when `roleId` is a role name (names are unique only within a scope). When `roleId` is a UUID this parameter may be omitted; if supplied it must match the resolved role's scope, otherwise the role is reported as not found. When present the value must be a valid RFC 1123 label (max 63 characters, the Kubernetes namespace name / DNS label limit). An empty value, a malformed value, or a repeated `scope` is rejected with `400 INVALID_QUERY_PARAMETER` rather than treated as absent, so a request that meant to scope a lookup is never silently resolved without one.

Responses


SSOConfigurations

createSsoConfiguration

Create or replace SSO configuration

Create or replace an SSO provider configuration. At most one configuration per provider_type is allowed. If a configuration with the same provider_type already exists, it is replaced atomically. Returns 201 on fresh create, 200 on replace. When `provider_type` is `saml` and an LDAP SSO row already exists, the server creates or replaces only the SAML overlay: `ldap_config` in the request is validated for shape but is not applied to the existing LDAP directory (bind password may be omitted). LDAP base-layer create, bind validation, and Knox LDAP apply run only when no LDAP row exists yet.


/api/v1/auth/sso-configurations

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/sso-configurations" \
 -d '{
  "provider_type" : "saml",
  "saml_config" : "",
  "ldap_config" : "",
  "name" : "Corporate SAML",
  "is_default" : false,
  "enabled" : true,
  "admin_user" : "admin@example.com"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SSOConfigurationsApi;

import java.io.File;
import java.util.*;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        CreateSSOConfigRequest createSSOConfigRequest = ; // CreateSSOConfigRequest | 

        try {
            SSOConfiguration result = apiInstance.createSsoConfiguration(createSSOConfigRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#createSsoConfiguration");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CreateSSOConfigRequest createSSOConfigRequest = new CreateSSOConfigRequest(); // CreateSSOConfigRequest | 

try {
    final result = await api_instance.createSsoConfiguration(createSSOConfigRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createSsoConfiguration: $e\n');
}

import org.openapitools.client.api.SSOConfigurationsApi;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        CreateSSOConfigRequest createSSOConfigRequest = ; // CreateSSOConfigRequest | 

        try {
            SSOConfiguration result = apiInstance.createSsoConfiguration(createSSOConfigRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#createSsoConfiguration");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SSOConfigurationsApi *apiInstance = [[SSOConfigurationsApi alloc] init];
CreateSSOConfigRequest *createSSOConfigRequest = ; // 

// Create or replace SSO configuration
[apiInstance createSsoConfigurationWith:createSSOConfigRequest
              completionHandler: ^(SSOConfiguration output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.SSOConfigurationsApi()
var createSSOConfigRequest = ; // {CreateSSOConfigRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createSsoConfiguration(createSSOConfigRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createSsoConfigurationExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SSOConfigurationsApi();
            var createSSOConfigRequest = new CreateSSOConfigRequest(); // CreateSSOConfigRequest | 

            try {
                // Create or replace SSO configuration
                SSOConfiguration result = apiInstance.createSsoConfiguration(createSSOConfigRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SSOConfigurationsApi.createSsoConfiguration: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SSOConfigurationsApi();
$createSSOConfigRequest = ; // CreateSSOConfigRequest | 

try {
    $result = $api_instance->createSsoConfiguration($createSSOConfigRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SSOConfigurationsApi->createSsoConfiguration: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SSOConfigurationsApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SSOConfigurationsApi->new();
my $createSSOConfigRequest = WWW::OPenAPIClient::Object::CreateSSOConfigRequest->new(); # CreateSSOConfigRequest | 

eval {
    my $result = $api_instance->createSsoConfiguration(createSSOConfigRequest => $createSSOConfigRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SSOConfigurationsApi->createSsoConfiguration: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SSOConfigurationsApi()
createSSOConfigRequest =  # CreateSSOConfigRequest | 

try:
    # Create or replace SSO configuration
    api_response = api_instance.create_sso_configuration(createSSOConfigRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SSOConfigurationsApi->createSsoConfiguration: %s\n" % e)
extern crate SSOConfigurationsApi;

pub fn main() {
    let createSSOConfigRequest = ; // CreateSSOConfigRequest

    let mut context = SSOConfigurationsApi::Context::default();
    let result = client.createSsoConfiguration(createSSOConfigRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Body parameters
Name Description
createSSOConfigRequest *

Responses


deleteSsoConfiguration

Delete SSO configuration

Remove an SSO configuration


/api/v1/auth/sso-configurations/{ssoConfigId}

Usage and SDK Samples

curl -X DELETE \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/problem+json" \
 "http://localhost:8082/api/v1/auth/sso-configurations/{ssoConfigId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SSOConfigurationsApi;

import java.io.File;
import java.util.*;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        UUID ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID | UUID of the SSO configuration

        try {
            apiInstance.deleteSsoConfiguration(ssoConfigId);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#deleteSsoConfiguration");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID ssoConfigId = new UUID(); // UUID | UUID of the SSO configuration

try {
    final result = await api_instance.deleteSsoConfiguration(ssoConfigId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteSsoConfiguration: $e\n');
}

import org.openapitools.client.api.SSOConfigurationsApi;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        UUID ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID | UUID of the SSO configuration

        try {
            apiInstance.deleteSsoConfiguration(ssoConfigId);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#deleteSsoConfiguration");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SSOConfigurationsApi *apiInstance = [[SSOConfigurationsApi alloc] init];
UUID *ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID of the SSO configuration (default to null)

// Delete SSO configuration
[apiInstance deleteSsoConfigurationWith:ssoConfigId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.SSOConfigurationsApi()
var ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // {UUID} UUID of the SSO configuration

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteSsoConfiguration(ssoConfigId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteSsoConfigurationExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SSOConfigurationsApi();
            var ssoConfigId = 550e8400-e29b-41d4-a716-446655440000;  // UUID | UUID of the SSO configuration (default to null)

            try {
                // Delete SSO configuration
                apiInstance.deleteSsoConfiguration(ssoConfigId);
            } catch (Exception e) {
                Debug.Print("Exception when calling SSOConfigurationsApi.deleteSsoConfiguration: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SSOConfigurationsApi();
$ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID | UUID of the SSO configuration

try {
    $api_instance->deleteSsoConfiguration($ssoConfigId);
} catch (Exception $e) {
    echo 'Exception when calling SSOConfigurationsApi->deleteSsoConfiguration: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SSOConfigurationsApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SSOConfigurationsApi->new();
my $ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; # UUID | UUID of the SSO configuration

eval {
    $api_instance->deleteSsoConfiguration(ssoConfigId => $ssoConfigId);
};
if ($@) {
    warn "Exception when calling SSOConfigurationsApi->deleteSsoConfiguration: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SSOConfigurationsApi()
ssoConfigId = 550e8400-e29b-41d4-a716-446655440000 # UUID | UUID of the SSO configuration (default to null)

try:
    # Delete SSO configuration
    api_instance.delete_sso_configuration(ssoConfigId)
except ApiException as e:
    print("Exception when calling SSOConfigurationsApi->deleteSsoConfiguration: %s\n" % e)
extern crate SSOConfigurationsApi;

pub fn main() {
    let ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID

    let mut context = SSOConfigurationsApi::Context::default();
    let result = client.deleteSsoConfiguration(ssoConfigId, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
ssoConfigId*
UUID (uuid)
UUID of the SSO configuration
Required

Responses


getSsoConfiguration

Get SSO configuration

Get details of a specific SSO configuration


/api/v1/auth/sso-configurations/{ssoConfigId}

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/sso-configurations/{ssoConfigId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SSOConfigurationsApi;

import java.io.File;
import java.util.*;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        UUID ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID | UUID of the SSO configuration

        try {
            SSOConfiguration result = apiInstance.getSsoConfiguration(ssoConfigId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#getSsoConfiguration");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID ssoConfigId = new UUID(); // UUID | UUID of the SSO configuration

try {
    final result = await api_instance.getSsoConfiguration(ssoConfigId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getSsoConfiguration: $e\n');
}

import org.openapitools.client.api.SSOConfigurationsApi;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        UUID ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID | UUID of the SSO configuration

        try {
            SSOConfiguration result = apiInstance.getSsoConfiguration(ssoConfigId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#getSsoConfiguration");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SSOConfigurationsApi *apiInstance = [[SSOConfigurationsApi alloc] init];
UUID *ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID of the SSO configuration (default to null)

// Get SSO configuration
[apiInstance getSsoConfigurationWith:ssoConfigId
              completionHandler: ^(SSOConfiguration output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.SSOConfigurationsApi()
var ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // {UUID} UUID of the SSO configuration

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSsoConfiguration(ssoConfigId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getSsoConfigurationExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SSOConfigurationsApi();
            var ssoConfigId = 550e8400-e29b-41d4-a716-446655440000;  // UUID | UUID of the SSO configuration (default to null)

            try {
                // Get SSO configuration
                SSOConfiguration result = apiInstance.getSsoConfiguration(ssoConfigId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SSOConfigurationsApi.getSsoConfiguration: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SSOConfigurationsApi();
$ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID | UUID of the SSO configuration

try {
    $result = $api_instance->getSsoConfiguration($ssoConfigId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SSOConfigurationsApi->getSsoConfiguration: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SSOConfigurationsApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SSOConfigurationsApi->new();
my $ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; # UUID | UUID of the SSO configuration

eval {
    my $result = $api_instance->getSsoConfiguration(ssoConfigId => $ssoConfigId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SSOConfigurationsApi->getSsoConfiguration: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SSOConfigurationsApi()
ssoConfigId = 550e8400-e29b-41d4-a716-446655440000 # UUID | UUID of the SSO configuration (default to null)

try:
    # Get SSO configuration
    api_response = api_instance.get_sso_configuration(ssoConfigId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SSOConfigurationsApi->getSsoConfiguration: %s\n" % e)
extern crate SSOConfigurationsApi;

pub fn main() {
    let ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID

    let mut context = SSOConfigurationsApi::Context::default();
    let result = client.getSsoConfiguration(ssoConfigId, &context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
ssoConfigId*
UUID (uuid)
UUID of the SSO configuration
Required

Responses


listSsoConfigurations

List all SSO configurations

Returns all configured SSO providers


/api/v1/auth/sso-configurations

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/sso-configurations?limit=50&offset=0"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SSOConfigurationsApi;

import java.io.File;
import java.util.*;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            listSsoConfigurations_200_response result = apiInstance.listSsoConfigurations(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#listSsoConfigurations");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer limit = new Integer(); // Integer | Maximum number of items to return
final Integer offset = new Integer(); // Integer | Number of items to skip before the returned page

try {
    final result = await api_instance.listSsoConfigurations(limit, offset);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listSsoConfigurations: $e\n');
}

import org.openapitools.client.api.SSOConfigurationsApi;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        Integer limit = 50; // Integer | Maximum number of items to return
        Integer offset = 0; // Integer | Number of items to skip before the returned page

        try {
            listSsoConfigurations_200_response result = apiInstance.listSsoConfigurations(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#listSsoConfigurations");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SSOConfigurationsApi *apiInstance = [[SSOConfigurationsApi alloc] init];
Integer *limit = 50; // Maximum number of items to return (optional) (default to 50)
Integer *offset = 0; // Number of items to skip before the returned page (optional) (default to 0)

// List all SSO configurations
[apiInstance listSsoConfigurationsWith:limit
    offset:offset
              completionHandler: ^(listSsoConfigurations_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.SSOConfigurationsApi()
var opts = {
  'limit': 50, // {Integer} Maximum number of items to return
  'offset': 0 // {Integer} Number of items to skip before the returned page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listSsoConfigurations(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listSsoConfigurationsExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SSOConfigurationsApi();
            var limit = 50;  // Integer | Maximum number of items to return (optional)  (default to 50)
            var offset = 0;  // Integer | Number of items to skip before the returned page (optional)  (default to 0)

            try {
                // List all SSO configurations
                listSsoConfigurations_200_response result = apiInstance.listSsoConfigurations(limit, offset);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SSOConfigurationsApi.listSsoConfigurations: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SSOConfigurationsApi();
$limit = 50; // Integer | Maximum number of items to return
$offset = 0; // Integer | Number of items to skip before the returned page

try {
    $result = $api_instance->listSsoConfigurations($limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SSOConfigurationsApi->listSsoConfigurations: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SSOConfigurationsApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SSOConfigurationsApi->new();
my $limit = 50; # Integer | Maximum number of items to return
my $offset = 0; # Integer | Number of items to skip before the returned page

eval {
    my $result = $api_instance->listSsoConfigurations(limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SSOConfigurationsApi->listSsoConfigurations: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SSOConfigurationsApi()
limit = 50 # Integer | Maximum number of items to return (optional) (default to 50)
offset = 0 # Integer | Number of items to skip before the returned page (optional) (default to 0)

try:
    # List all SSO configurations
    api_response = api_instance.list_sso_configurations(limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SSOConfigurationsApi->listSsoConfigurations: %s\n" % e)
extern crate SSOConfigurationsApi;

pub fn main() {
    let limit = 50; // Integer
    let offset = 0; // Integer

    let mut context = SSOConfigurationsApi::Context::default();
    let result = client.listSsoConfigurations(limit, offset, &context).wait();

    println!("{:?}", result);
}

Scopes

view_iam HTTP Authorization Bearer header using a JWT

Parameters

Query parameters
Name Description
limit
Integer
Maximum number of items to return
offset
Integer
Number of items to skip before the returned page

Responses


testLdapConnection

Test LDAP connection

Validates an LDAP server connection by dialing the server and performing a bind. On failure returns a problem+json body whose `code` identifies the specific failure (e.g. CONNECTION_REFUSED, TLS_HANDSHAKE_FAILED, BIND_FAILED, SSRF_BLOCKED).


/api/v1/auth/sso-configurations/test-ldap

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/sso-configurations/test-ldap" \
 -d '{
  "ldap_bind_password" : "s3cr3t",
  "ldap_url" : "ldap://ldap.example.com:389",
  "ldap_bind_dn" : "cn=admin,dc=example,dc=com",
  "ca_cert" : "-----BEGIN CERTIFICATE-----\n..."
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SSOConfigurationsApi;

import java.io.File;
import java.util.*;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        TestLDAPConnectionRequest testLDAPConnectionRequest = ; // TestLDAPConnectionRequest | 

        try {
            TestLDAPConnectionResponse result = apiInstance.testLdapConnection(testLDAPConnectionRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#testLdapConnection");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final TestLDAPConnectionRequest testLDAPConnectionRequest = new TestLDAPConnectionRequest(); // TestLDAPConnectionRequest | 

try {
    final result = await api_instance.testLdapConnection(testLDAPConnectionRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->testLdapConnection: $e\n');
}

import org.openapitools.client.api.SSOConfigurationsApi;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        TestLDAPConnectionRequest testLDAPConnectionRequest = ; // TestLDAPConnectionRequest | 

        try {
            TestLDAPConnectionResponse result = apiInstance.testLdapConnection(testLDAPConnectionRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#testLdapConnection");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SSOConfigurationsApi *apiInstance = [[SSOConfigurationsApi alloc] init];
TestLDAPConnectionRequest *testLDAPConnectionRequest = ; // 

// Test LDAP connection
[apiInstance testLdapConnectionWith:testLDAPConnectionRequest
              completionHandler: ^(TestLDAPConnectionResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.SSOConfigurationsApi()
var testLDAPConnectionRequest = ; // {TestLDAPConnectionRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.testLdapConnection(testLDAPConnectionRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class testLdapConnectionExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SSOConfigurationsApi();
            var testLDAPConnectionRequest = new TestLDAPConnectionRequest(); // TestLDAPConnectionRequest | 

            try {
                // Test LDAP connection
                TestLDAPConnectionResponse result = apiInstance.testLdapConnection(testLDAPConnectionRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SSOConfigurationsApi.testLdapConnection: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SSOConfigurationsApi();
$testLDAPConnectionRequest = ; // TestLDAPConnectionRequest | 

try {
    $result = $api_instance->testLdapConnection($testLDAPConnectionRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SSOConfigurationsApi->testLdapConnection: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SSOConfigurationsApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SSOConfigurationsApi->new();
my $testLDAPConnectionRequest = WWW::OPenAPIClient::Object::TestLDAPConnectionRequest->new(); # TestLDAPConnectionRequest | 

eval {
    my $result = $api_instance->testLdapConnection(testLDAPConnectionRequest => $testLDAPConnectionRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SSOConfigurationsApi->testLdapConnection: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SSOConfigurationsApi()
testLDAPConnectionRequest =  # TestLDAPConnectionRequest | 

try:
    # Test LDAP connection
    api_response = api_instance.test_ldap_connection(testLDAPConnectionRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SSOConfigurationsApi->testLdapConnection: %s\n" % e)
extern crate SSOConfigurationsApi;

pub fn main() {
    let testLDAPConnectionRequest = ; // TestLDAPConnectionRequest

    let mut context = SSOConfigurationsApi::Context::default();
    let result = client.testLdapConnection(testLDAPConnectionRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Body parameters
Name Description
testLDAPConnectionRequest *

Responses


testSamlConnection

Test SAML connection

Validates SAML IdP metadata by fetching a URL or parsing supplied XML. Checks that the certificate is valid and uses a strong signature algorithm. Exactly one of idp_metadata_url or idp_metadata_xml must be provided. On failure returns a problem+json body whose `code` identifies the specific failure (e.g. METADATA_UNREACHABLE, INVALID_XML, CERTIFICATE_EXPIRED, WEAK_SIGNATURE_ALGORITHM).


/api/v1/auth/sso-configurations/test-saml

Usage and SDK Samples

curl -X POST \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/sso-configurations/test-saml" \
 -d '{
  "idp_metadata_url" : "https://idp.example.com/metadata",
  "idp_metadata_xml" : "<EntityDescriptor xmlns=\"urn:oasis:names:tc:SAML:2.0:metadata\" entityID=\"https://idp.example.com\">...</EntityDescriptor>"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SSOConfigurationsApi;

import java.io.File;
import java.util.*;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        TestSAMLConnectionRequest testSAMLConnectionRequest = ; // TestSAMLConnectionRequest | 

        try {
            TestSAMLConnectionResponse result = apiInstance.testSamlConnection(testSAMLConnectionRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#testSamlConnection");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final TestSAMLConnectionRequest testSAMLConnectionRequest = new TestSAMLConnectionRequest(); // TestSAMLConnectionRequest | 

try {
    final result = await api_instance.testSamlConnection(testSAMLConnectionRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->testSamlConnection: $e\n');
}

import org.openapitools.client.api.SSOConfigurationsApi;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        TestSAMLConnectionRequest testSAMLConnectionRequest = ; // TestSAMLConnectionRequest | 

        try {
            TestSAMLConnectionResponse result = apiInstance.testSamlConnection(testSAMLConnectionRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#testSamlConnection");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SSOConfigurationsApi *apiInstance = [[SSOConfigurationsApi alloc] init];
TestSAMLConnectionRequest *testSAMLConnectionRequest = ; // 

// Test SAML connection
[apiInstance testSamlConnectionWith:testSAMLConnectionRequest
              completionHandler: ^(TestSAMLConnectionResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.SSOConfigurationsApi()
var testSAMLConnectionRequest = ; // {TestSAMLConnectionRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.testSamlConnection(testSAMLConnectionRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class testSamlConnectionExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SSOConfigurationsApi();
            var testSAMLConnectionRequest = new TestSAMLConnectionRequest(); // TestSAMLConnectionRequest | 

            try {
                // Test SAML connection
                TestSAMLConnectionResponse result = apiInstance.testSamlConnection(testSAMLConnectionRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SSOConfigurationsApi.testSamlConnection: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SSOConfigurationsApi();
$testSAMLConnectionRequest = ; // TestSAMLConnectionRequest | 

try {
    $result = $api_instance->testSamlConnection($testSAMLConnectionRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SSOConfigurationsApi->testSamlConnection: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SSOConfigurationsApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SSOConfigurationsApi->new();
my $testSAMLConnectionRequest = WWW::OPenAPIClient::Object::TestSAMLConnectionRequest->new(); # TestSAMLConnectionRequest | 

eval {
    my $result = $api_instance->testSamlConnection(testSAMLConnectionRequest => $testSAMLConnectionRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SSOConfigurationsApi->testSamlConnection: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SSOConfigurationsApi()
testSAMLConnectionRequest =  # TestSAMLConnectionRequest | 

try:
    # Test SAML connection
    api_response = api_instance.test_saml_connection(testSAMLConnectionRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SSOConfigurationsApi->testSamlConnection: %s\n" % e)
extern crate SSOConfigurationsApi;

pub fn main() {
    let testSAMLConnectionRequest = ; // TestSAMLConnectionRequest

    let mut context = SSOConfigurationsApi::Context::default();
    let result = client.testSamlConnection(testSAMLConnectionRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Body parameters
Name Description
testSAMLConnectionRequest *

Responses


updateSsoConfiguration

Update SSO configuration

Update an existing SSO configuration


/api/v1/auth/sso-configurations/{ssoConfigId}

Usage and SDK Samples

curl -X PATCH \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8082/api/v1/auth/sso-configurations/{ssoConfigId}" \
 -d '{
  "saml_config" : "",
  "ldap_config" : "",
  "name" : "Updated SAML Name",
  "is_default" : true,
  "enabled" : false
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SSOConfigurationsApi;

import java.io.File;
import java.util.*;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        UUID ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID | UUID of the SSO configuration
        UpdateSSOConfigRequest updateSSOConfigRequest = ; // UpdateSSOConfigRequest | 

        try {
            SSOConfiguration result = apiInstance.updateSsoConfiguration(ssoConfigId, updateSSOConfigRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#updateSsoConfiguration");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID ssoConfigId = new UUID(); // UUID | UUID of the SSO configuration
final UpdateSSOConfigRequest updateSSOConfigRequest = new UpdateSSOConfigRequest(); // UpdateSSOConfigRequest | 

try {
    final result = await api_instance.updateSsoConfiguration(ssoConfigId, updateSSOConfigRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->updateSsoConfiguration: $e\n');
}

import org.openapitools.client.api.SSOConfigurationsApi;

public class SSOConfigurationsApiExample {
    public static void main(String[] args) {
        SSOConfigurationsApi apiInstance = new SSOConfigurationsApi();
        UUID ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID | UUID of the SSO configuration
        UpdateSSOConfigRequest updateSSOConfigRequest = ; // UpdateSSOConfigRequest | 

        try {
            SSOConfiguration result = apiInstance.updateSsoConfiguration(ssoConfigId, updateSSOConfigRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SSOConfigurationsApi#updateSsoConfiguration");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SSOConfigurationsApi *apiInstance = [[SSOConfigurationsApi alloc] init];
UUID *ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID of the SSO configuration (default to null)
UpdateSSOConfigRequest *updateSSOConfigRequest = ; // 

// Update SSO configuration
[apiInstance updateSsoConfigurationWith:ssoConfigId
    updateSSOConfigRequest:updateSSOConfigRequest
              completionHandler: ^(SSOConfiguration output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.SSOConfigurationsApi()
var ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // {UUID} UUID of the SSO configuration
var updateSSOConfigRequest = ; // {UpdateSSOConfigRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateSsoConfiguration(ssoConfigId, updateSSOConfigRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class updateSsoConfigurationExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SSOConfigurationsApi();
            var ssoConfigId = 550e8400-e29b-41d4-a716-446655440000;  // UUID | UUID of the SSO configuration (default to null)
            var updateSSOConfigRequest = new UpdateSSOConfigRequest(); // UpdateSSOConfigRequest | 

            try {
                // Update SSO configuration
                SSOConfiguration result = apiInstance.updateSsoConfiguration(ssoConfigId, updateSSOConfigRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SSOConfigurationsApi.updateSsoConfiguration: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SSOConfigurationsApi();
$ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID | UUID of the SSO configuration
$updateSSOConfigRequest = ; // UpdateSSOConfigRequest | 

try {
    $result = $api_instance->updateSsoConfiguration($ssoConfigId, $updateSSOConfigRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SSOConfigurationsApi->updateSsoConfiguration: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SSOConfigurationsApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SSOConfigurationsApi->new();
my $ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; # UUID | UUID of the SSO configuration
my $updateSSOConfigRequest = WWW::OPenAPIClient::Object::UpdateSSOConfigRequest->new(); # UpdateSSOConfigRequest | 

eval {
    my $result = $api_instance->updateSsoConfiguration(ssoConfigId => $ssoConfigId, updateSSOConfigRequest => $updateSSOConfigRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SSOConfigurationsApi->updateSsoConfiguration: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SSOConfigurationsApi()
ssoConfigId = 550e8400-e29b-41d4-a716-446655440000 # UUID | UUID of the SSO configuration (default to null)
updateSSOConfigRequest =  # UpdateSSOConfigRequest | 

try:
    # Update SSO configuration
    api_response = api_instance.update_sso_configuration(ssoConfigId, updateSSOConfigRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SSOConfigurationsApi->updateSsoConfiguration: %s\n" % e)
extern crate SSOConfigurationsApi;

pub fn main() {
    let ssoConfigId = 550e8400-e29b-41d4-a716-446655440000; // UUID
    let updateSSOConfigRequest = ; // UpdateSSOConfigRequest

    let mut context = SSOConfigurationsApi::Context::default();
    let result = client.updateSsoConfiguration(ssoConfigId, updateSSOConfigRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

manage_iam HTTP Authorization Bearer header using a JWT

Parameters

Path parameters
Name Description
ssoConfigId*
UUID (uuid)
UUID of the SSO configuration
Required
Body parameters
Name Description
updateSSOConfigRequest *

Responses


Session

getCurrentUser

Get current user

Returns the authenticated user's identity and assigned roles. Requires the x-awc-username header to be injected by the Knox proxy.


/api/v1/auth/me

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/me"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SessionApi;

import java.io.File;
import java.util.*;

public class SessionApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SessionApi apiInstance = new SessionApi();

        try {
            CurrentUserResponse result = apiInstance.getCurrentUser();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionApi#getCurrentUser");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.getCurrentUser();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getCurrentUser: $e\n');
}

import org.openapitools.client.api.SessionApi;

public class SessionApiExample {
    public static void main(String[] args) {
        SessionApi apiInstance = new SessionApi();

        try {
            CurrentUserResponse result = apiInstance.getCurrentUser();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionApi#getCurrentUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SessionApi *apiInstance = [[SessionApi alloc] init];

// Get current user
[apiInstance getCurrentUserWithCompletionHandler: 
              ^(CurrentUserResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.SessionApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCurrentUser(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getCurrentUserExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SessionApi();

            try {
                // Get current user
                CurrentUserResponse result = apiInstance.getCurrentUser();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SessionApi.getCurrentUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SessionApi();

try {
    $result = $api_instance->getCurrentUser();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SessionApi->getCurrentUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SessionApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SessionApi->new();

eval {
    my $result = $api_instance->getCurrentUser();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SessionApi->getCurrentUser: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SessionApi()

try:
    # Get current user
    api_response = api_instance.get_current_user()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SessionApi->getCurrentUser: %s\n" % e)
extern crate SessionApi;

pub fn main() {

    let mut context = SessionApi::Context::default();
    let result = client.getCurrentUser(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


getCurrentUserPermissions

Get current user's effective permissions

Returns the union of all permissions granted by the current user's assigned roles.


/api/v1/auth/me/permissions

Usage and SDK Samples

curl -X GET \
 -H "Authorization: Bearer [[accessToken]]" \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8082/api/v1/auth/me/permissions"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.SessionApi;

import java.io.File;
import java.util.*;

public class SessionApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure Bearer (JWT) access token for authorization: JwtAuthentication
        HttpBearerAuth JwtAuthentication = (HttpBearerAuth) defaultClient.getAuthentication("JwtAuthentication");
        JwtAuthentication.setBearerToken("BEARER TOKEN");

        // Create an instance of the API class
        SessionApi apiInstance = new SessionApi();

        try {
            getCurrentUserPermissions_200_response result = apiInstance.getCurrentUserPermissions();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionApi#getCurrentUserPermissions");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.getCurrentUserPermissions();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getCurrentUserPermissions: $e\n');
}

import org.openapitools.client.api.SessionApi;

public class SessionApiExample {
    public static void main(String[] args) {
        SessionApi apiInstance = new SessionApi();

        try {
            getCurrentUserPermissions_200_response result = apiInstance.getCurrentUserPermissions();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionApi#getCurrentUserPermissions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

// Create an instance of the API class
SessionApi *apiInstance = [[SessionApi alloc] init];

// Get current user's effective permissions
[apiInstance getCurrentUserPermissionsWithCompletionHandler: 
              ^(getCurrentUserPermissions_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var AnywhereCloudAuthApi = require('anywhere_cloud_auth_api');
var defaultClient = AnywhereCloudAuthApi.ApiClient.instance;

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
var JwtAuthentication = defaultClient.authentications['JwtAuthentication'];
JwtAuthentication.accessToken = "YOUR ACCESS TOKEN";

// Create an instance of the API class
var api = new AnywhereCloudAuthApi.SessionApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCurrentUserPermissions(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getCurrentUserPermissionsExample
    {
        public void main()
        {
            // Configure Bearer (JWT) access token for authorization: JwtAuthentication
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            // Create an instance of the API class
            var apiInstance = new SessionApi();

            try {
                // Get current user's effective permissions
                getCurrentUserPermissions_200_response result = apiInstance.getCurrentUserPermissions();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling SessionApi.getCurrentUserPermissions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer (JWT) access token for authorization: JwtAuthentication
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setAccessToken('', 'YOUR_ACCESS_TOKEN');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\SessionApi();

try {
    $result = $api_instance->getCurrentUserPermissions();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SessionApi->getCurrentUserPermissions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::SessionApi;

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
$WWW::OPenAPIClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::SessionApi->new();

eval {
    my $result = $api_instance->getCurrentUserPermissions();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SessionApi->getCurrentUserPermissions: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure Bearer (JWT) access token for authorization: JwtAuthentication
openapi_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Create an instance of the API class
api_instance = openapi_client.SessionApi()

try:
    # Get current user's effective permissions
    api_response = api_instance.get_current_user_permissions()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SessionApi->getCurrentUserPermissions: %s\n" % e)
extern crate SessionApi;

pub fn main() {

    let mut context = SessionApi::Context::default();
    let result = client.getCurrentUserPermissions(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses