> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/demisto-sdk-development-guide/demisto-sdk-guide/demisto-sdk-commands/upload.md).

# upload

Uploads a content entity to Cortex XSOAR or Cortex XSIAM.

The `upload` command requires interactions with Cortex XSIAM or Cortex XSOAR. Before using the command, verify that the [environment variables](/demisto-sdk-development-guide/demisto-sdk-guide/install-demisto-sdk/environment-variables-setup.md) are set up.

<details>

<summary>Arguments</summary>

| Argument                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `-i <PATH_IN_CONTENT>, --input <PATH_IN_CONTENT>` | <p><code>\<PATH\_IN\_CONTENT></code> is one of the following:</p><ul><li>A pack</li><li>A directory inside a pack, for example: <code>Playbooks</code></li><li>A directory containing an integration or script data, for example: <code>HelloWorld</code></li><li>A valid file that can be imported manually, for example, a playbook: <code>HelloWorld.yml</code></li><li>A path to a zipped pack (can be located outside the <code>Content</code> directory)</li></ul> |
| `-z/-nz, --zip/--no-zip`                          | Whether to compress a pack to a zip file before upload. This flag is relevant only for packs.                                                                                                                                                                                                                                                                                                                                                                            |
| `--keep-zip <DIRECTORY_FOR_THE_ZIP>`              | If a pack is passed in the `-i` argument and `-z` is used, `<DIRECTORY_FOR_THE_ZIP>` is where to store the zip file after creation.                                                                                                                                                                                                                                                                                                                                      |
| `--override-existing`                             | If true, skips the override confirmation prompt while uploading packs.                                                                                                                                                                                                                                                                                                                                                                                                   |
| `--insecure`                                      | Skips certificate validation.                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `--input-config-file`                             | The path to the configuration file from which to download all the custom packs.                                                                                                                                                                                                                                                                                                                                                                                          |
| `--skip-validation`                               | If true, skips all upload pack validations. Use only when migrating existing custom content entities to custom content packs to override all the entities with the packs.                                                                                                                                                                                                                                                                                                |
| `-x, --xsiam`                                     | Uploads the pack to a Cortex XSIAM tenant. Must be used together with `-z`.                                                                                                                                                                                                                                                                                                                                                                                              |
| `--console-log-threshold`                         | Minimum logging threshold for the console logger. Default value is `INFO`. Possible values are `DEBUG`, `INFO`, `WARNING`, `ERROR`.                                                                                                                                                                                                                                                                                                                                      |
| `--file-log-threshold`                            | Minimum logging threshold for the file logger. Default value is `DEBUG`. Possible values are `DEBUG`, `INFO`, `WARNING`, `ERROR`.                                                                                                                                                                                                                                                                                                                                        |
| `-tpb`                                            | Adds the test playbook for upload. This flag is relevant only for packs.                                                                                                                                                                                                                                                                                                                                                                                                 |
| `-mp, --marketplace`                              | The Marketplace to which the content will be uploaded.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `--reattach`                                      | Reattaches detached files in the Cortex XSOAR instance for the CI/CD flow. If the `--input-config-file` flag is set, any detached item in your Cortex XSOAR instance that is not currently in the repository's `SystemPacks` folder will be re-attached.                                                                                                                                                                                                                 |

</details>

<details>

<summary>Supported content entities for upload</summary>

You can upload these content entities to a remote instance.

* Integrations
* Playbooks
* Scripts
* Widgets
* Dashboards
* Incident types
* Incident fields
* Indicator fields
* Layouts
* Layout containers
* Classifiers
* Packs
* Zipped packs
* Reports

</details>

<details>

<summary>Examples</summary>

* `demisto-sdk upload -i Packs/HelloWorld/Integrations/HelloWorld/`

  Creates a unified integration YAML file and uploads it to the Cortex XSOAR instance.
* `demisto-sdk upload -i Packs/HelloWorld/Scripts/HelloWorldScript`

  Creates a temporary unified file of the `HelloWorldScript` script which is uploaded to the Cortex XSOAR instance.
* `demisto-sdk upload -i Packs/HelloWorld/Scripts`

  Iterates over the scripts folder in the `HelloWorld` pack, creates a temporary unified file for each script, and uploads it to the Cortex XSOAR instance.
* `demisto-sdk upload -i Packs/HelloWorld`

  Iterates over all content entities in the `HelloWorld` pack and uploads each entity to the Cortex XSOAR instance.
* `demisto-sdk upload -i Packs/HelloWorld -z`

  Zips the `HelloWorld` pack and uploads the zip file `uploadable_packs.zip` as a pack to the designated Cortex XSOAR Marketplace.
* `demisto-sdk upload -i Packs/HelloWorld -z --keep-zip some/directory`

  Zips the `HelloWorld` pack to `some/directory/uploadable_packs.zip` directory and uploads the .zip file as a pack to the designated Cortex XSOAR Marketplace.
* `demisto-sdk upload -i path/to/HelloWorld.zip`

  Uploads the zipped `HelloWorld.zip` pack to the Cortex XSOAR instance.
* `demisto-sdk upload -i Integrations/GoogleCloudTranslate/integration-GoogleCloudTranslate.yml --insecure`

  Uploads the integration YAML file `integration-GoogleCloudTranslate.yml` to the Cortex XSOAR instance without a certificate validation.
* `demisto-sdk upload --input-config-file demisto_sdk/commands/upload/tests/data/xsoar_config.json`

  Uploads the custom packs from the configuration file. A custom pack can be a zipped or unzipped file.
* `demisto-sdk upload -i Packs/HelloWorld -z --skip-validation`

  Zips the `HelloWorld` pack and uploads without any validation the zip file `uploadable_packs.zip` as a pack to the designated Cortex XSOAR Marketplace. This `--skip-validation` parameter is for migration from custom content entities to custom content packs.
* `demisto-sdk upload -i Packs/HelloWorld -z --xsiam`

  Zips the `HelloWorld` pack and uploads it to the Cortex XSIAM server Marketplace page.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/demisto-sdk-development-guide/demisto-sdk-guide/demisto-sdk-commands/upload.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
