Skip to main content

EstuaryClient.UserApi

All URIs are relative to https://api.estuary.tech

MethodHTTP requestDescription
userApiKeysGetGET /user/api-keysGet API keys for a user
userApiKeysKeyDeleteDELETE /user/api-keys/{key}Revoke a User API Key.
userApiKeysPostPOST /user/api-keysCreate API keys for a user
userExportGetGET /user/exportExport user data
userStatsGetGET /user/statsCreate API keys for a user
# **userApiKeysGet** > [MainGetApiKeysResp] userApiKeysGet()

Get API keys for a user

This endpoint is used to get API keys for a user. In estuary, each user can be given multiple API keys (tokens). This endpoint can be used to retrieve all available API keys for a given user.

Example

var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;

// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';

var apiInstance = new EstuaryClient.UserApi();

var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.userApiKeysGet(callback);

Parameters

This endpoint does not need any parameter.

Return type

[MainGetApiKeysResp]

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **userApiKeysKeyDelete** > userApiKeysKeyDelete(key)

Revoke a User API Key.

This endpoint is used to revoke a user API key. In estuary, every user is assigned with an API key, this API key is generated and issued for each user and is primarily use to access all estuary features. This endpoint can be used to revoke the API key thats assigned to the user.

Example

var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;

// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';

var apiInstance = new EstuaryClient.UserApi();

var key = "key_example"; // String | Key


var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.userApiKeysKeyDelete(key, callback);

Parameters

NameTypeDescriptionNotes
keyStringKey

Return type

null (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **userApiKeysPost** > MainGetApiKeysResp userApiKeysPost(opts)

Create API keys for a user

This endpoint is used to create API keys for a user. In estuary, each user is given an API key to access all features.

Example

var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;

// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';

var apiInstance = new EstuaryClient.UserApi();

var opts = {
'expiry': "expiry_example", // String | Expiration - Expiration - Valid time units are ns, us (or µs), ms, s, m, h. for example 300h
'perms': "perms_example" // String | Permissions -- currently unused
};

var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.userApiKeysPost(opts, callback);

Parameters

NameTypeDescriptionNotes
expiryStringExpiration - Expiration - Valid time units are ns, us (or µs), ms, s, m, h. for example 300h[optional]
permsStringPermissions -- currently unused[optional]

Return type

MainGetApiKeysResp

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **userExportGet** > 'String' userExportGet()

Export user data

This endpoint is used to get API keys for a user.

Example

var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;

// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';

var apiInstance = new EstuaryClient.UserApi();

var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.userExportGet(callback);

Parameters

This endpoint does not need any parameter.

Return type

'String'

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json
# **userStatsGet** > MainUserStatsResponse userStatsGet()

Create API keys for a user

This endpoint is used to create API keys for a user.

Example

var EstuaryClient = require('estuary-client');
var defaultClient = EstuaryClient.ApiClient.instance;

// Configure API key authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearerAuth.apiKeyPrefix = 'Token';

var apiInstance = new EstuaryClient.UserApi();

var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.userStatsGet(callback);

Parameters

This endpoint does not need any parameter.

Return type

MainUserStatsResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json