Track Hour Records with the Adobe Workfront API

If your organization uses Adobe Workfront to enter hours worked, but uses another tool as the system of record for that data, you can use the Workfront API to synchronize data between the two systems.

Simply tracking the hour record is not feasible because, if the hour entry is removed, the entire record is deleted, requiring you to pull the entire dataset and compare it to the old dataset. Fortunately, all hour transactions are recorded in Workfront Journal Entries.

After retrieving an initial set of all the current hours in the system, you can track any and all changes through the Journal Entries.

GET /attask/api/v5.0/JRNLE/search?subObjCode=HOUR&fields=changeType,aux2,newNumberVal,oldNumberVal,subObjCode,subObjID
{
"data": [
{
"ID": "5785406d008d93dd35665f14d90d4929",
"objCode": "JRNLE",
"changeType": "A",
"aux2": "Brad Littler",
"newNumberVal": 1,
"oldNumberVal": null,
"subObjCode": "HOUR",
"subObjID": "5785406d008d93dce3f7f2e0e8eda4ea"
},
{
"ID": "57854124008da2b9f372c01f8b9054bf",
"objCode": "JRNLE",
"changeType": "D",
"aux2": "Brad Littler",
"newNumberVal": null,
"oldNumberVal": 1,
"subObjCode": "HOUR",
"subObjID": "5785406d008d93dce3f7f2e0e8eda4ea"
},
{
"ID": "5785416f008db05ecee934663a968366",
"objCode": "JRNLE",
"changeType": "A",
"aux2": "Brad Littler",
"newNumberVal": 1,
"oldNumberVal": null,
"subObjCode": "HOUR",
"subObjID": "5785416f008db05d9d2925c12b10f521"
},
{
"ID": "57854176008db22fe974b7c67feea6b2",
"objCode": "JRNLE",
"changeType": "E",
"aux2": "Brad Littler",
"newNumberVal": 2,
"oldNumberVal": 1,
"subObjCode": "HOUR",
"subObjID": "5785416f008db05d9d2925c12b10f521"
}
]
}
  • changeType: The type of change being made to the object:

    • A: Add

    • E: Edit

    • D: Delete

  • aux2: The name of the user the hour record is for.

  • newNumberVal: New value of the hour record (This will be null if the changeType is D).

  • oldNumberVal: Previous value of the hour record.

  • subObjCode: Type of record being modified (Should always be HOUR).

  • subObjID: ID of the Hour record.

You can use this information to discover what hour records have been changed, edited, or deleted. You can then use the subObjID to retrieve more information from the hour records if necessary.

recommendation-more-help
5f00cc6b-2202-40d6-bcd0-3ee0c2316b43