I keep getting a 400 error when trying to retrieve asset data from the Atlassian JSM Assets API. The error message says “activationId is not provided” but I don’t understand what this parameter is or where to include it.
Here’s my current implementation:
import requests
import json
object_id = "<my_valid_asset_id>"
api_endpoint = f"https://api.atlassian.com/jsm/assets/workspace/{{workspace_id}}/v1/object/{object_id}"
request_headers = {
"Accept": "application/json",
"Authorization": f"Basic {auth_token}"
}
api_response = requests.get(api_endpoint, headers=request_headers)
print(json.dumps(api_response.json(), indent=2))
The response I get back is:
{"code": 400, "message": "activationId is not provided"}
I’m using an API token that I created in my Atlassian account security settings. Does anyone know what this activationId refers to and how I should provide it in my request?
The activationId is your specific Assets schema instance in JSM. Go to your JSM project settings > Assets configuration - you’ll see the ID in the URL or schema details. I hit this exact problem last month during our asset migration. Basically, the activation ID tells the system which Assets workspace schema you want since you can have multiple setups. You need to add this parameter to your endpoint path. Quick heads up - workspace_id and activation_id are usually different, so double-check you’re pulling the right ones from your Assets admin panel.
hey, looks like u need to include the activationId in your API URL. it should be like: /workspace/{workspace_id}/v1/activation/{activation_id}/object/{object_id}. check ur assets settings; it’s usually found there.
I encountered a similar issue with the JSM Assets API recently. The activationId refers to your specific instance within the Assets schema. To locate it, navigate to your JSM project settings, select Assets, and check the URL in your browser for the string after ‘/activation/’. Replace the placeholder in your API call accordingly. Your endpoint should look like: https://api.atlassian.com/jsm/assets/workspace/{workspace_id}/v1/activation/{activation_id}/object/{object_id}. Lastly, ensure that your API token has the required permissions to access the Assets API.
This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.