Home Affected User

API CreateProjectionByCriteria

Lesiba_MalebanaLesiba_Malebana Customer IT Monkey ✭

How do i populate the Affected User field from the API

Best Answers

Answers

  • Shane_WhiteShane_White Cireson Support Super IT Monkey ✭✭✭✭✭

    Hi @Lesiba_Malebana ,

    Thanks for posting this to the community, here is an example using the Bulk Edit API! You can also use the Commit API! Just change the workitem Id to the workitem you want to edit and the edited value is the user Id you want to set the affected user as.

    $.ajax({

            url: '/api/V3/WorkItem/BulkEditWorkItems',

            type: 'POST',

        contentType: 'application/json',

        data:JSON.stringify(

        {

        ProjectionId:"285cb0a2-f276-bccb-563e-bb721df7cdec",

        UpdateServiceManagement:true,

        ItemIds:["8130a4ad-eb38-eca9-531f-01690eb58e17"],

        EditedFields:

            [

        {PropertyName:"RequestedWorkItem",

            PropertyType:"singleCardinalityObject",

            PropertyRelationshipId:"dff9be66-38b0-b6d6-6144-a412a3ebd4ce",

            EditedValue: session.user.Id}

            ]

        }),

            dataType: 'json'

    });

    Let me know if this helps!

    Thanks,

    Shane

  • Lesiba_MalebanaLesiba_Malebana Customer IT Monkey ✭

    Hi Shane,

    Apologies for a super delayed response, is it possible that the example you provided can be simplified into plain request like how we test in Postman? or with examples provided on the Cireson API Documentation.


    Kind Regards

  • Lesiba_MalebanaLesiba_Malebana Customer IT Monkey ✭

    Hi Shane,

    Thank you very much i managed to get it to work. however can you show me how to perform the same thing with Commit API, since i need to issue 3 calls for logging calls.

Sign In or Register to comment.