{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":32299,"path":"it-service-management/devops-family/cdm-upload-process.md","title":"Uploading your config data","bundle":null,"doc_type":null,"release":"australia","body":"\n# Uploading your config data\n\nYou first create a new CDM application structure and then upload the existing config data into the structure.\n\n**Important:** Starting with the Washington D.C. release, DevOps Config is being prepared for future deprecation. It will be hidden and no longer activated on new instances but will continue to be supported.\n\n## How it works: Performing the initial upload of your existing config data into CDM data tables\n\n\\[Omitted image \"cdm-upload-process.png\"\\] Alt text: Uploading config data into a new CDM application\n\n1.  Open the CDM user interface and create a new application. For example, let's create the Bookstore application to support an online bookstore. An application in CDM is the full collection of config data for an application service, application model, or dynamic CI group \\[infrastructure\\] in the CMDB.\n\n    \\[Omitted image \"cdm-create-new-app-page.png\"\\] Alt text: Create a CDM application\n\n2.  Now open the Bookstore application and generate a new changeset so you can begin to put the data structure in place. \\(A more detailed overview of this process appears in [Preparing an application for config data upload](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-family/cdm-prep-app-for-upload.md).\\)\n\n    \\[Omitted image \"cdm-generate-new-changeset.png\"\\] Alt text: Create a changeset\n\n    In the changeset, define the data structure that includes a node for each set of config data that you will upload. This process is called modeling the data. You add components, collections, deployables, and CDIs as needed. For information on each of these items, see [CDM data model](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-family/cdm-data-model.md). For additional information on adding nodes to an application, see [Preparing an application for config data upload](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-family/cdm-prep-app-for-upload.md).\n\n    In this example, two components and two collections have been added. Now, the **PaymentSvc-1.0** component is included in the **Release-1.0** collection. As with all collections, this means that any data in the **PaymentSvc-1.0** component is now included in the **Release-1.0** collection.\n\n    \\[Omitted image \"cdm-add-component-to-collection.png\"\\] Alt text: Create a changeset\n\n    When you are satisfied with the structure \\(you can update at any time\\), you open the REST Explorer to begin the process of uploading the source config data into the CDM data tables. Do not commit the changeset — it remains open so you can upload data.\n\n3.  Using the REST APIs or the config data editor, set parameter values that specify the name of the application to upload to, the path within the CDM application data structure to place the data, the format of the source data \\(JSON in the example\\), and so on.\n\n    **Note:** When you upload your existing config from an XML file and the **ignoreAttributes** is set to **false**, the CDM XML Parser retains the attributes in JSON using identifiers. For more information, see [Parsing of XML files in CDM](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-family/cdm-parsing-xml-file.md).\n\n    This example shows the REST API Explorer platform utility for clarity. This is an example of how you might construct an Upload to components REST POST request that creates a `dbProperties.json` node in the **PaymentSvc-1.0** component and then adds the source data to the new node. \\(You specify the source data to upload in another field.\\) The APIs are described in [CdmApplicationsApi](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/applications-api.md), [CdmChangesetsApi](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/changesets-api.md), and [CdmSnapshotApi](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/api-reference/snapshot-api.md).\n\n    \\[Omitted image \"cdm-rest-explorer-components-2.png\"\\] Alt text: REST API Explorer form.\n\n4.  When you select **Send**, the API reads the original config data, uploads it and aligns it into the CDM data structure.\n\n    **Note:** Uploaded data items are sorted alphabetically within the structural folders to enable you to locate particular items quickly.\n\n    The system places the following limits on the count of config data items \\(CDIs\\):\n\n    -   An application can contain a maximum total of 100,000 CDIs.\n    -   Any single deployable can contain a maximum of 10,000 CDIs.\n    See [CDM system properties](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-family/cdm-system-properties.md) for information on configuring the **sn\\_cdm.max\\_allowed\\_cdi\\_per\\_application** and **sn\\_cdm.max\\_allowed\\_cdi\\_per\\_deployable** property settings.\n\n    **Important:** Each time you submit a POST request, the API performs the POST and also generates an upload script. You can specify one of several script languages. The purpose is for you to use the code in your pipeline system to automate the upload process for this application in future uploads.\n\n5.  Back to CDM: Review and update the config data as described in [Preparing an application for config data upload](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-family/cdm-prep-app-for-upload.md).\n6.  When you are satisfied that the application is a full and correct representation of the config data, you can commit the changeset. The commit action generates a snapshot of each deployable and causes the API to store the data in CDM tables.\n\n    Now that the application is fully in place, you can manage the data as needed: Update config settings, apply policies to validate the data, export valid snapshots of config data, and so on.\n\n    While you export any snapshot, the system can generate API code that you can use to automate the export process. See [Generate API invocation code for an exporter](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-family/cdm-exporter-gen-api-code.md) for details.\n\n\n**Related topics**  \n\n\n[Preparing an application for config data upload](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-family/cdm-prep-app-for-upload.md)\n\n[Parsing of XML files in CDM](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-family/cdm-parsing-xml-file.md)\n\n[Parsing of CSV files in CDM](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-family/cdm-parsing-csv-file.md)\n\n"}}