Site Options

Authenticating to make calls to one of the platform REST APIs

Introductory guidance on calling and retrieving REST APIs

 

Read this article to understand how to:

  • Connect your Content Catalyst platform with other business-critical systems
  • Improve the end-user experience and organisational processes with seamless integrations with 3rd party tools

 

To use an API, first use the /Authenticate operation to retrieve an authentication token. You should provide the username and password for a user registered on the site. All operations of the API will be limited by the access rights of the user.

Steps to authenticate:

 

  1. Send request to https:///api/v1/authenticate?username=&password=
  2. Retrieve string from the response body
  3. Base64 encode the string and username in this format: 'username:string'
  4. Make the call to required API, including a header containing "Authorization: Basic "

Python Requests example - authentication

import requests

import base64

 

api_key = requests.get('http:///api/v1/authenticate?username=&password=', headers={'Accept': 'application/json'})
api_key = api_key.json()
api_key = api_key.encode('utf-8')
api_key = base64.b64encode('%s:%s' % (, api_key))


Python Requests example - resulting request

response = requests.get('http:///api/v1//', headers={'Accept': 'application/json', 'Authorization': 'Basic cGlhZG1pbjAxOjd4bslNWM1hLTk1M2EtND£HnQ1Zi05NThkLWYwOTU1NTGRkOQ=='})

🔔 You can find further examples and information in the HTTP API and Integration Documentation. Select the HTTP APIs section and read the section on Authentication.

 

2018-06-20 14_06_13-HTTP APIs — ireports ireports documentation

 

🔔 For testing purposes, you can base64 encode strings online using:

https://www.base64encode.org/