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.
In the response of this api are you seeing the values updated?
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.
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.