1 @title Conduit API: Using Edit Endpoints
4 Describes how to use edit endpoints to create and update objects.
9 Many applications provide `edit` endpoints, which are the primary way to
10 create and update objects (like tasks) using the API.
12 To create or edit an object, you'll build a list of //transactions// and pass
13 them to the endpoint. Each transaction applies a change to a field or property
16 For example, a transaction might change the title of an object or add
19 When creating an object, transactions will be applied to an empty object. When
20 editing an object, transactions will be applied to an existing object.
22 The best reference for a particular `edit` endpoint is the Conduit API console.
23 For example, you can find the console page for `maniphest.edit` by navigating
24 to {nav Conduit > maniphest.edit} in the web UI. This page contains detailed
25 information about the endpoint and how it can be used.
30 To create objects, pass a list of transactions but leave `objectIdentfier`
31 blank. This tells the endpoint that you want to create a new, empty object and
32 then apply the transactions to it.
38 To edit objects, pass a list of transactions and use `objectIdentifier` to
39 specify which object to apply them to. You can normally pass an ID or PHID,
40 and many applications also allow you to pass a monogram (for example, you can
41 edit a task by passing `T123`).
47 When creating or editing objects, you'll build a list of transactions to
48 apply. This transaction list will look something like this:
50 ```lang=json, name="Example Transaction List"
54 "value": "Assemble in the barnyard"
57 "type": "description",
58 "value": "All animals should assemble in the barnyard promptly."
61 "type": "subscribers.add",
62 "value": ["dog", "cat", "mouse"]
67 Applied to an empty object (say, a task), these transactions would create a new
68 task with the specified title, description and subscribers.
70 Applied to an existing object, they would retitle the task, change its
71 description, and add new subscribers.
73 The particular transactions available on each object are documented on the
74 Conduit API console page for that object.
80 WARNING: The structure of the return value from these methods is likely to
81 change as ApplicationEditor evolves.
83 Return values look something like this for now:
85 ```lang=json, name=Example Return Value
88 "phid": "PHID-XXXX-1111"
92 "phid": "PHID-YYYY-1111",
95 "phid": "PHID-YYYY-2222",
101 The `object` key contains information about the object which was created or
104 The `transactions` key contains information about the transactions which were
105 actually applied. For many reasons, the transactions which actually apply may
106 be greater or fewer in number than the transactions you provided, or may differ
107 in their nature in other ways.
115 - returning to the @{article:Conduit API Overview}.