You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I can't seem to find details for the User provisioning API's patch user. They give the following format:
{ "schemas": [ "<string>" ], "operations": [ { "op": "<string>", "path": "<string>", "value": { "array": true, "null": true, "valueNode": true, "containerNode": true, "missingNode": true, "object": true, "nodeType": "ARRAY", "pojo": true, "number": true, "integralNumber": true, "floatingPointNumber": true, "short": true, "int": true, "long": true, "double": true, "bigDecimal": true, "bigInteger": true, "textual": true, "boolean": true, "binary": true, "float": true } } ] }
Schemas: I think might be one (or all) of these
"urn:scim:schemas:extension:atlassian-external:1.0", "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
Operations.op: I have no idea what it is and there's no reference to a resource describing them.
Operations.path: Once again, I don't know the format. Maybe something like "name.familyName"?
Operations.value: If path points to the property, then I assume this is just the value for the property.
If I could get a real example or a resource that points out the missing information, that would help a ton.
I managed to figure this out. For future reference,
schemas should be "urn:ietf:params:scim:api:messages:2.0:PatchOp".
op valid values are: add, remove, replace.
path is the property path. Ex: name.familyName
value is the string or json to add or replace. You'd use JSON for something like the name property and string for something like name.familyName.
Hi @Scott ,
I was looking for a working solution for the PATCH API. My API request is :
curl --request PATCH \
--url 'https://api.atlassian.com/scim/directory/{directoryId}/Users/{userId}' \
--header 'Authorization: Bearer <token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"schemas":[
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"operations": [
{
"op": "replace",
"path": "title",
"value": "Developer"
}
]
}'
I have created the user using POST API yesterday and trying to use PATCH to update it. However, I am not seeing any changes.
Is there a mistake in my API call or do I need to wait for some time before the PATCH operation gives me the changes?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Seems correct. There is a small delay between the update in user provisioning and things updating in Jira. But, it's not much. I think a couple minutes at most, that I've noticed. I'm not using the title field, so it could be something related to that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was updating using the user provisioning api and also using the fetch api of provisioning to fetch the particular user. I just took an example of the title field, I tried using userName, name.givenName, name.familyName also but none of the changes were reflected.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, the response from the call, I don't do anything with it. So, I don't know about that. As far as does it make a change in Jira, I checked my logs and have a last name change that happened on the 21st that shows updated in Jira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I understood why I was not seeing any changes. I was trying to perform the PATCH operation on users having emails outside the domain. The PATCH operation is working fine for the users within the domain.
Thanks for your help!
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.