@hypto/hypto_iam1 v1.1.0
hypto_iam
HyptoIam - JavaScript client for hypto_iam APIs for Hypto IAM Service. This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install @hypto/iam --save
git
If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var HyptoIam = require('@hypto/iam');
var defaultClient = HyptoIam.ApiClient.instance;
// Configure API key authorization: apiKeyAuth
var apiKeyAuth = defaultClient.authentications['apiKeyAuth'];
apiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKeyAuth.apiKeyPrefix['X-API-Key'] = "Token"
var api = new HyptoIam.OrganizationManagementApi()
var body = new HyptoIam.CreateOrganizationRequest(); // {CreateOrganizationRequest} Payload to create organization
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createOrganization(body, callback);
Documentation for API Endpoints
All URIs are relative to https://{environment}.{region}.hypto.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
HyptoIam.OrganizationManagementApi | createOrganization | POST /organizations | Creates an organization. |
HyptoIam.OrganizationManagementApi | deleteOrganization | DELETE /organizations/{organization_id} | Delete an organization |
HyptoIam.OrganizationManagementApi | getOrganization | GET /organizations/{organization_id} | Get an organization |
HyptoIam.OrganizationManagementApi | updateOrganization | PATCH /organizations/{organization_id} | Update an organization |
HyptoIam.PolicyManagementApi | createPolicy | POST /organizations/{organization_id}/policies | Create a policy |
HyptoIam.PolicyManagementApi | deletePolicy | DELETE /organizations/{organization_id}/policies/{policy_name} | Delete a policy |
HyptoIam.PolicyManagementApi | getPolicy | GET /organizations/{organization_id}/policies/{policy_name} | Get a policy |
HyptoIam.PolicyManagementApi | listPolicies | GET /organizations/{organization_id}/policies | List policies |
HyptoIam.PolicyManagementApi | updatePolicy | PATCH /organizations/{organization_id}/policies/{policy_name} | Update a policy |
HyptoIam.ResourceActionManagementApi | createAction | POST /organizations/{organization_id}/resources/{resource_name}/actions | Create an action |
HyptoIam.ResourceActionManagementApi | deleteAction | DELETE /organizations/{organization_id}/resources/{resource_name}/actions/{action_name} | Delete an action |
HyptoIam.ResourceActionManagementApi | getAction | GET /organizations/{organization_id}/resources/{resource_name}/actions/{action_name} | Get an action |
HyptoIam.ResourceActionManagementApi | listActions | GET /organizations/{organization_id}/resources/{resource_name}/actions | List actions |
HyptoIam.ResourceActionManagementApi | updateAction | PATCH /organizations/{organization_id}/resources/{resource_name}/actions/{action_name} | Update an action |
HyptoIam.ResourceManagementApi | createResource | POST /organizations/{organization_id}/resources | Create a resource name in an organization. |
HyptoIam.ResourceManagementApi | deleteResource | DELETE /organizations/{organization_id}/resources/{resource_name} | Delete a resource |
HyptoIam.ResourceManagementApi | getResource | GET /organizations/{organization_id}/resources/{resource_name} | Get the resource details |
HyptoIam.ResourceManagementApi | listResources | GET /organizations/{organization_id}/resources | List Resources |
HyptoIam.ResourceManagementApi | updateResource | PATCH /organizations/{organization_id}/resources/{resource_name} | Update a resource |
HyptoIam.UserAuthorizationApi | getToken | POST /organizations/{organization_id}/token | Generate a token |
HyptoIam.UserAuthorizationApi | validate | POST /validate | Validate an auth request |
HyptoIam.UserCredentialManagementApi | createCredential | POST /organizations/{organization_id}/users/{user_name}/credentials | Create a new credential for a user |
HyptoIam.UserCredentialManagementApi | deleteCredential | DELETE /organizations/{organization_id}/users/{user_name}/credentials/{credential_id} | Delete a credential |
HyptoIam.UserCredentialManagementApi | getCredential | GET /organizations/{organization_id}/users/{user_name}/credentials/{credential_id} | Gets credential for the user |
HyptoIam.UserCredentialManagementApi | updateCredential | PATCH /organizations/{organization_id}/users/{user_name}/credentials/{credential_id} | Update the status of credential |
HyptoIam.UserManagementApi | createUser | POST /organizations/{organization_id}/users | Create a user |
HyptoIam.UserManagementApi | deleteUser | DELETE /organizations/{organization_id}/users/{user_name} | Delete a User |
HyptoIam.UserManagementApi | getUser | GET /organizations/{organization_id}/users/{user_name} | Gets a user entity associated with the organization |
HyptoIam.UserManagementApi | listUsers | GET /organizations/{organization_id}/users | List users |
HyptoIam.UserManagementApi | updateUser | PATCH /organizations/{organization_id}/users/{user_name} | Update a User |
HyptoIam.UserPolicyManagementApi | attachPolicies | PATCH /organizations/{organization_id}/users/{user_name}/attach_policies | Attach policies to user |
HyptoIam.UserPolicyManagementApi | detachPolicies | PATCH /organizations/{organization_id}/users/{user_name}/detach_policies | Detach policies from user |
HyptoIam.UserPolicyManagementApi | getUserPolicies | GET /organizations/{organization_id}/users/{user_name}/policies | List all policies associated with user |
Documentation for Models
- HyptoIam.Action
- HyptoIam.ActionPaginatedResponse
- HyptoIam.AdminUser
- HyptoIam.BaseSuccessResponse
- HyptoIam.CreateActionRequest
- HyptoIam.CreateCredentialRequest
- HyptoIam.CreateOrganizationRequest
- HyptoIam.CreateOrganizationResponse
- HyptoIam.CreatePolicyRequest
- HyptoIam.CreateResourceRequest
- HyptoIam.CreateUserRequest
- HyptoIam.Credential
- HyptoIam.CredentialWithoutSecret
- HyptoIam.ErrorResponse
- HyptoIam.GetUserPoliciesResponse
- HyptoIam.Organization
- HyptoIam.PaginationOptions
- HyptoIam.Policy
- HyptoIam.PolicyAssociationRequest
- HyptoIam.PolicyPaginatedResponse
- HyptoIam.PolicyStatement
- HyptoIam.Resource
- HyptoIam.ResourceAction
- HyptoIam.ResourceActionEffect
- HyptoIam.ResourcePaginatedResponse
- HyptoIam.TokenResponse
- HyptoIam.UpdateActionRequest
- HyptoIam.UpdateCredentialRequest
- HyptoIam.UpdateOrganizationRequest
- HyptoIam.UpdatePolicyRequest
- HyptoIam.UpdateResourceRequest
- HyptoIam.UpdateUserRequest
- HyptoIam.User
- HyptoIam.UserPaginatedResponse
- HyptoIam.UserPolicy
- HyptoIam.ValidationRequest
- HyptoIam.ValidationResponse
Documentation for Authorization
apiKeyAuth
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header
bearerAuth
2 years ago