ListWorkitemActivities - Get work item activities

Updated at:

Queries the activity log of a specified work item, including creation, updates, state transitions, association changes, and attachment changes.

Applicable editions

Central edition, Region edition

Endpoint and authorization information

  • Get the endpoint: Replace {domain} in the API request syntax.

  • Get a personal access token.

  • Get organizationId: Required for Central edition only. Go to the Basic Information page in the Organization Management console to obtain your organization ID.

Product

Resource

Required permission

Project Collaboration

Work item

Read-only

Request syntax

Central edition

GET https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitems/{id}/activities

Region edition

GET https://{domain}/oapi/v1/projex/workitems/{id}/activities

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

Personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example value

id

string

path

Yes

Unique identifier of the work item.

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

Organization ID.

Request examples

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/organizations/{organizationId}/workitems/{id}/activities' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/projex/workitems/{id}/activities' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

array

-

object

actionType

string

Action type. Valid values: created, updated, delete, associate, and unassociate.

eventId

integer

Event ID.

eventTime

string

Time when the event occurred.

eventType

string

Event type. Valid values: workitem.created, workitem.updated, workitem.transitioned, workitem.association.changed, and workitem.attachment.changed.

newValue

array

New value after the update. Can be empty.

-

object

displayValue

string

Display name.

identifier

string

Unique identifier of the value.

oldValue

array

Value before the update. Can be empty.

-

object

displayValue

string

Display name.

identifier

string

Unique identifier of the value.

operator

object

id

string

User ID.

674d96abd497cd558d68****

name

string

Name.

name-xxx

parentEventId

integer

Parent event ID.

property

object

propertyId

string

Property ID.

propertyName

string

Property name.

propertyType

string

Property type. Valid values: Field, Relation, or null.

relatedResource

object

resourceId

string

Resource ID. If the resource is a work item, this is the work item ID.

resourceType

string

Resource type. If the resource is a work item, the value is Workitem.

resourceId

string

ID of the resource where the event occurred. If the resource is a work item, this is the work item ID.

Response example

[
    {
        "actionType": "",
        "eventId": 0,
        "eventTime": "",
        "eventType": "",
        "newValue": [
            {
                "displayValue": "",
                "identifier": ""
            }
        ],
        "oldValue": [
            {
                "displayValue": "",
                "identifier": ""
            }
        ],
        "operator": {
            "id": "674d96abd497cd558d68****",
            "name": "name-xxx"
        },
        "parentEventId": 0,
        "property": {
            "propertyId": "",
            "propertyName": "",
            "propertyType": ""
        },
        "relatedResource": {
            "resourceId": "",
            "resourceType": ""
        },
        "resourceId": ""
    }
]

Error codes

For API error codes, see Error Code Center.