# /rbkcli/cmdlet/profile

## Methods

### get

* **Description:** 'Gets a list of all cmdlet's profiles in rbkcli.'.
* **Parameters:** No parameters are accepted.
* **Response:** Following is the json response structure, under properties are the fields which are returned:
  1. OpenAPI description:

     ```
      'responses': {
          '200': {
              'description': str('Returns a list of avail'
                                 'able cmdlets profiles'),
              'schema': {
                  'items': {
                      'CmdletsProfileInfo': {
                          'properties': {
                              'name': {
                                  'description': 'Name of the existing profile.',
                                  'type': 'string'
                              },
                              'path': {
                                  'description': 'Path to the existing profile.',
                                  'type': 'string'
                              },
                          }
                      }
                  }
              }
          }
      },
      `
     ```
  2. Response Example:

     ```
      [
        {
          "name": "<value>",
          "path": "<value>"
        }
      ]
     ```
* **Usage:** It is used to see all existing cmdlet's profiles seen by rbkcli.
  1. Example 1: Get a raw list of all cmdlet's profiles.

     ```
      $ rbkcli cmdlet profile
      [
        {
          "name": "cmdlets",
          "path": "/home/bmanesco/rbkcli/conf/cmdlets/cmdlets.json"
        }
      ]
     ```

### post

* **Description:** Create a new cmdlet profile to rbkcli.
* **Parameters:** As a parameter you have to pass a single string, being either formatted as natural key assignment or as json string. Following is the description of the parameters:

  ```javascript
        'parameters': [
            {
            'name': 'name',
            'description': 'Name of the cmdlet profile to be created, the profile name will reflect in a file called <name>-cmdlets.json.',
            'in': 'body',
            'required': True,
            'type': 'string'
            }
        ]
  ```
* **Response:** Following is the json response structure, under properties are the fields which are returned: &#x20;
  1. OpenAPI description:

     ```javascript
      'responses': {
          '200': {
              'description': str('Returns status of the add task.'),
              'schema': {
                  'CmdletProfileCreationInfo': {
                      'properties': {
                          'result': {
                              'description': 'The result of the requested operation.',
                              'enum': [
                                  'Succeeded',
                                  'Failed'
                              ],
                              'type': 'string'
                          },
                          'message': {
                              'description': 'Message(s) explaining how was the execution of the requested operation.',
                              'type': 'array'
                          },
                          'data': {
                              'description': 'If operation succeeds, returns the created object.',
                              'type': 'json'
                          }                                          
                      }
                  }
              }
          }
      },
     ```
  2. Response Example:

     ```
      {
        "result": "<value>",
        "message": [
          "<value>",
          "<value>"
        ],
        "data": {
          "name": "<value>",
          "path": "<value>"
        }
      }
     ```
* **Usage:** It is used to create cmdlets profiles, which are portable to another rbkcli installation and holds the cmdlets records.
  1. Example 1: You can provide the required parameters for cmdlets creation as natural key assignment format once the only required parameter is name.

     ```
      $ rbkcli cmdlet profile -m post -p name=bmanesco
      {
        "result": "Succeeded",
        "message": [
          "Created profile successfully."
        ],
        "data": {
          "name": "bmanesco",
          "path": "/home/bmanesco/rbkcli/conf/cmdlets/bmanesco-cmdlets.json"
        }
      }
     ```

     \[Back to [Meta APIs](https://rubrik.gitbook.io/rbkcli/meta-apis/meta_apis)]


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rubrik.gitbook.io/rbkcli/meta-apis/meta_apis/rbkcli_cmdlet_profile.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
