I'm unable to get the property keys for organisations
I assume it has something to do with permissions because all other requests work and the type of request has a remark about restrictions.
Note: Permission to manage organizations can be switched to users with the Jira administrator permission, using the Organization management feature.
I authenticate with basic authentication and a user with site admin permissions, which is also a member of the organisation for which I would like to get the property keys, a project admin and a service desk agent of the SD-project.
GET https://vlaamseoverheid.atlassian.net/rest/servicedeskapi/organization/12/property
response:
{
"keys": []
}
Hi Henk,
I tested the same API after trying to add a property key, but I receive the same response.
Also, I searched for bugs and similar cases but didn’t find anything that could help us.
Just for us to better understand, were you able to set a property with this API? Did it show any error or any other message?
I’m checking with the team responsible for that and once I have a response, I’ll post here.
Regards,
Angélica
No, I cannot set a property for one of our organisations with the same API. But I'm not sure if I'm using the right property-key ... When I try:
PUT: https://vlaamseoverheid.atlassian.net/rest/servicedeskapi/organization/12/property/name
and a key "name" with a value "name" in the header, I get a 400:
{
"errors": {},
"errorMessages": [
"De eigenschapswaarde kan niet leeg zijn."
],
"httpStatusCode": {
"present": true
}
}
I'm able to get the list of our organisations with this: https://vlaamseoverheid.atlassian.net/rest/servicedeskapi/organization
Other requests also work:
https://your-domain.atlassian.net/rest/servicedeskapi/organization/{organizationId}/user'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Henk Smets
I'm a developer on the JSD ecosystem team.
The organization entity property API takes a JSON body and stores this as the property value.
Can you try the following call?
curl -u username:token -X PUT -H "Content-Type: application/json" -d '{"key": "value"}' https://vlaamseoverheid.atlassian.net/rest/servicedeskapi/organization/12/property/name
When you GET all properties you should see in the `keys` field a property called "name" and if you GET the value of "name" (GET https://vlaamseoverheid.atlassian.net/rest/servicedeskapi/organization/12/property/name)
it will return a JSON object of {"key": "value"}.
Let me know if that works,
Andrea
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrea. I'm not able to get this to work for my organization. Maybe my curl is different on Windows 10?
curl -u username:token -X PUT -H "Content-Type: application/json" -d '{"key":"value"}' https://avontus.atlassian.net/rest/servicedeskapi/organization/12/property/name
{"errors":{},"errorMessages":["The JSON data provided for the property is not a valid JSON: '{key:value}'."],"httpStatusCode":{"present":true}}
Thanks for your help,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Brian Webb
You're right, I think the escaping works differently on Windows machines (i'm using a Mac). The error message seems to say that the double quote values aren't being passed so you might need to escape them first.
Can you try this?
curl -u username:token -X PUT -H "Content-Type: application/json" -d "{\"key\":\"value\"}" https://avontus.atlassian.net/rest/servicedeskapi/organization/12/property/name
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
YAY! Thank you soooo much Andrea. I totally forgot about escaping that. Phew!
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.