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.
on: https://developer.atlassian.com/cloud/jira/service-desk/rest/?_ga=2.17854969.1935148421.1568713427-335750297.1568189270#api-rest-servicedeskapi-organization-organizationId-property-get
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'
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
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
It looks like you're new here. Sign in or register to get started.