Data Source - Change Auth Token

This endpoint allows you to change the authentication token, either a Bearer Token or a Custom Auth Header Token for a given data source.

The general format of the API endpoints is:

{YOURBASEURL}/api/custom/DataSource/ChangeAuthToken/{DATASOURCEID}

Variable Parameters

Base URL

Depending on your data residency settings, you may need to look up {YOURBASEURL} to create the endpoint URL. You’ll find the BaseURL in the Settings tab above the API secret.

Data Source ID

To update an existing data source via API, you need the {DATASOURCEID}of the target data source that is to be replaced by the new file. You will find this ID at the very top of the Data Source Configuration screen (Data Source tab).

Screenshot 2025-04-01 at 15.04.42.png


Limitations

  • a maximum of 1 request per minute

  • a maximum of 100 requests per 24 hours

  • will not invalidate already cached versions. This can be worked around by decreasing the cache minutes value.

 

Example cURL request

  curl  -X POST \
  'https://external-data-for-jira.codefortynine.com/api/custom/DataSource/ChangeAuthToken/{DATASOURCEID}' \
  --header 'Content-Type: application/json' \
  -u 'username:password' \
  --data-raw '{"Token": "NEWTOKEN"}'


Example Postman

URL

Method POST with generated URL:

Screenshot 2025-04-01 at 14.53.38.png

Authorization

Basic Auth with username & password:

Screenshot 2025-04-01 at 14.54.00.png

Body

A JSON Object in the Format (RAW):

{ "Token" : "NEWTOKEN"}
Screenshot 2025-04-01 at 14.58.37.png

This documentation outlines how to update your data source’s authentication token. Replace the placeholders with your actual values, and ensure your settings comply with the limitations provided.