Overview

You can use the SAP Analytics Hub RESTful web services to interact with the SAP Analytics Hub.

HTTP Methods

This REST API adheres to standard HTTP and REST conventions in the usage of HTTP methods.

Method Usage

GET

Used to retrieve a resource

POST

Used to create and update a resource

DELETE

Used to delete an existing resource

HTTP Status Codes

This REST API adheres to standard HTTP and REST conventions in the usage of HTTP status codes.

Status Code Usage

200 OK

The request completed successfully.

409 Conflict

The request could not be completed due to a conflict.

400 Bad Request

The request was malformed. The response body includes an error providing further information.

404 Not Found

The requested resource did not exist.

CSRF

In order to prevent Cross-Site Request Forgery (CSRF), Analytics Hub provides a standard security mechanism based on a CSRF token. Every POST or DELETE request should provide an X-CSRF-Token header that is associated with the HTTP session. To get this token, call any GET endpoint (e.g. /hub/api/v1/profile) with X-CSRF-Token: Fetch.

SAP Analytics Hub API

This API exposes services that allow you to interact with the SAP Analytics Hub:

  • Getting the configuration

  • Updating the branding

  • Managing picked assets

  • Managing favorites

  • Searching for assets

  • Suggesting words

  • Getting the user profile

  • Managing the maintenance

Getting the SAP Analytics Hub Configuration

You can retrieve the SAP Analytics Hub configuration through the following entry point:

  • /hub/api/v1/config

Retrieve the SAP Analytics Hub configuration

A GET request fetches the SAP Analytics Hub configuration.

Response structure

Path Type Description

layouts

Object

Layouts of the SAP Analytics Hub

configurations

Array

Specific system configuration properties of the SAP Analytics Hub

Example request

$ curl '{server hostname}/hub/api/v1/config' -i -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 4057

{
  "layouts" : {
    "1" : {
      "id" : 1,
      "type" : "facet",
      "assetType" : null,
      "content" : {
        "facetOrder" : [ 2, 3 ]
      }
    },
    "2" : {
      "id" : 2,
      "type" : "application",
      "assetType" : null,
      "content" : {
        "title" : "",
        "icon" : {
          "title" : null,
          "url" : null
        },
        "favicon" : {
          "title" : null,
          "url" : null,
          "source" : null
        },
        "homePageLayout" : {
          "mainSections" : [ {
            "title" : "Picked for you",
            "type" : "picked"
          }, {
            "title" : "Most viewed",
            "type" : "mostViewed"
          } ],
          "sideSections" : [ {
            "title" : "My favorites",
            "type" : "favorites"
          }, {
            "title" : "Recently used",
            "type" : "recentlyUsed"
          } ]
        },
        "header" : {
          "title" : "",
          "icon" : {
            "title" : null,
            "url" : null
          },
          "image" : {
            "title" : null,
            "url" : null,
            "opacity" : 100.0,
            "position" : "center center",
            "repeat" : "none",
            "size" : "initial"
          },
          "color" : "",
          "fontColor" : "dark"
        }
      }
    },
    "7" : {
      "id" : 7,
      "type" : "tile",
      "assetType" : 2,
      "content" : {
        "type" : "NO_IMAGE",
        "title" : {
          "id" : "fcc600b9-770d-4b3e-8dba-cd89fc82a242",
          "type" : "field",
          "emphasize" : false,
          "value" : {
            "ref" : 6
          }
        },
        "shortDescription" : {
          "id" : "2b4b35c4-3594-437f-a5f9-a9e99fe072fd",
          "type" : "field",
          "emphasize" : false,
          "value" : {
            "ref" : 8
          }
        }
      }
    },
    "8" : {
      "id" : 8,
      "type" : "tile",
      "assetType" : 2,
      "content" : {
        "type" : "BIG_IMAGE",
        "title" : {
          "id" : "fcc600b9-770d-4b3e-8dba-cd89fc82a242",
          "type" : "field",
          "emphasize" : false,
          "value" : {
            "ref" : 6
          }
        },
        "shortDescription" : {
          "id" : "2b4b35c4-3594-437f-a5f9-a9e99fe072fd",
          "type" : "field",
          "emphasize" : false,
          "value" : {
            "ref" : 8
          }
        }
      }
    },
    "9" : {
      "id" : 9,
      "type" : "tile",
      "assetType" : 2,
      "content" : {
        "type" : "SMALL_IMAGE",
        "title" : {
          "id" : "fcc600b9-770d-4b3e-8dba-cd89fc82a242",
          "type" : "field",
          "emphasize" : false,
          "value" : {
            "ref" : 6
          }
        },
        "shortDescription" : {
          "id" : "2b4b35c4-3594-437f-a5f9-a9e99fe072fd",
          "type" : "field",
          "emphasize" : false,
          "value" : {
            "ref" : 8
          }
        }
      }
    },
    "10" : {
      "id" : 10,
      "type" : "detail",
      "assetType" : 2,
      "content" : {
        "title" : {
          "id" : "4482d667-b12f-4ff0-87a5-b1c4b5038cfc",
          "type" : "field",
          "emphasize" : false,
          "value" : {
            "ref" : 6
          }
        },
        "shortDescription" : {
          "id" : "84b14320-5969-4485-93bb-c0e529fe7585",
          "type" : "field",
          "emphasize" : false,
          "value" : {
            "ref" : 8
          }
        },
        "sections" : [ {
          "id" : "aa7cb52b-f6d2-42cc-a745-1d4e744bfc0f",
          "title" : "Description",
          "fields" : [ {
            "id" : "4483a2b0-61dc-4ec7-a38d-29d9504a35ae",
            "type" : "field",
            "emphasize" : false,
            "value" : {
              "ref" : 7
            }
          } ]
        } ],
        "overviewSideFields" : [ ]
      }
    }
  },
  "configurations" : [ {
    "type" : "SEARCH_SERVICE",
    "key" : "ENABLED",
    "value" : "false"
  } ]
}

Getting the User Profile

You can retrieve the user profile through the following entry point:

  • /hub/api/v1/profile

Retrieve the user profile

A GET request fetches the user profile.

Response structure

Path Type Description

id

Number

The user identifier

corpId

String

The user corporate identifier

firstName

String

The user first name

lastName

String

The user last name

avatar

String

The user avatar (URL)

roles

Array

The user roles

preferences

Object

The user preferences

newVersion

Boolean

Whether the application is using an unknown version for the user

teams

Array

The teams the user belongs to

Example request

$ curl '{server hostname}/hub/api/v1/profile' -i -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 343

{
  "id" : 1000,
  "corpId" : "I000000",
  "firstName" : "John",
  "lastName" : "Core",
  "avatar" : "https://avatars.wdf.sap.corp/avatar/unknown",
  "roles" : [ "TenantOperator", "ChiefContentEditor" ],
  "preferences" : { },
  "newVersion" : true,
  "teams" : [ {
    "id" : 1,
    "platformId" : "DemoTeam",
    "title" : "DemoTeam"
  } ]
}

Accept the application terms

Since version 17.12

A POST request on /hub/api/v1/profile/terms accepts the application terms for the current user and thus grant access to the application. This request has no body response and so rightly returns a 204 status code.

Managing Picked Assets

You can manage picked assets through the following entry point:

  • /hub/api/v1/picked

Retrieve all picked assets

A GET request fetches all picket assets.

Response structure

Path Type Description

[].asset

Object

The picked asset

[].pickedDate

Number

The date when the asset has been picked

Example request

$ curl '{server hostname}/hub/api/v1/picked' -i -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 2855

[ {
  "asset" : {
    "id" : 2,
    "type" : 2,
    "lastModified" : 1528794667475,
    "created" : 1528794667475,
    "createdBy" : null,
    "modifiedBy" : null,
    "viewCount" : 2,
    "layout" : {
      "tileLayout" : 9
    },
    "fields" : {
      "6" : {
        "id" : 6,
        "dataType" : "string",
        "multi" : false,
        "title" : "Title",
        "values" : [ {
          "id" : 6,
          "value" : "My first asset is updated [1]"
        } ]
      },
      "8" : {
        "id" : 8,
        "dataType" : "string",
        "multi" : false,
        "title" : "Short Description",
        "values" : [ {
          "id" : 8,
          "value" : "Short desc of My first asset is updated"
        } ]
      }
    },
    "lovFields" : {
      "4" : {
        "id" : 4,
        "title" : "List Of Values - Field",
        "multi" : true,
        "lovId" : 4,
        "values" : [ {
          "id" : 13,
          "value" : "Third value"
        }, {
          "id" : 12,
          "value" : "Second value"
        } ]
      },
      "5" : {
        "id" : 5,
        "title" : "Facet color - Field",
        "multi" : true,
        "lovId" : 5,
        "values" : [ {
          "id" : 14,
          "value" : "Blue"
        }, {
          "id" : 16,
          "value" : "Red"
        } ]
      },
      "6" : {
        "id" : 6,
        "title" : "Facet country - Field",
        "multi" : true,
        "lovId" : 6,
        "values" : [ {
          "id" : 18,
          "value" : "France"
        } ]
      }
    },
    "images" : [ {
      "id" : 10,
      "uuid" : "b6a47db4-a113-4046-b4ae-a1e69a933297",
      "title" : "Second image",
      "url" : "IMAGE_TEST.jpg",
      "type" : "image",
      "titles" : [ ]
    } ],
    "links" : [ {
      "id" : 7,
      "uuid" : "ee1b44b3-ec79-4cbc-a355-e8189548c71d",
      "title" : "Third Url",
      "url" : "http://www.sap.com",
      "type" : "external",
      "titles" : [ {
        "languageId" : 2,
        "title" : "Third Url"
      } ]
    }, {
      "id" : 8,
      "uuid" : "ed468961-e58d-4324-9be3-ea6ffe47e349",
      "title" : "Second Url",
      "url" : "http://www.sap.com",
      "type" : "external",
      "titles" : [ {
        "languageId" : 2,
        "title" : "Second Url"
      } ]
    }, {
      "id" : 9,
      "uuid" : "7ebdb035-4d77-4b95-b959-6dad01b881a0",
      "title" : "First Url",
      "url" : "http://www.sap.com",
      "type" : "external",
      "titles" : [ {
        "languageId" : 2,
        "title" : "First Url"
      } ]
    } ],
    "favorites" : [ ],
    "tags" : [ {
      "id" : 4,
      "title" : "Third Tag"
    }, {
      "id" : 2,
      "title" : "Second Tag"
    } ],
    "status" : "live",
    "teams" : [ {
      "id" : 1,
      "platformId" : "DemoTeam",
      "title" : "DemoTeam"
    } ]
  },
  "pickedDate" : 1528794669782
} ]

Pick an asset

A POST request picks an asset.

Path parameters

Table 1. /hub/api/v1/picked/{assetId}
Parameter Description

assetId

The identifier of the asset to be picked

Response structure

Path Type Description

id

Number

The identifier of the picked asset

Example request

$ curl '{server hostname}/hub/api/v1/picked/2' -i -X POST -H 'Content-Type: application/json;charset=UTF-8'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 14

{
  "id" : 2
}

Remove a picked asset

A DELETE request removes a picked asset.

Path parameters

Table 2. /hub/api/v1/picked/{assetId}
Parameter Description

assetId

The identifier of the asset to be removed from the picked assets

Response structure

Path Type Description

id

Number

The identifier of the asset removed from the picked assets

Example request

$ curl '{server hostname}/hub/api/v1/picked/2' -i -X DELETE -H 'Content-Type: application/json;charset=UTF-8'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 14

{
  "id" : 2
}

Pick a list of assets

Since version 17.09

A POST request picks a list of assets.

Request structure

Path Type Description

assetIds

Array

The identifiers of the assets to be picked

Response structure

Path Type Description

ids

Array

The identifiers of the picked assets

Example request

$ curl '{server hostname}/hub/api/v1/picked' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "assetIds" : [ 2, 3 ]
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 22

{
  "ids" : [ 2, 3 ]
}

Remove a list of picked assets

Since version 17.09

A DELETE request removes a list of picked assets.

Request structure

Path Type Description

assetIds

Array

The identifiers of the assets to be removed from the picked assets

Response structure

Path Type Description

ids

Array

The identifiers of the assets removed from the picked assets

Example request

$ curl '{server hostname}/hub/api/v1/picked' -i -X DELETE -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "assetIds" : [ 2, 3 ]
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 22

{
  "ids" : [ 2, 3 ]
}

Getting Usage Metrics

Since version 17.12

You can retrieve usage metrics through the following entry points:

  • /hub/api/v1/metrics/uservisit to retrieve metrics on user visits

  • /hub/api/v1/metrics/assetview to retrieve metrics on asset views

  • /hub/api/v1/metrics/topassets to retrieve the most viewed assets

Retrieve metrics on user visits

A POST request retrieves the metrics on user visits.

Request structure

Path Type Description

from

Number

The start date (timestamp)

to

Number

The end date (timestamp)

distinct

Boolean

True if the usage is unique, false if accumulated

granularity

String

The time granularity ('d' for day, 'w' for weeks, 'm' for months, 'y' for year, total)

timezone

Number

The timezone (from -12 to 14, relative to UTC)

Response structure

Path Type Description

[]

Array

Usage data

[].date

Number

The starting date

[].value

Number

The number of user visits

Example request

$ curl '{server hostname}/hub/api/v1/metrics/uservisit' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "from" : 1528535469242,
  "to" : 1528794669242,
  "distinct" : false,
  "granularity" : "d",
  "timezone" : 2
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 184

[ {
  "date" : 1528535469242,
  "value" : 0
}, {
  "date" : 1528581600000,
  "value" : 0
}, {
  "date" : 1528668000000,
  "value" : 0
}, {
  "date" : 1528754400000,
  "value" : 107
} ]

Retrieve metrics on asset views

A POST request retrieves the metrics on asset views.

Request structure

Path Type Description

from

Number

The start date (timestamp)

to

Number

The end date (timestamp)

distinct

Boolean

True if the usage is unique, false if accumulated

granularity

String

The time granularity ('d' for day, 'w' for weeks, 'm' for months, 'y' for year, total)

timezone

Number

The timezone (from -12 to 14, relative to UTC)

Response structure

Path Type Description

[]

Array

Usage data

[].date

Number

The starting date

[].value

Number

The number of asset views

Example request

$ curl '{server hostname}/hub/api/v1/metrics/assetview' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "from" : 1528535469242,
  "to" : 1528794669242,
  "distinct" : true,
  "granularity" : "total",
  "timezone" : 2
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 47

[ {
  "date" : 1528535469242,
  "value" : 1
} ]

Retrieve most viewed assets

A POST request retrieves the most viewed assets.

Request structure

Path Type Description

from

Number

The start date (timestamp)

to

Number

The end date (timestamp)

sortCriteria

String

Sort by "totalViews" or "UniqueViews"

limit

Number

The limit number for the asset rank

Response structure

Path Type Description

[]

Array

Usage data

[].id

Number

The asset identifier

[].title

String

The asset title

[].totalViews

Number

The total views

[].uniqueViews

Number

The number of distinct users that viewed the asset

Example request

$ curl '{server hostname}/hub/api/v1/metrics/topassets' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "from" : 1528535469242,
  "to" : 1528794669242,
  "sortCriteria" : "totalViews",
  "limit" : 10
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 104

[ {
  "id" : 2,
  "title" : "My first asset is updated [1]",
  "totalViews" : 1,
  "uniqueViews" : 1
} ]

Managing Favorites

You can manage favorite assets through the following entry point:

  • /hub/api/v1/favorite

Retrieve all favorite assets

A GET request fetches all favorite assets.

Response structure

Path Type Description

My_favorites_group

Array

The favorites within the defined group

Example request

$ curl '{server hostname}/hub/api/v1/favorite' -i -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 3308

{
  "My_favorites_group" : [ {
    "id" : 1,
    "asset" : {
      "id" : 2,
      "type" : 2,
      "lastModified" : 1528794667475,
      "created" : 1528794667475,
      "createdBy" : null,
      "modifiedBy" : null,
      "viewCount" : 2,
      "layout" : {
        "tileLayout" : 9
      },
      "fields" : {
        "6" : {
          "id" : 6,
          "dataType" : "string",
          "multi" : false,
          "title" : "Title",
          "values" : [ {
            "id" : 6,
            "value" : "My first asset is updated [1]"
          } ]
        },
        "8" : {
          "id" : 8,
          "dataType" : "string",
          "multi" : false,
          "title" : "Short Description",
          "values" : [ {
            "id" : 8,
            "value" : "Short desc of My first asset is updated"
          } ]
        }
      },
      "lovFields" : {
        "4" : {
          "id" : 4,
          "title" : "List Of Values - Field",
          "multi" : true,
          "lovId" : 4,
          "values" : [ {
            "id" : 13,
            "value" : "Third value"
          }, {
            "id" : 12,
            "value" : "Second value"
          } ]
        },
        "5" : {
          "id" : 5,
          "title" : "Facet color - Field",
          "multi" : true,
          "lovId" : 5,
          "values" : [ {
            "id" : 14,
            "value" : "Blue"
          }, {
            "id" : 16,
            "value" : "Red"
          } ]
        },
        "6" : {
          "id" : 6,
          "title" : "Facet country - Field",
          "multi" : true,
          "lovId" : 6,
          "values" : [ {
            "id" : 18,
            "value" : "France"
          } ]
        }
      },
      "images" : [ {
        "id" : 10,
        "uuid" : "b6a47db4-a113-4046-b4ae-a1e69a933297",
        "title" : "Second image",
        "url" : "IMAGE_TEST.jpg",
        "type" : "image",
        "titles" : [ ]
      } ],
      "links" : [ {
        "id" : 7,
        "uuid" : "ee1b44b3-ec79-4cbc-a355-e8189548c71d",
        "title" : "Third Url",
        "url" : "http://www.sap.com",
        "type" : "external",
        "titles" : [ {
          "languageId" : 2,
          "title" : "Third Url"
        } ]
      }, {
        "id" : 8,
        "uuid" : "ed468961-e58d-4324-9be3-ea6ffe47e349",
        "title" : "Second Url",
        "url" : "http://www.sap.com",
        "type" : "external",
        "titles" : [ {
          "languageId" : 2,
          "title" : "Second Url"
        } ]
      }, {
        "id" : 9,
        "uuid" : "7ebdb035-4d77-4b95-b959-6dad01b881a0",
        "title" : "First Url",
        "url" : "http://www.sap.com",
        "type" : "external",
        "titles" : [ {
          "languageId" : 2,
          "title" : "First Url"
        } ]
      } ],
      "favorites" : [ {
        "id" : 1,
        "assetId" : 2,
        "group" : "My_favorites_group"
      } ],
      "tags" : [ {
        "id" : 4,
        "title" : "Third Tag"
      }, {
        "id" : 2,
        "title" : "Second Tag"
      } ],
      "status" : "live",
      "teams" : [ {
        "id" : 1,
        "platformId" : "DemoTeam",
        "title" : "DemoTeam"
      } ]
    },
    "date" : 1528794670003,
    "title" : "My first asset is updated [1]",
    "accessFlag" : true
  } ]
}

Retrieve the top n favorites by creation date

A GET request fetches the top n favorites by creation date.

Request parameter

  • limit: 10 by default. Number of favorites to retrieve.

Response structure

Path Type Description

My_favorites_group

Array

The favorites within the defined group

Example request

$ curl '{server hostname}/hub/api/v1/favorite/top?limit=1' -i -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 3308

{
  "My_favorites_group" : [ {
    "id" : 1,
    "asset" : {
      "id" : 2,
      "type" : 2,
      "lastModified" : 1528794667475,
      "created" : 1528794667475,
      "createdBy" : null,
      "modifiedBy" : null,
      "viewCount" : 2,
      "layout" : {
        "tileLayout" : 9
      },
      "fields" : {
        "6" : {
          "id" : 6,
          "dataType" : "string",
          "multi" : false,
          "title" : "Title",
          "values" : [ {
            "id" : 6,
            "value" : "My first asset is updated [1]"
          } ]
        },
        "8" : {
          "id" : 8,
          "dataType" : "string",
          "multi" : false,
          "title" : "Short Description",
          "values" : [ {
            "id" : 8,
            "value" : "Short desc of My first asset is updated"
          } ]
        }
      },
      "lovFields" : {
        "4" : {
          "id" : 4,
          "title" : "List Of Values - Field",
          "multi" : true,
          "lovId" : 4,
          "values" : [ {
            "id" : 13,
            "value" : "Third value"
          }, {
            "id" : 12,
            "value" : "Second value"
          } ]
        },
        "5" : {
          "id" : 5,
          "title" : "Facet color - Field",
          "multi" : true,
          "lovId" : 5,
          "values" : [ {
            "id" : 14,
            "value" : "Blue"
          }, {
            "id" : 16,
            "value" : "Red"
          } ]
        },
        "6" : {
          "id" : 6,
          "title" : "Facet country - Field",
          "multi" : true,
          "lovId" : 6,
          "values" : [ {
            "id" : 18,
            "value" : "France"
          } ]
        }
      },
      "images" : [ {
        "id" : 10,
        "uuid" : "b6a47db4-a113-4046-b4ae-a1e69a933297",
        "title" : "Second image",
        "url" : "IMAGE_TEST.jpg",
        "type" : "image",
        "titles" : [ ]
      } ],
      "links" : [ {
        "id" : 7,
        "uuid" : "ee1b44b3-ec79-4cbc-a355-e8189548c71d",
        "title" : "Third Url",
        "url" : "http://www.sap.com",
        "type" : "external",
        "titles" : [ {
          "languageId" : 2,
          "title" : "Third Url"
        } ]
      }, {
        "id" : 8,
        "uuid" : "ed468961-e58d-4324-9be3-ea6ffe47e349",
        "title" : "Second Url",
        "url" : "http://www.sap.com",
        "type" : "external",
        "titles" : [ {
          "languageId" : 2,
          "title" : "Second Url"
        } ]
      }, {
        "id" : 9,
        "uuid" : "7ebdb035-4d77-4b95-b959-6dad01b881a0",
        "title" : "First Url",
        "url" : "http://www.sap.com",
        "type" : "external",
        "titles" : [ {
          "languageId" : 2,
          "title" : "First Url"
        } ]
      } ],
      "favorites" : [ {
        "id" : 1,
        "assetId" : 2,
        "group" : "My_favorites_group"
      } ],
      "tags" : [ {
        "id" : 4,
        "title" : "Third Tag"
      }, {
        "id" : 2,
        "title" : "Second Tag"
      } ],
      "status" : "live",
      "teams" : [ {
        "id" : 1,
        "platformId" : "DemoTeam",
        "title" : "DemoTeam"
      } ]
    },
    "date" : 1528794670003,
    "title" : "My first asset is updated [1]",
    "accessFlag" : true
  } ]
}

Define an asset as favorite

A POST request defines an asset as favorite.

Response structure

Path Type Description

[].id

Number

The favorite identifier

[].assetId

Number

The identifier of the asset defined as favorite

[].group

String

The group of the asset defined as favorite

Example request

$ curl '{server hostname}/hub/api/v1/favorite' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '[ {
  "assetId" : 2,
  "group" : "My_favorites_group"
} ]'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 69

[ {
  "id" : 1,
  "assetId" : 2,
  "group" : "My_favorites_group"
} ]

Remove an asset from favorites

A DELETE request removes an asset from favorites.

Path parameters

Table 3. /hub/api/v1/favorite/{id}
Parameter Description

id

The identifier of the favorite to remove

Response structure

Path Type Description

id

Number

The identifier of the removed favorite

Example request

$ curl '{server hostname}/hub/api/v1/favorite/1' -i -X DELETE -H 'Content-Type: application/json;charset=UTF-8'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 14

{
  "id" : 1
}

Getting Audit Logs

Since version 17.12

You can retrieve audit logs through the following entry points:

  • /hub/api/v1/logs

Retrieve audit logs

A POST request retrieves the audit logs.

Request structure

Path Type Description

sortCriteria

String

The sort criteria (name of the field: date, action or type)

sortDirection

String

The sort direction (asc or desc)

page

Number

The page number (>= 0)

limit

Number

The page size (>= 0, 0 for all)

filters

Array

Audit Log filters - [{f1: [v1, v2], f2 : [v3]}, {f3: [v4]}] → (f1 in (v1, v2) and f2 = v3) or (f3 = v4)

Response structure

Path Type Description

[]

Array

Audit Log data

[].date

Number

Audit Log date

[].user

Object

Audit Log user

[].action

String

Audit Log action (create, delete…​)

[].type

String

Audit Log type (asset, lov, field…​)

[].objectId

Number

Audit Log object ID (draft ID…​)

[].relatedId

Number

Audit Log related object ID (original object ID if draft…​)

[].content

String

Audit Log content

Example request

$ curl '{server hostname}/hub/api/v1/logs' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "filters" : [ {
    "date" : [ 329090400000, 1612047600000 ],
    "action" : [ "create", "delete" ],
    "type" : [ "asset", "assetField" ],
    "content" : [ "live" ],
    "objectId" : [ 1, 2, 3 ]
  } ],
  "sortCriteria" : "type",
  "sortDirection" : "asc",
  "page" : 0,
  "limit" : 10
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 1088

[ {
  "date" : 1528794667102,
  "user" : {
    "id" : 1000,
    "corpId" : "I000000",
    "firstName" : "John",
    "lastName" : "Core",
    "avatar" : "https://avatars.wdf.sap.corp/avatar/unknown"
  },
  "action" : "create",
  "type" : "asset",
  "objectId" : 1,
  "relatedId" : 1,
  "content" : "{\"status\":\"live\",\"comment\":\"My first request 'live'\"}"
}, {
  "date" : 1528794668444,
  "user" : {
    "id" : 1000,
    "corpId" : "I000000",
    "firstName" : "John",
    "lastName" : "Core",
    "avatar" : "https://avatars.wdf.sap.corp/avatar/unknown"
  },
  "action" : "create",
  "type" : "asset",
  "objectId" : 2,
  "relatedId" : 3,
  "content" : "{\"status\":\"live\",\"comment\":\"My second request 'live'\"}"
}, {
  "date" : 1528794668563,
  "user" : {
    "id" : 1000,
    "corpId" : "I000000",
    "firstName" : "John",
    "lastName" : "Core",
    "avatar" : "https://avatars.wdf.sap.corp/avatar/unknown"
  },
  "action" : "create",
  "type" : "asset",
  "objectId" : 3,
  "relatedId" : 5,
  "content" : "{\"status\":\"live\",\"comment\":\"Another request 'live'\"}"
} ]

You can search for assets through the following entry point:

  • /hub/api/v1/search

Search for an asset

A POST request searches for an asset.

Request structure

Path Type Description

keywords

String

Search keywords

sortCriteria

String

The sort criteria (title|viewCount|creationDate)

sortDirection

String

The sort direction (asc|desc)

page

Number

The number of the page (chunck of assets) to retrieve

limit

Number

The number of assets by page

showFacets

Boolean

If true, facets are returned

showAssets

Boolean

If true, found assets are returned

showTags

Boolean

If true, tags are returned

selectedFacets

Object

The list of selected facet values

selectedFields

Array

The list of searchable fields

selectedTags

Array

The list of selected tags

Response structure

Path Type Description

assets

Array

The list of found assets

assetCount

Number

The number of found assets

facets

Array

The list of facets

tags

Array

The list of tags

Example request

$ curl '{server hostname}/hub/api/v1/search' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "keywords" : "first",
  "sortCriteria" : "viewCount",
  "sortDirection" : "desc",
  "page" : 0,
  "limit" : 10,
  "showFacets" : true,
  "showAssets" : true,
  "showTags" : false,
  "selectedFacets" : {
    "3" : [ 8 ]
  },
  "selectedFields" : [ ],
  "selectedTags" : [ ]
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 6531

{
  "facets" : [ {
    "id" : 5,
    "title" : "Facet color - Field",
    "children" : [ {
      "id" : 14,
      "title" : "Blue",
      "children" : [ ],
      "count" : 2,
      "left" : 1,
      "sortType" : null,
      "groupingOnly" : false
    }, {
      "id" : 16,
      "title" : "Red",
      "children" : [ ],
      "count" : 2,
      "left" : 5,
      "sortType" : null,
      "groupingOnly" : false
    } ],
    "count" : -1,
    "left" : 1,
    "sortType" : "occurrence",
    "groupingOnly" : false
  }, {
    "id" : 6,
    "title" : "Facet country - Field",
    "children" : [ {
      "id" : 18,
      "title" : "France",
      "children" : [ ],
      "count" : 2,
      "left" : 3,
      "sortType" : null,
      "groupingOnly" : false
    } ],
    "count" : -1,
    "left" : 3,
    "sortType" : "occurrence",
    "groupingOnly" : false
  } ],
  "assets" : [ {
    "id" : 2,
    "type" : 2,
    "lastModified" : 1528794667475,
    "created" : 1528794667475,
    "createdBy" : null,
    "modifiedBy" : null,
    "viewCount" : 2,
    "layout" : {
      "tileLayout" : 9
    },
    "fields" : {
      "6" : {
        "id" : 6,
        "dataType" : "string",
        "multi" : false,
        "title" : "Title",
        "values" : [ {
          "id" : 6,
          "value" : "My first asset is updated [1]"
        } ]
      },
      "8" : {
        "id" : 8,
        "dataType" : "string",
        "multi" : false,
        "title" : "Short Description",
        "values" : [ {
          "id" : 8,
          "value" : "Short desc of My first asset is updated"
        } ]
      }
    },
    "lovFields" : {
      "4" : {
        "id" : 4,
        "title" : "List Of Values - Field",
        "multi" : true,
        "lovId" : 4,
        "values" : [ {
          "id" : 13,
          "value" : "Third value"
        }, {
          "id" : 12,
          "value" : "Second value"
        } ]
      },
      "5" : {
        "id" : 5,
        "title" : "Facet color - Field",
        "multi" : true,
        "lovId" : 5,
        "values" : [ {
          "id" : 14,
          "value" : "Blue"
        }, {
          "id" : 16,
          "value" : "Red"
        } ]
      },
      "6" : {
        "id" : 6,
        "title" : "Facet country - Field",
        "multi" : true,
        "lovId" : 6,
        "values" : [ {
          "id" : 18,
          "value" : "France"
        } ]
      }
    },
    "images" : [ {
      "id" : 10,
      "uuid" : "b6a47db4-a113-4046-b4ae-a1e69a933297",
      "title" : "Second image",
      "url" : "IMAGE_TEST.jpg",
      "type" : "image",
      "titles" : [ ]
    } ],
    "links" : [ {
      "id" : 7,
      "uuid" : "ee1b44b3-ec79-4cbc-a355-e8189548c71d",
      "title" : "Third Url",
      "url" : "http://www.sap.com",
      "type" : "external",
      "titles" : [ {
        "languageId" : 2,
        "title" : "Third Url"
      } ]
    }, {
      "id" : 8,
      "uuid" : "ed468961-e58d-4324-9be3-ea6ffe47e349",
      "title" : "Second Url",
      "url" : "http://www.sap.com",
      "type" : "external",
      "titles" : [ {
        "languageId" : 2,
        "title" : "Second Url"
      } ]
    }, {
      "id" : 9,
      "uuid" : "7ebdb035-4d77-4b95-b959-6dad01b881a0",
      "title" : "First Url",
      "url" : "http://www.sap.com",
      "type" : "external",
      "titles" : [ {
        "languageId" : 2,
        "title" : "First Url"
      } ]
    } ],
    "favorites" : [ ],
    "tags" : [ {
      "id" : 4,
      "title" : "Third Tag"
    }, {
      "id" : 2,
      "title" : "Second Tag"
    } ],
    "status" : "live",
    "teams" : [ {
      "id" : 1,
      "platformId" : "DemoTeam",
      "title" : "DemoTeam"
    } ]
  }, {
    "id" : 3,
    "type" : 2,
    "lastModified" : 1528794667572,
    "created" : 1528794667572,
    "createdBy" : null,
    "modifiedBy" : null,
    "viewCount" : 0,
    "layout" : {
      "tileLayout" : 9
    },
    "fields" : {
      "6" : {
        "id" : 6,
        "dataType" : "string",
        "multi" : false,
        "title" : "Title",
        "values" : [ {
          "id" : 11,
          "value" : "My first asset is updated [1] [1]"
        } ]
      },
      "8" : {
        "id" : 8,
        "dataType" : "string",
        "multi" : false,
        "title" : "Short Description",
        "values" : [ {
          "id" : 13,
          "value" : "Short desc of My first asset is updated"
        } ]
      }
    },
    "lovFields" : {
      "4" : {
        "id" : 4,
        "title" : "List Of Values - Field",
        "multi" : true,
        "lovId" : 4,
        "values" : [ {
          "id" : 13,
          "value" : "Third value"
        }, {
          "id" : 12,
          "value" : "Second value"
        } ]
      },
      "5" : {
        "id" : 5,
        "title" : "Facet color - Field",
        "multi" : true,
        "lovId" : 5,
        "values" : [ {
          "id" : 14,
          "value" : "Blue"
        }, {
          "id" : 16,
          "value" : "Red"
        } ]
      },
      "6" : {
        "id" : 6,
        "title" : "Facet country - Field",
        "multi" : true,
        "lovId" : 6,
        "values" : [ {
          "id" : 18,
          "value" : "France"
        } ]
      }
    },
    "images" : [ {
      "id" : 15,
      "uuid" : "03909869-ebb6-4cac-8305-d6fb765c3d90",
      "title" : "Second image",
      "url" : "IMAGE_TEST.jpg",
      "type" : "image",
      "titles" : [ ]
    } ],
    "links" : [ {
      "id" : 12,
      "uuid" : "75e932a2-71f1-4cba-9249-8e1b576233f8",
      "title" : "Third Url",
      "url" : "http://www.sap.com",
      "type" : "external",
      "titles" : [ {
        "languageId" : 2,
        "title" : "Third Url"
      } ]
    }, {
      "id" : 13,
      "uuid" : "7ed6f8a4-7a3c-4d98-b60c-091eb127afe4",
      "title" : "Second Url",
      "url" : "http://www.sap.com",
      "type" : "external",
      "titles" : [ {
        "languageId" : 2,
        "title" : "Second Url"
      } ]
    }, {
      "id" : 14,
      "uuid" : "b508fa0f-6d13-45b4-a92e-7a91f1bcb5c6",
      "title" : "First Url",
      "url" : "http://www.sap.com",
      "type" : "external",
      "titles" : [ {
        "languageId" : 2,
        "title" : "First Url"
      } ]
    } ],
    "favorites" : [ ],
    "tags" : [ {
      "id" : 4,
      "title" : "Third Tag"
    }, {
      "id" : 2,
      "title" : "Second Tag"
    } ],
    "status" : "live",
    "teams" : [ {
      "id" : 1,
      "platformId" : "DemoTeam",
      "title" : "DemoTeam"
    } ]
  } ],
  "tags" : [ ],
  "assetCount" : 2
}

Suggesting Words

You can search for suggested words through the following entry point:

  • /hub/api/v1/suggest

Suggest words

A POST request suggests words.

Request structure

Path Type Description

keywords

String

Suggest keywords

Response structure

Path Type Description

titles

Array

Suggested completed words from asset titles

hiddenTags

Array

Suggested completed words from asset hidden tags

tags

Array

Suggested completed words from asset tags

fuzzy.titles

Array

Other possibilities from asset titles based on fuzzy search

fuzzy.hiddenTags

Array

Other possibilities from asset hidden tags based on fuzzy search

fuzzy.tags

Array

Other possibilities from asset tags based on fuzzy search

Example request

$ curl '{server hostname}/hub/api/v1/suggest' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "keywords" : "fi"
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 146

{
  "titles" : [ "first" ],
  "hiddenTags" : [ ],
  "tags" : [ ],
  "fuzzy" : {
    "titles" : [ ],
    "hiddenTags" : [ ],
    "tags" : [ ]
  }
}

Customizing the branding

You can customize the branding through the following entry point:

  • /hub/api/v1/branding

You can specify the header’s title, icon, color, image, and font color as well as the home page layout of SAP Analytics Hub.

Retrieve the current branding

A GET request retrieves the current branding.

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding' -i -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 472

{
  "title" : "",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Customize title

A POST request customizes the title of SAP Analytics Hub.

This is replaced in 18.05 by a call to the /header endpoint

Request structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/title' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "title" : "My customized SAP Analytics Hub title"
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 546

{
  "title" : "My customized SAP Analytics Hub title",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "My customized SAP Analytics Hub title",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Reset the title of SAP Analytics Hub

A DELETE request resets the title of SAP Analytics Hub

This is replaced in 18.05 by a call to the /header endpoint

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/title' -i -X DELETE -H 'Content-Type: application/json;charset=UTF-8'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 472

{
  "title" : "",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Customize header

Since version 18.05

A POST request customizes the header of SAP Analytics Hub.

If no value is given to a property the existing property is replaced by null

Table 4. General header branding
Property Description

title

The title shown in the header and of the SAP Analytics Hub

color

The background color of the header in hexadecimal format (e.g. "#ffffff")

fontColor

The font color of the header text and buttons, either "dark" or "light"

If a background image is used for the header, several branding properties are modifiable

Table 5. Header image branding
Property Description Valid value

imageOpacity

The opacity of the header image

Range from 0 to 100

imageRepeat

The repeat type of the header image

"horizontally", "vertically", "both", or "none"

imagePosition

The position of the header image, default is "center top"

"left top", left center", "left bottom", "right top", "right center", "right bottom", "center top", "center center", "center bottom"

imageSize

The size type of the image and how it fits into the header

"cover", "contain", "initial"

Request structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

color

String

The new color of the SAP Analytics Hub header.

fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

imageOpacity

Number

The opacity of the image for SAP Analytics Hub header

imageRepeat

String

The repeat type of the image for SAP Analytics Hub header

imageSize

String

The size type of the image for SAP Analytics Hub header

imagePosition

String

The position of the image for SAP Analytics Hub header

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/header' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "title" : "My customized SAP Analytics Hub title",
  "color" : "#ffffff",
  "fontColor" : "light",
  "imageOpacity" : 50.0,
  "imagePosition" : "right bottom",
  "imageRepeat" : "horizontally",
  "imageSize" : "cover"
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 558

{
  "title" : "My customized SAP Analytics Hub title",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "My customized SAP Analytics Hub title",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 50.0,
      "position" : "right bottom",
      "repeat" : "horizontally",
      "size" : "cover"
    },
    "color" : "#ffffff",
    "fontColor" : "light"
  }
}

Reset the header of SAP Analytics Hub

Since version 18.05

A DELETE request resets the header branding properties of SAP Analytics Hub without resetting the image or icon

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/header' -i -X DELETE -H 'Content-Type: application/json;charset=UTF-8'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 472

{
  "title" : "",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Customize icon

A POST request customizes the icon of SAP Analytics Hub.

This is replaced in 18.05 by a call to the /header/icon endpoint

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

String

The title of the SAP Analytics Hub’s icon

icon.url

String

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

String

The title of the SAP Analytics Hub’s icon

header.icon.url

String

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/icon' -i -X POST -H 'Content-Type: multipart/form-data;charset=UTF-8' -F 'file=@icon;type=image/jpg'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 544

{
  "title" : "",
  "icon" : {
    "title" : "icon",
    "url" : "431ed94f-4e39-456d-a4d0-1a867d7951d7"
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : "icon",
      "url" : "431ed94f-4e39-456d-a4d0-1a867d7951d7"
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Reset the icon of SAP Analytics Hub

Since version 17.09

A DELETE request resets the icon of SAP Analytics Hub.

This is replaced in 18.05 by a call to the /header/icon endpoint

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/icon' -i -X DELETE -H 'Content-Type: application/json;charset=UTF-8'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 472

{
  "title" : "",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Customize header icon

Since version 18.05

A POST request customizes the icon of SAP Analytics Hub.

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

String

The title of the SAP Analytics Hub’s icon

icon.url

String

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

String

The title of the SAP Analytics Hub’s icon

header.icon.url

String

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/header/icon' -i -X POST -H 'Content-Type: multipart/form-data;charset=UTF-8' -F 'file=@icon;type=image/jpg'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 544

{
  "title" : "",
  "icon" : {
    "title" : "icon",
    "url" : "fceb5221-f212-4c7b-9e23-606b30d9c9f4"
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : "icon",
      "url" : "fceb5221-f212-4c7b-9e23-606b30d9c9f4"
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Reset the header icon of SAP Analytics Hub

Since version 18.05

A DELETE request resets the icon of SAP Analytics Hub.

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/header/icon' -i -X DELETE -H 'Content-Type: application/json;charset=UTF-8'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 472

{
  "title" : "",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Customize favicon

Since version 18.05

A POST request customizes the favicon of SAP Analytics Hub.

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

String

The title of the SAP Analytics Hub’s favicon

favicon.url

String

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/favicon' -i -X POST -H 'Content-Type: multipart/form-data;charset=UTF-8' -F 'file=@icon;type=image/jpg'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 508

{
  "title" : "",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : "icon",
    "url" : "554587a9-cb9e-43c0-9a43-e8064f00f359",
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Reset the favicon of SAP Analytics Hub

Since version 18.05

A DELETE request resets the favicon of SAP Analytics Hub.

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/favicon' -i -X DELETE -H 'Content-Type: application/json;charset=UTF-8'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 472

{
  "title" : "",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Change the source image of the favicon

Since version 18.05

A POST request that sets the favicon to use the icon image or favicon image

Table 6. Properties
Property Description

source

The favicon image source type, either "icon" or "favicon"

Request structure

Path Type Description

faviconSource

String

The image source of the SAP Analytic Hub’s favicon

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

String

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/favicon/source' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "faviconSource" : "favicon"
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 477

{
  "title" : "",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : "favicon"
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Reset the favicon source of SAP Analytics Hub

Since version 18.05

A DELETE request resets the favicon source of SAP Analytics Hub.

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/favicon/source' -i -X DELETE -H 'Content-Type: application/json;charset=UTF-8'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 472

{
  "title" : "",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Customize header image

Since version 18.05

A POST request customizes the header’s background image of SAP Analytics Hub.

Excepted file types are jpg, gif, and png. The file cannot exceed 1Mb.

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

String

The title of the image for SAP Analytics Hub header

header.image.url

String

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/header/image' -i -X POST -H 'Content-Type: multipart/form-data;charset=UTF-8' -F 'file=@image;type=image/jpg'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 509

{
  "title" : "",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : "image",
      "url" : "0d1e7db6-7fde-4b44-82d0-2eae4d20a16a",
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Reset the header image of SAP Analytics Hub

Since version 18.05

A DELETE request resets the header image of SAP Analytics Hub.

Response structure

Path Type Description

title

String

The new title of the SAP Analytics Hub

icon.title

Null

The title of the SAP Analytics Hub’s icon

icon.url

Null

The URL of the SAP Analytics Hub’s icon

favicon.title

Null

The title of the SAP Analytics Hub’s favicon

favicon.url

Null

The URL of the SAP Analytics Hub’s favicon

favicon.source

Null

The image source of the SAP Analytic Hub’s favicon

header.title

String

The new title of the SAP Analytics Hub

header.icon.title

Null

The title of the SAP Analytics Hub’s icon

header.icon.url

Null

The URL of the SAP Analytics Hub’s icon

header.color

String

The new color of the SAP Analytics Hub header.

header.fontColor

String

The new font color of the SAP Analytics Hub header, dark or light

header.image.title

Null

The title of the image for SAP Analytics Hub header

header.image.url

Null

The URL of the image for SAP Analytics Hub header

header.image.opacity

Number

The opacity of the image for SAP Analytics Hub header

header.image.position

String

The position of the image for SAP Analytics Hub header

header.image.repeat

String

The repeat type of the image for SAP Analytics Hub header

header.image.size

String

The size type of the image for SAP Analytics Hub header

Example request

$ curl '{server hostname}/hub/api/v1/branding/header/image' -i -X DELETE -H 'Content-Type: application/json;charset=UTF-8'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 472

{
  "title" : "",
  "icon" : {
    "title" : null,
    "url" : null
  },
  "favicon" : {
    "title" : null,
    "url" : null,
    "source" : null
  },
  "header" : {
    "title" : "",
    "icon" : {
      "title" : null,
      "url" : null
    },
    "image" : {
      "title" : null,
      "url" : null,
      "opacity" : 100.0,
      "position" : "center center",
      "repeat" : "none",
      "size" : "initial"
    },
    "color" : "",
    "fontColor" : "dark"
  }
}

Retrieve the current home page layout

Since version 17.12

A GET request retrieves the current home page layout.

The layout is composed of a main area and a side area. Each one is defined by a list of sections.

By default, the layout is specified with four core sections:

  • Main area with "picked for you" and "most viewed" sections

  • Side area with "my favorites" and "recently used" sections

Table 7. Home page core section
Property Description

type

The section type (picked, mostViewed, favorites, recentlyUsed)

title

The section title

A custom section can be specified allowing to display assets resulting from a specified search.

Table 8. Home page custom section
Property Description

id

The section identifier

type

The section type (search)

title

The section title

searchUrl

The search URL

Response structure

Path Type Description

mainSections

Array

Main sections of the SAP Analytics Hub’s home page

sideSections

Array

Side sections of the SAP Analytics Hub’s home page

Example request

$ curl '{server hostname}/hub/api/v1/branding/hp' -i -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 299

{
  "mainSections" : [ {
    "title" : "Picked for you",
    "type" : "picked"
  }, {
    "title" : "Most viewed",
    "type" : "mostViewed"
  } ],
  "sideSections" : [ {
    "title" : "My favorites",
    "type" : "favorites"
  }, {
    "title" : "Recently used",
    "type" : "recentlyUsed"
  } ]
}

Customize the home page layout

Since version 17.12

A POST request customizes the home page layout of SAP Analytics Hub.

Response structure

Path Type Description

mainSections

Array

Main sections of the SAP Analytics Hub’s home page

sideSections

Array

Side sections of the SAP Analytics Hub’s home page

Example request

$ curl '{server hostname}/hub/api/v1/branding/hp' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "mainSections" : [ {
    "title" : "What's new",
    "type" : "picked"
  }, {
    "title" : "Most viewed",
    "type" : "mostViewed"
  }, {
    "title" : "My personal search",
    "type" : "search",
    "content" : {
      "searchUrl" : "https://{server}/hub/index.html?search=first"
    }
  } ],
  "sideSections" : [ {
    "title" : "Favorites",
    "type" : "favorites"
  } ]
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 434

{
  "mainSections" : [ {
    "title" : "What's new",
    "type" : "picked"
  }, {
    "title" : "Most viewed",
    "type" : "mostViewed"
  }, {
    "title" : "My personal search",
    "type" : "search",
    "id" : "58d8c1ea-fb54-40ce-a9de-18d8713a2912",
    "content" : {
      "searchUrl" : "https://{server}/hub/index.html?search=first"
    }
  } ],
  "sideSections" : [ {
    "title" : "Favorites",
    "type" : "favorites"
  } ]
}

Managing SAP Analytics Hub maintenance

You can manage the maintenance of SAP Analytics Hub through the following entry point:

  • /hub/api/v1/maintenance

Retrieve the current maintenance

A GET request retrieves the current maintenance.

Response structure

Path Type Description

[].id

Number

The maintenance identifier

[].user

Object

The user who created the maintenance

[].status

String

The maintenance status (planned|active)

[].message

String

The maintenance message

[].creationDate

Number

The maintenance creation date

[].startDate

Number

The maintenance start date

[].endDate

Number

The maintenance end date

[].type

String

The maintenance type

[].audience

String

The maintenance audience

[].flags

Number

The maintenance flags

Example request

$ curl '{server hostname}/hub/api/v1/maintenance' -i -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 417

[ {
  "id" : 5,
  "user" : {
    "id" : 1000,
    "corpId" : "I000000",
    "firstName" : "John",
    "lastName" : "Core",
    "avatar" : "https://avatars.wdf.sap.corp/avatar/unknown"
  },
  "status" : "planned",
  "message" : "We plan a new maintenance",
  "creationDate" : 1528794671057,
  "startDate" : 1491256800000,
  "endDate" : 1492207200000,
  "type" : "normal",
  "audience" : "restricted",
  "flags" : 0
} ]

Create a maintenance

A POST request creates a maintenance.

Request structure

Path Type Description

status

String

The maintenance status (planned|active)

startDate

Number

The maintenance start date

endDate

Number

The maintenance end date

message

String

The maintenance message

type

String

The maintenance type

audience

String

The maintenance audience

flags

Number

The maintenance flags

Response structure

Path Type Description

id

Number

The maintenance identifier

user

Object

The user who created the maintenance

status

String

The maintenance status (planned|active)

message

String

The maintenance message

creationDate

Number

The maintenance creation date

startDate

Number

The maintenance start date

endDate

Number

The maintenance end date

type

String

The maintenance type

audience

String

The maintenance audience

flags

Number

The maintenance flags

Example request

$ curl '{server hostname}/hub/api/v1/maintenance' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "message" : "We plan a new maintenance",
  "startDate" : 1491256800000,
  "endDate" : 1492207200000,
  "status" : "planned",
  "type" : "normal",
  "audience" : "restricted",
  "flags" : 0
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 413

{
  "id" : 5,
  "user" : {
    "id" : 1000,
    "corpId" : "I000000",
    "firstName" : "John",
    "lastName" : "Core",
    "avatar" : "https://avatars.wdf.sap.corp/avatar/unknown"
  },
  "status" : "planned",
  "message" : "We plan a new maintenance",
  "creationDate" : 1528794671057,
  "startDate" : 1491256800000,
  "endDate" : 1492207200000,
  "type" : "normal",
  "audience" : "restricted",
  "flags" : 0
}

Update a maintenance

A POST request updates a maintenance.

Request structure

Path Type Description

status

String

The maintenance status (planned|active)

startDate

Number

The maintenance start date

endDate

Number

The maintenance end date

message

String

The maintenance message

type

String

The maintenance type

audience

String

The maintenance audience

flags

Number

The maintenance flags

Response structure

Path Type Description

id

Number

The maintenance identifier

user

Object

The user who created the maintenance

status

String

The maintenance status (planned|active)

message

String

The maintenance message

creationDate

Number

The maintenance creation date

startDate

Number

The maintenance start date

endDate

Number

The maintenance end date

type

String

The maintenance type

audience

String

The maintenance audience

flags

Number

The maintenance flags

Example request

$ curl '{server hostname}/hub/api/v1/maintenance/5' -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json' -d '{
  "message" : "We activate the maintenance",
  "startDate" : 1491429600000,
  "endDate" : 1492380000000,
  "status" : "active",
  "type" : "normal",
  "audience" : "restricted",
  "flags" : 0
}'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 414

{
  "id" : 5,
  "user" : {
    "id" : 1000,
    "corpId" : "I000000",
    "firstName" : "John",
    "lastName" : "Core",
    "avatar" : "https://avatars.wdf.sap.corp/avatar/unknown"
  },
  "status" : "active",
  "message" : "We activate the maintenance",
  "creationDate" : 1528794671057,
  "startDate" : 1491429600000,
  "endDate" : 1492380000000,
  "type" : "normal",
  "audience" : "restricted",
  "flags" : 0
}

Delete a maintenance

A DELETE request deletes a maintenance.

Path parameters

Table 9. /hub/api/v1/maintenance/{maintenanceId}
Parameter Description

maintenanceId

The identifier of the maintenance to be deleted

Response structure

Path Type Description

id

Number

The identifier of the deleted maintenance

Example request

$ curl '{server hostname}/hub/api/v1/maintenance/5' -i -X DELETE -H 'Content-Type: application/json;charset=UTF-8'

Example response

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
Content-Type: application/json;charset=UTF-8
Content-Length: 14

{
  "id" : 5
}

Downloading SAP Analytics Hub Data

Since version 17.09

You can download the SAP Analytics Hub data through the following entry point:

  • /hub/api/v1/export

Download

A GET request exports the SAP Analytics Hub data.

Download options

Options can be defined as request parameters in order to select what part of the SAP Analytics Hub to download. By default, the structure is part of the downloaded data.

Table 10. Options
Option Description

assets

Download assets

drafts

Download drafts

users

Download users

usage

Download usage data

favorites

Download favorites

customization

Download customization data

picked

Download picked assets

images

Download images

Example request

$ curl '{server hostname}/hub/api/v1/export' -i

Download format

You can find explanation about downloaded data here: SAP Analytics Hub download format

Uploading SAP Analytics Hub Data

Since version 18.09

You can upload SAP Analytics Hub data through the following entry point:

  • /hub/api/v1/import

Upload

A POST request imports SAP Analytics Hub data.

Example request

$ curl '{server hostname}/hub/api/v1/import' -i -X POST -H 'Content-Type: multipart/form-data;charset=UTF-8' -F 'export.zip=@image;type=application/zip'

Upload format

You can find explanation about uploading data here: SAP Analytics Hub upload