SAP Analytics Hub upload

You can upload your SAP Analytics Hub data in the format of a .zip file, such a .zip file is the result of a download, the following files will be uploaded:

export.zip
    |
    +---- digest
    |
    +---- info.json
    |
    +---- customization.json
    |
    +---- images/
    |
    +---- structure/
              |
              +---- lov.json
              |
              +---- field.json
              |
              +---- lovfield.json
              |
              +---- assettype.json

Note that whatever data you want to upload, we will always upload the structure data.

digest

This file is used to check that the .zip file has not been modified since its generation.

info.json

This file contains information about the version of the SAP Analytics Hub which was used to generate this .zip file, this version will be checked before uploading the .zip file. It takes the following format:

{
    "git.build.version": 2018.09.01,
	"exportOptions": {
        "structure": true,
        "customization": true,
        "images": true
	},
    "timestamp": 1525346955454
}
		

customization.json

Customization of SAP Analytics Hub was downloaded as a JSON object, taking the following format:

{
    "pickedAssets": [
        {
            "assetId": 1,          // This is the Asset id, referencing the one from assets.json
            "pickedDate": 1503593105618
        }
        // ...
    ],
    "branding": {
        "icon": {
            "title": "image.jpg",
            "url": "dd0efb11-6666-413c-b139-6cc58d8df619"
        },
        "title": "Your custom Analytics Hub title",
        "homePageLayout": {
            "mainSections": [{     // List of sections composing the main area of the home page
                    "title": "PICKED FOR YOU",
                    "type": "picked"
                }, {
                    "title": "MOST VIEWED",
                    "type": "mostViewed"
                }],
            "sideSections": [{     // List of sections composing the side area of the home page
                    "title": "MY FAVORITES",
                    "type": "favorites"
                }, {
                    "title": "RECENTLY USED",
                    "type": "recentlyUsed"
                }]
        }
    },
    "facetOrder": [
        1                          // This is the AssetLoVField id, referencing the one from assettype.json
        // ...
    ]
}

images

Images were downloaded within the images folder. Their name is unique for the whole application, and suffixed with the proper extension (.gif, .png, .jpg or .bmp) depending on their mime type.

lov.json

List of Values were downloaded as a JSON array, which entities take the following format:

{
    "id": 1,
    "title": "Your LoV title",
    "values": [
        {
          "id": 1,
          "title": "A LoV value title"
        }
        // ...
    ]
}

field.json

Fields were downloaded as a JSON array, which entities take the following format:

{
    "id": 1,
    "multi": false,   // Whether multi selection is enabled
    "type": "string", // Type can be string or link
    "title": "Your Field title",
    "description": "Your Field placeholder text"
}

lovfield.json

LoV Fields (Fields of type LoV in SAP Analytics Hub Cockpit) are downloaded as a JSON array, which entities take the following format:

{
    "id": 1,
    "lovId": 1,       // The LoV id, referencing the one from lov.json
    "multi": false,   // Whether multi selection is enabled
    "title": "Your LoV Field title",
    "description": "Your LoV Field placeholder text"
}

assettype.json

Asset types (though you can only have one at a time for now) were downloaded as a JSON array, which entities take the following format:

[
    {
        "id": 1,
        "title": "Your Asset Type",
        "fields": [
            {
                "id": 1,             // The AssetField id, identifying a Field in regards to an Asset type
                "field": {
                    "id": 1          // The Field id, referencing the one from field.json
                },
                "tileVisible": true, // Whether this field appears on tiles of this asset type
                                     // (should be false except for title and descriptions)
                "searchable": true,  // Whether assets of this type can be searched on this field
                                     // (should be false except for title and short description)
                "sortable": true     // Whether assets of this type can be sorted on this field
                                     // (should be false except for title)
            }
            // ...
        ],
        "lovFields": [
            {
                "id": 1,             // The AssetLoVField id, identifying a LoV Field in regards to an Asset type
                "lovField": {
                    "id": 1          // The LoV Field id, referencing the one from lovfield.json
                },
                "facetable": false,  // Whether the field should appear as a facet for this asset type
                "tileVisible": false // Whether this field appears on tiles of this asset type
                                     // (should be false except for title and descriptions)
            }
            // ...
        ],
        "layouts": [
            {
                "id": 6,
                "type": "detail",
                "assetType": 1,
                "content": {
                    // See layout REST API
                }
            }
        ]
    }
]