Generating Access Token

REST reports generation from Mart requires an access token in order to authenticate yourself. Once generated, you can reuse this token to generate multiple reports.

You can generate a bearer token in two ways:

To generate an access token via the access token feature, follow these steps:

  1. Log on to erwin Mart Portal and on the top pane, click .

  2. Click Access Token.
    The Access Token page opens.

  3. Click Refresh Token.
    This will generate a bearer token and display it in the Token field. You can edit the token expiry date.

  4. To copy the token, click and use it to generate REST reports.

To generate an access token via API, follow these steps:

  1. Log on to erwin Mart Portal and on the header, click .

  2. Click REST Reports.
    The Mart Reporting API page opens.

  3. In the Select a definition field, select Generate Token.


  4. Expand the report-controller section.

  5. Click Try it out.

  6. In the Request body section, enter your Mart username and password.

  7. Click Execute.
    The CURL command and access token are generated in the Responses section.

  8. Copy the access token (highlighted in the image above, content between the quotes) and use it in for report generation.
    By default, access tokens generated via API are valid for four hours (14400 seconds) by default. To extend the validity, edit the Rest API Token Lifetime property on the Advanced tab of erwin Mart Portal configuration screen.