I’m encountering a 403 Forbidden error when attempting to access the /rest/assetapi/objectschema endpoint of the Assets API on our Jira Service Management instance. This prevents me from retrieving the list of object schemas via a Python script or manual requests.
Details of the Issue:
403 Client Error: Forbidden
Welcome to the community.
What is the API you trying to make.
This is not and API endpoint: /rest/assetapi/objectschema
The endpoint to retrieve object schemas is: https://api.atlassian.comjsm/assets/workspace/<workspace_id>/v1/objectschema/list
See Assets Cloud API, https://developer.atlassian.com/cloud/assets/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please accept my answer as a solution, if my answer helped to solve your request.
This will help other community member trying to solve the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome @Gestionnaire doublons
This could be due to lack of permissions for your object schema. The whole guide could be found here: https://confluence.atlassian.com/servicemanagementserver0503/configuring-roles-and-permissions-1167849898.html
You need to be a Jira admin to be able to assign users or groups to a specific role in Assets.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your response and for pointing me to the guide on configuring roles and permissions in Jira Service Management: Configuring Roles and Permissions. I’ve reviewed the documentation, and it seems that the 403 Forbidden error I’m encountering is indeed due to a lack of permissions for the object schemas in Assets.
As confirmed earlier, my authentication is working correctly—I can successfully access the /rest/api/3/myself endpoint and retrieve my user details (your@email.com). However, when attempting to access /rest/assetapi/objectschema to list the object schemas, I still receive a 403 Forbidden error. This suggests that my account does not have the necessary roles assigned in Assets, such as Object Schema Managers or Users, which are required to interact with these endpoints.
The guide indicates that assigning users or groups to specific roles in Assets requires Jira admin privileges, which I don’t currently have. Could you please assist with the following:
Here’s the PowerShell script I’m using for reference:
$jiraUrl = "https://idcam.atlassian.net"
$email = "your@email.com"
$apiToken = "your_api_token"
$auth = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("${email}:${apiToken}"))
$headers = @{
"Authorization" = "Basic $auth"
"Accept" = "application/json"
}
try {
$response = Invoke-RestMethod -Uri "$jiraUrl/rest/assetapi/objectschema" -Headers $headers -Method Get
Write-Output $response
} catch {
Write-Output "Error: $($_.Exception.Response.StatusCode.Value__) - $($_.Exception.Message)"
}
I’d appreciate your help in resolving this, as I need access to the Assets data for [briefly state your purpose, e.g., "inventory management" or "script automation"]. If this requires further escalation or clarification, please let me know what additional details I can provide.
Looking forward to your assistance!
Best regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See my reply, you are using the wrong API endpoint.
This is the objectschema API endpoint for assets obecjeschemas in Cloud.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.