Update Action examples

Modified on Wed, 12 Jun at 2:41 PM


The below examples illustrate a number of use cases to update a single Action. 



TABLE OF CONTENTS



REST API update calls to an Action must POST all fields in the body of the payload. Update calls are not DELTA changes. 

Fluid highly recommends you make a GET call, take the JSON response object, make the relevant update changes you want only on the properties required and POST back as part of the REST API UPDATE payload.


The maximum number of Actions that can be updated in a single bulk REST API call is 50.



Update single Action


cURL

curl --user username:patToken --location --request PUT 'http://organisation.fluid.work/rest/api/action/4413?fields=All&expand=All' \
--header 'Content-Type: application/json' \
--data '   {
    "fields": {
        "assignee": [
            {
                "id": 603,
                "guid": "f1cb6467-0262-4539-9148-7b869defd817",
                "name": "David Burt",
                "userName": "david.burt",
                "email": "dump18@fluidbsg.com"
            }
        ],
        "attachmentCount": 0,
        "author": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "businessValue": 0,
        "chatCount": 0,
        "createDate": "2024-02-16T18:19:46.0000000",
        "description": "Sample Update 1",
        "dueDate": null,
        "endDate": null,
        "impediment": 0,
        "isOwner": true,
        "modifiedBy": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "modifiedDate": "2024-02-16T18:19:46.0000000",
        "owners": [
            {
                "id": 603,
                "guid": "f1cb6467-0262-4539-9148-7b869defd817",
                "name": "David Burt",
                "userName": "david.burt",
                "email": "dump18@fluidbsg.com"
            }
        ],
        "priority": "Medium",
        "principalGuid": "f1cb6467-0262-4539-9148-7b869defd817",
        "ragStatus": "Green",
        "startDate": null,
        "status": "Not Started",
        "statusCode": 4,
        "taskType": "Task",
        "title": "Sample Update 1"
    },
    "id": 4413,
    "guid": "f8deb426-bfe1-4663-82f5-8c4c493c4544",
    "url": "https://organisation.fluid.work/rest/api/action/4413"
}
    }'


Sample Response

Status code: 200

JSON


{
    "fields": {
        "assignee": [
            {
                "id": 603,
                "guid": "f1cb6467-0262-4539-9148-7b869defd817",
                "name": "David Burt",
                "userName": "david.burt",
                "email": "dump18@fluidbsg.com"
            }
        ],
        "attachmentCount": 0,
        "author": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "businessValue": 0,
        "chatCount": 0,
        "createDate": "2024-02-16T18:19:46.0000000",
        "description": "Sample Update 1",
        "dueDate": null,
        "endDate": null,
        "impediment": 0,
        "isOwner": true,
        "modifiedBy": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "modifiedDate": "2024-02-16T18:19:46.0000000",
        "owners": [
            {
                "id": 603,
                "guid": "f1cb6467-0262-4539-9148-7b869defd817",
                "name": "David Burt",
                "userName": "david.burt",
                "email": "dump18@fluidbsg.com"
            }
        ],
        "priority": "Medium",
        "principalGuid": "f1cb6467-0262-4539-9148-7b869defd817",
        "ragStatus": "Green",
        "startDate": null,
        "status": "Not Started",
        "statusCode": 4,
        "taskType": "Task",
        "title": "Sample Update 1"
    },
    "id": 4413,
    "guid": "f8deb426-bfe1-4663-82f5-8c4c493c4544",
    "url": "https://organisation.fluid.work/rest/api/action/4413"
}



Update single Action and assign to multiple users as assignees


To update an Action and assign multiple assignees, as part of the payload, include in the assignee property an array of objects with properties set for username, or id, or guid, or email.

cURL

curl --user username:patToken --location --request PUT 'http://oganisation.fluid.work/rest/api/action/4413' \
--header 'Content-Type: application/json' \
--data '    {
    "fields": {
        "assignee": [
            {
                "userName": "adam.jones",
            },
            {
                "userName": "bruce.banner",
            }
        ],
        "attachmentCount": 0,
        "author": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "businessValue": 0,
        "chatCount": 0,
        "createDate": "2024-02-16T18:19:46.0000000",
        "description": "Bulk Update 1",
        "dueDate": null,
        "endDate": null,
        "impediment": 0,
        "isOwner": true,
        "modifiedBy": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "modifiedDate": "2024-02-16T18:19:46.0000000",
        "owners": [
            {
                "id": 603,
                "guid": "f1cb6467-0262-4539-9148-7b869defd817",
                "name": "David Burt",
                "userName": "david.burt",
                "email": "dump18@fluidbsg.com"
            }
        ],
        "priority": "Medium",
        "principalGuid": "f1cb6467-0262-4539-9148-7b869defd817",
        "ragStatus": "Green",
        "startDate": null,
        "status": "Not Started",
        "statusCode": 4,
        "taskType": "Task",
        "title": "BULK Update 1"
    },
    "id": 4413,
    "guid": "f8deb426-bfe1-4663-82f5-8c4c493c4544",
    "url": "https://organisation.fluid.work/rest/api/action/4413"
}'


Sample Response

Status code: 200

JSON


{
    "fields": {
        "assignee": [
            {
                "id": 595,
                "guid": "b0a1e7e6-2389-4cdc-8d7e-5263eb512e0d",
                "name": "Adam Jones",
                "userName": "adam.jones",
                "email": "dump7@fluidbsg.com"
            },
            {
                "id": 598,
                "guid": "1020642e-3e48-49aa-a693-dd8be2b7795c",
                "name": "Bruce Banner",
                "userName": "bruce.banner",
                "email": "bruce.banner@fluidbsg.com"
            }
        ],
        "attachmentCount": 0,
        "author": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "businessValue": 0,
        "chatCount": 0,
        "createDate": "2024-02-16T18:19:46.0000000",
        "description": "Bulk Update 1",
        "dueDate": null,
        "endDate": null,
        "impediment": 0,
        "isOwner": true,
        "modifiedBy": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "modifiedDate": "2024-02-16T18:19:46.0000000",
        "owners": [
            {
                "id": 603,
                "guid": "f1cb6467-0262-4539-9148-7b869defd817",
                "name": "David Burt",
                "userName": "david.burt",
                "email": "dump18@fluidbsg.com"
            }
        ],
        "priority": "Medium",
        "principalGuid": "f1cb6467-0262-4539-9148-7b869defd817",
        "ragStatus": "Green",
        "startDate": null,
        "status": "Not Started",
        "statusCode": 4,
        "taskType": "Task",
        "title": "BULK Update 1"
    },
    "id": 4413,
    "guid": "f8deb426-bfe1-4663-82f5-8c4c493c4544",
    "url": "https://organisation.fluid.work/rest/api/action/4413"
}


Update single Action with Custom Properties on a Board


To update an action with specific custom properties as defined by the board configuration where this Action is to be created, you will need to set 3 specific values for each custom property. You need the datatype of the custom property, the key (unique name of the custom property) and the value you want to set. Note all values regardless of datatype are passed as string values in the payload.


cURL

Generic
curl --user username:patToken --location --request PUT 'http://organisation.fluid.work/rest/api/action/4413?fields=all&expand=all' \
--header 'Content-Type: application/json' \
--data '    {
    "fields": {
        "assignee": [
            {
                "id": 603,
                "guid": "f1cb6467-0262-4539-9148-7b869defd817",
                "name": "David Burt",
                "userName": "david.burt",
                "email": "dump18@fluidbsg.com"
            }
        ],
        "attachmentCount": 0,
        "author": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "businessValue": 0,
        "chatCount": 0,
        "createDate": "2024-02-16T18:19:46.0000000",
        "description": "Bulk Update 1",
        "dueDate": null,
        "endDate": null,
        "impediment": 0,
        "isOwner": true,
        "modifiedBy": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "modifiedDate": "2024-02-16T18:19:46.0000000",
        "owners": [
            {
                "id": 603,
                "guid": "f1cb6467-0262-4539-9148-7b869defd817",
                "name": "David Burt",
                "userName": "david.burt",
                "email": "dump18@fluidbsg.com"
            }
        ],
        "priority": "Medium",
        "principalGuid": "f1cb6467-0262-4539-9148-7b869defd817",
        "ragStatus": "Green",
        "startDate": null,
        "status": "Not Started",
        "statusCode": 4,
        "taskType": "Task",
        "title": "BULK Update 1"
    },
        "customProperties": [
            {
                "dataType": "Text",
                "key": "custom1",
                "value": "Custom Update Sample 1"
            },
            {
                "dataType": "MultiOption",
                "key": "CustomMulti",
                "value": "mult2"
            },
            {
                "dataType": "Date",
                "key": "CustomDate",
                "value": "2023-10-17"
            }
        ]
    "id": 4413,
    "guid": "f8deb426-bfe1-4663-82f5-8c4c493c4544",
    "url": "https://organisation.fluid.work/rest/api/action/4413"
}'

Sample Response

Status code: 200

JSON

{
    "fields": {
        "assignee": [
            {
                "id": 603,
                "guid": "f1cb6467-0262-4539-9148-7b869defd817",
                "name": "David Burt",
                "userName": "david.burt",
                "email": "dump18@fluidbsg.com"
            }
        ],
        "attachmentCount": 0,
        "author": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "businessValue": 0,
        "chatCount": 0,
        "createDate": "2024-02-16T18:19:46.0000000",
        "description": "Bulk Update 1",
        "dueDate": null,
        "endDate": null,
        "impediment": 0,
        "isOwner": true,
        "modifiedBy": {
            "id": 603,
            "guid": "f1cb6467-0262-4539-9148-7b869defd817",
            "name": "David Burt",
            "userName": "david.burt",
            "email": "dump18@fluidbsg.com"
        },
        "modifiedDate": "2024-02-16T18:19:46.0000000",
        "owners": [
            {
                "id": 603,
                "guid": "f1cb6467-0262-4539-9148-7b869defd817",
                "name": "David Burt",
                "userName": "david.burt",
                "email": "dump18@fluidbsg.com"
            }
        ],
        "priority": "Medium",
        "principalGuid": "f1cb6467-0262-4539-9148-7b869defd817",
        "ragStatus": "Green",
        "startDate": null,
        "status": "Not Started",
        "statusCode": 4,
        "taskType": "Task",
        "title": "BULK Update 1"
    },
        "customProperties": [
            {
                "dataType": "Text",
                "key": "custom1",
                "value": "Custom Update Sample 1"
            },
            {
                "dataType": "MultiOption",
                "key": "CustomMulti",
                "value": "mult2"
            },
            {
                "dataType": "Date",
                "key": "CustomDate",
                "value": "2023-10-17"
            }
        ]
    "id": 4413,
    "guid": "f8deb426-bfe1-4663-82f5-8c4c493c4544",
    "url": "https://organisation.fluid.work/rest/api/action/4413"
}



JavaScript

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article