SAP Analytics Hub download format

You can download your SAP Analytics Hub data in the format of a .zip file, having the following structure:

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

Note that whatever elements you want to download, you will always get the structure folder.

The download format is pretty similar to the API output, with some variants, as described below.

digest

The .zip file contains a digest to check if the file has been modifield.

info.json

This file contains the version of the SAP Analytics Hub which was used to generate this .zip file, a timestamp and the export options used. It takes the following format:

{
    "git.build.version": 2018.09.01,
	"exportOptions": {
        "structure": true,
        "assets": true,
        "drafts": true,
        "usage": true,
        "customization": true,
        "picked": true,
        "users": true,
        "favorites": true,
        "images": true
	},
    "timestamp": 1525346955454
}
		

assets.json

Assets are downloaded as a JSON array, which entities take the following format:

{
    "id": 1,
    "type": 1,                     // The assettype id, referencing the one from assettype.json
    "lastModified": 1501857894182, // Timestamp of the asset last modification date
    "created": 1501857894182,      // Timestamp of the asset creation date
    "createdBy": {                 // User serialization (see users.json) of the asset creator
        "id": 1,
        "corpId": "P1234567890",
        "firstName": "John",
        "lastName": "Doe",
        "avatar": ""
    },
    "modifiedBy": {                // User serialization (see users.json) of the last asset editor
        "id": 1,
        "corpId": "P1234567890",
        "firstName": "John",
        "lastName": "Doe",
        "avatar": ""
    },
    "viewCount": 42,
    "layout": {
        "tileLayout": 3          // id of the tile layout used for this asset
    },
    "fields": {
        "1": {
            "id": 1,               // The AssetField id, referencing the one from assettype.json
            "values": [
                {
                    "id": 1,
                    "value": "A Field value"
                }
            ]
        }
        // ...
    },
    "lovFields": {
        "1": {
            "id": 1,               // The AssetLoVField id, referencing the one from assettype.json
            "values": [
                {
                    "id": 5        // The LoV value id, referencing the one from lov.json
                }
            ]
        }
        // ...
    },
    "images": [
        {
            "id": 4,
            "uuid": "af116b3e-a003-4ca4-b351-e4cde168510a",
            "title": "image.jpg",
            "url": "8ae413de-6ed1-4db4-b330-0146a8ef6070",
                                   // filename of the image, as used in images
            "type": "image"
        }
        // ...
    ],
    "links": [
        {
            "id": 1,
            "uuid": "35ae4c0a-3f64-49ab-872b-825c1fbae9c7",
            "title": "SAP Website",
            "url": "http://www.sap.com",
            "type": "external"
        }
        // ...
    ],
    "tags": [
        {
            "id": 42,
            "title": "#SAP"
        }
        // ...
    ],
    "status": "live"               // Can be either live or retired (hidden)
}

drafts.json

Drafts are downloaded as a JSON array, which entities take the following format (very similar to the assets):

{
    "id": 1,
    "type": 1,                     // The assettype id, referencing the one from assettype.json
    "lastModified": 1501857894182, // Timestamp of the asset last modification date
    "created": 1501857894182,      // Timestamp of the asset creation date
    "createdBy": {                 // User serialization (see users.json) of the asset creator
        "id": 1,
        "corpId": "P1234567890",
        "firstName": "John",
        "lastName": "Doe",
        "avatar": ""
    },
    "modifiedBy": {                // User serialization (see users.json) of the last asset editor
        "id": 1,
        "corpId": "P1234567890",
        "firstName": "John",
        "lastName": "Doe",
        "avatar": ""
    },
    "layout": {
        "tileLayout": 3,           // id of the tile layout used for this asset
        "content": {
            "properties": {
                "coverImage": [
                    "af116b3e-a003-4ca4-b351-e4cde168510a"
                                   // uuid of the image to be used on the tile (see "images" below)
                ]
            }
        }
    },
    "fields": {
        "1": {
            "id": 1,               // The AssetField id, referencing the one from assettype.json
            "values": [
                {
                    "id": 1,
                    "value": "A Field value"
                }
            ]
        }
        // ...
    },
    "lovFields": {
        "1": {
            "id": 1,               // The AssetLoVField id, referencing the one from assettype.json
            "values": [
                {
                    "id": 5        // The LoV value id, referencing the one from lov.json
                }
            ]
        }
        // ...
    },
    "images": [
        {
            "id": 4,
            "uuid": "af116b3e-a003-4ca4-b351-e4cde168510a",
            "title": "image.jpg",
            "url": "8ae413de-6ed1-4db4-b330-0146a8ef6070",
                                   // filename of the image, as used in images
            "type": "image"
        }
        // ...
    ],
    "links": [
        {
            "id": 1,
            "uuid": "35ae4c0a-3f64-49ab-872b-825c1fbae9c7",
            "title": "SAP Website",
            "url": "http://www.sap.com",
            "type": "external"
        }
        // ...
    ],
    "tags": [
        {
            "id": 42,
            "title": "#SAP"
        }
        // ...
    ],
    "status": "draft"              // Can be either draft, forReview or rejected
}

users.json

Users are downloaded as a JSON array, which entities take the following format:

{
    "id": 1,
    "corpId": "P1234567890",
    "firstName": "John",
    "lastName": "Doe",
    "avatar": ""
    "roles": [
        "TenantOperator"
        // ...
    ],
    // If favorites are downloaded
    "favorites": [
        1                          // This is the Asset id, referencing the one from assets.json
        // ...
    ]
}

usage.json

Usage is downloaded as a JSON array, which entities take the following format:

{
    "userId": 1,                   // This is the User id, referencing the one from users.json
    "date": 1508486624588,
    "type: "asset",                // Type of the object concerned by the usage
    "objectId": 1,                 // This is the object id concerned by the usage, here referencing one from assets.json
    "action": "view"
}

customization.json

Customization of SAP Analytics Hub is 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 are 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 are 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 are 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) are 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
                }
            }
        ]
    }
]