Conduitowners.edit

API Method: owners.edit

  • Unstable Method: ApplicationEditor methods are highly unstable.
  • Login Required: This method requires authentication. You must log in before you can make calls to it.
Returns
map<string, wild>
Errors
  • ERR-CONDUIT-CORE: See error message for details.
Description

This is a standard ApplicationEditor method which allows you to create and modify objects by applying transactions. For documentation on these endpoints, see Conduit API: Using Edit Endpoints.

Transaction Types

This endpoint supports these types of transactions. See below for detailed information about each transaction type.

KeyDescription
nameName of the package.
ownersUsers and projects which own the package.
auditingAutomatically trigger audits for commits affecting files in this package.
descriptionHuman-readable description of the package.
statusArchive or enable the package.
paths.setOverwrite existing package paths with new paths.

Transaction Type: name

Name of the package.

KeyTypeDescription
typeconstname
valuestring

Transaction Type: owners

Users and projects which own the package.

KeyTypeDescription
typeconstowners
valuelist<phid>

Transaction Type: auditing

Automatically trigger audits for commits affecting files in this package.

KeyTypeDescription
typeconstauditing
valuestring

Transaction Type: description

Human-readable description of the package.

KeyTypeDescription
typeconstdescription
valuestring

Transaction Type: status

Archive or enable the package.

KeyTypeDescription
typeconststatus
valuestring

Transaction Type: paths.set

Overwrite existing package paths with new paths.

When updating the paths for a package, pass a list of dictionaries like this as the value for the transaction:

Example Paths Value
[
  {
    "repositoryPHID": "PHID-REPO-1234",
    "path": "/path/to/directory/",
    "excluded": false
  },
  {
    "repositoryPHID": "PHID-REPO-1234",
    "path": "/another/example/path/",
    "excluded": false
  }
]

This transaction will set the paths to the list you provide, overwriting any previous paths.

Generally, you will call owners.search first to get a list of current paths (which are provided in the same format), make changes, then update them by applying a transaction of this type.

KeyTypeDescription
typeconstpaths.set
valuewildList of dictionaries, each describing a path.

Call Method

Enter parameters using JSON. For instance, to enter a list, type: ["apple", "banana", "cherry"]

list<map<string, wild>>
optional id|phid|string

Examples

Use the Conduit API Tokens panel in Settings to generate or manage API tokens.
$ echo <json-parameters> | arc call-conduit --conduit-uri https://phabricator.cooltrainer.org/ --conduit-token <conduit-token> owners.edit