I have trouble accessing R4j via API using python. I just get bunch of 404 or unauthorized. Can someone give me some guidance or provide me a very basic python file accessing the license status?
I've tried different things; my newest idea below:
token=...
url='http://blabla.atlassian.net/rest/com.easesolutions.jira.plugins.requirements/2.0/license'
auth=HTTPBasicAuth([email], token)
headers = {"Accept": "application/json"}
response= requests.request("GET", url, headers=headers, auth=auth)
...
Hi @PZ. Welcome to the community! For the license information retrieval via the R4J REST API, I utilized Python's requests
library with JWT authentication. Here’s how the authentication was configured
import requests
jwt_token = 'your_jwt_token'
url = "https://eu.r4j-cloud.easesolutions.com/rest/api/1/license"
headers = {
"Authorization": f"JWT {jwt_token}",
"Accept": "application/json"
}
response = requests.get(url, headers=headers)
print(f"Status Code: {response.status_code}")
print("Response Body:", response.json())
I hope it helps.
Cheers,
Melo
Awesome, this works. Thanks :)
Now, POST requests like disabling a project do not work. Also, there seems to be a Rest API 2.0 which one should use, do you know how to use it?
It says that one should use the following url structure: <host>:<port>/rest/com.easesolutions.jira.plugins.requirements/2.0/resource
I assume when using a cloud product one doesn't have to specify the port(leave it empty), right?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @PZ
I'm Edmer from EaseSolutions, vendor of R4J plugin. You can disable an active R4J Project using the REST API: PUT /rest/api/1/projects/{projectId}/disable
Yes, you don't need to include the port, you only need to specify the URI Structure: "https://eu.r4j-cloud.easesolutions.com/rest/api/1/<resource-path>" as what Melo Shared.
You may find more details about R4J Cloud REST APIs from our Public document.
Best regards,
Edmer
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.