<commit_before>

# LiveAPICreatorAdminCLI

## Description

This is a command-line tool to administer API Creator servers. It allows the creation,
modification and deletion of many common objects, such as projects, database connection,
resources and rules.

## Installation

    npm install liveapicreator-admin-cli -g
    
    note: MAC users may need to use $sudo npm install ...

Please note that, on Windows (and sometimes Mac), `npm install` will create an executable 
called `liveapicreatoradmin` (or `lacadmin` as a shortcut) in your
{userhome}/`<node_modules>/.bin` directory. If this directory is not in your `PATH`, you will probably
want to fix that, otherwise you'll have to specify the full path to the executable.  You can also try 
npm install liveapicreator-admin-cli -g

***
## Login

    lacadmin login <url> -u <user-name> -p <password> [-a <alias>]

### Parameters

The URL will normally be the address of the server, such as:

    http://localhost:8080
    http://localhost:8080/APIServer
    http://api.acme.com

If you specify an alias, then you will be able to refer to that connection using that alias.
This is useful if you plan to work with several servers at the same time.

Regardless, this command sets your *current server* -- see [the use command](/use/) below.

### Example
    $ lacadmin login -u fred -p secret https://api.acme.com 
    Logging in...
    This server licensed to: Acme Inc.
    Login successful, API key will expire on: 2014-11-27T03:36:55.266Z

***
## Command Line Service
```sh
$ lacadmin --help

  Usage: liveapicreatoradmin [options] [command]

  Commands:

    login [options] <url>                                                  Login to an API server
    logout [options] <url>                                                 Logout from the current server, or a specific server
    use <alias>                                                            Use the specified server by default
    status                                                                 Show the current server, and any defined server aliases
    project [options] <list|create|update|delete|use|import|export>        Administer projects. Actions are: list, create, update, delete, use, export
    datasource [options] <list|create|update|delete|import|export>         Administer datasources within a project.
    resource [options] <list|create|delete|import|export>                  Administer resources within a project.
    rule [options] <list|create|delete|export>                             Administer rules within a project.
    authprovider [options] <list|create|linkProject|delete|export|import>  Administer authentication providers for an account.
    libraries [options] <list|create|update|delete|export|import>          Administer java and javascript libraries for an account.
    apioptions [options] <list|update|import|export>                       Administer API project options for an account.
    namedsort [options] <list|create|update|delete|import|export>          Administer Named Sorts for the active API Project.
    namedfilter [options] <list|create|delete|update|import|export>        Administer Named filter for the active API Project.
    token [options] <list|export|import>                                   Administer Auth Tokens for current project.
    role [options] <list|export|import>                                    Administer Roles for current project.
    user [options] <list|export|import>                                    Administer Users for current project.
    topic [options] <list|export|import>                                   Administer Topics for current project.
    event [options] <list|export|import>                                   Administer Request & Response Events for current project.
    handler [options] <list|export|import>                                 Administer Custom Endpoints (Handlers) for current project.
    apiversion [options] <list|export|import>                              Administer API Versions for Resources for current project.
    relationship [options] <list|export|import>                            Administer Relationships (Virtual Keys) for current project.
    snapshot [options] <list|start>                                        List or start a project snapshot (backup) for current project.
    gateway <list|create|import|export|publish>                            Publish Swagger 2.0 document for current project to CA Gateway.    
    managedserver <list|create|delete|update|import|export>                Administer a managed data server (used by @databases to create datasources).
    migrate [options] <exportRepos>                                        Migrate will list export scripts for ALL user libraries, auth providers, and projects in the connection and export to a named directory<commit_msg>updated doc<commit_after>

# LiveAPICreatorAdminCLI

## Description

This is a command-line tool to administer API Creator servers. It allows the creation,
modification and deletion of many common objects, such as projects, database connection,
resources and rules.

## Installation

    npm install liveapicreator-admin-cli -g
    
    note: MAC users may need to use $sudo npm install ...

Please note that, on Windows (and sometimes Mac), `npm install` will create an executable 
called `liveapicreatoradmin` (or `lacadmin` as a shortcut) in your
{userhome}/`<node_modules>/.bin` directory. If this directory is not in your `PATH`, you will probably
want to fix that, otherwise you'll have to specify the full path to the executable.  You can also try 
npm install liveapicreator-admin-cli -g

***
## Login

    lacadmin login <url> -u <user-name> -p <password> [-a <alias>]

### Parameters

The URL will normally be the address of the server, such as:

    http://localhost:8080
    http://localhost:8080/APIServer
    http://api.acme.com

If you specify an alias, then you will be able to refer to that connection using that alias.
This is useful if you plan to work with several servers at the same time.

Regardless, this command sets your *current server* -- see [the use command](/use/) below.

### Example
    $ lacadmin login -u fred -p secret https://api.acme.com 
    Logging in...
    This server licensed to: Acme Inc.
    Login successful, API key will expire on: 2014-11-27T03:36:55.266Z

***
## Command Line Service
```sh
$ lacadmin --help

  Usage: liveapicreatoradmin [options] [command]

  Commands:

    login [options] [url]                                                                 Login to an API server
    logout [options] [url]                                                                Logout from the current server, or a specific server
    use <alias>                                                                           Use the specified server by default
    status                                                                                Show the current server, and any defined server aliases
    project [options] <list|create|update|delete|use|import|export>                       Administer projects. Actions are: list, create, update, delete, use, export
    datasource [options] <list|create|createDatabase|update|delete|import|reload|export>  Administer datasources within a project.
    resource [options] <list|delete|update|export>                                        Administer resources within a project.
    rule [options] <list|create|update|delete|import|export>                              Administer rules within a project.
    authprovider [options] <list|create|linkProject|delete|export|import>                 Administer authentication providers for an account.
    libraries [options] <list|create|update|delete|export|import>                         Administer java and javascript libraries for an account.
    apioptions [options] <list|update|import|export>                                      Administer API project options for an account.
    namedsort [options] <list|create|update|delete|import|export>                         Administer Named Sorts for the active API Project.
    namedfilter [options] <list|create|delete|update|import|export>                       Administer Named filter for the active API Project.
    token [options] <list|export|import>                                                  Administer Auth Tokens for current project.
    role [options] <list|export|import>                                                   Administer Roles for current project.
    user [options] <list|update|export|import>                                            Administer Users for current project.
    npa [options] <list|create|export>                                                    Administer Non Persistent Attributes for the active API Project. New in version 2.1.x
    topic [options] <list|export|import>                                                  Administer Topics for current project.
    event [options] <list|export|import>                                                  Administer Request & Response Events for current project.
    handler [options] <list|export|import>                                                Administer Custom Endpoints (Handlers) for current project.
    apiversion [options] <list|export|import>                                             Administer API Versions for Resources for current project.
    relationship [options] <list|export|import>                                           Administer Relationships (Virtual Keys) for current project.
    snapshot [options] <list|start|restore>                                               List or start a project snapshot (backup) for current project. New in version 2.1.x
    gateway [options] <list|create|import|export|publish>                                 Publish Swagger document for current project to Gateway. New in version 2.1.x - publish requires existing swagger file
    managedserver [options] <list|create|update|delete|import|export>                     Administer a managed data server (used by @databases to create datasources).
    migrate [options] <exportRepos>                                                       Migrate will list all export files for ALL user libraries, auth providers, gateways, and projects in the connection and export to a named directory
    schema [options] <list|export|create>                                                 Administer Schema exports and creation for current project.
    function [options] <list|export|import>                                               Administer Functions for current project.
    eula <accepted>                                                                       Returns true or false - end user license agreement must be accepted before any script will run
{'fraction_non_alphanumeric': 0.06750508599963011, 'fraction_numerical': 0.005363417791751433, 'mean_word_length': 2.0811965811965814, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 59, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '997372', 'n_tokens_mistral': 2489, 'n_tokens_neox': 2373, 'n_words': 1020}