You can get and set plugin values (Custom Fields plugin or another such as Project Backlog or Kanban) on cases if you know their super-secret (long) name. You can get values if you only know part of the name, which will also then tell you the long name.

Example:

I have a custom field called “adada“. I issue an API request:

POST https://kakapo.manuscript.com/f/api/0/jsonapi

{
	"cmd": "search",
	"q": 144,
	"cols": ["sTitle", "sCategory", "adada"],
	"token": "y0urs3cret4p1t0k3n"
}

I get back some JSON:

{
    "data": {
        "count": 1,
        "totalHits": 1,
        "cases": [
            {
                "ixBug": 144,
                "operations": [
                    "edit",
                    "assign",
                    "resolve",
                    "email"
                ],
                "sTitle": "Godkänna CleanCash",
                "sCategory": "Inquiry",
                "adada": 123123,
                "plugin_customfields_at_fogcreek_com_adadai67": 123123
            }
        ]
    },

    […redacted for space…]
}

It includes the name of the key I specified and its long name. Note that there may be duplicates of the short name, so it’s better to use the long name. Setting a a value requires using the long name (it’s too dangerous to guess):

POST https://kakapo.manuscript.com/f/api/0/jsonapi

{
	"cmd": "edit",
	"ixBug": 144,
	"sTitle": "hello",
	"plugin_customfields_at_fogcreek_com_adadai67": 45,
	"token": "y0urs3cret4p1t0k3n"
}

Important:

  • If you want to get all the custom fields you have setup, use "cols": "plugin_customfields".
  • When querying a custom field via the JSON API, you’ll need to substitute an ‘x’ for each space or special character (such as ‘?’) in the custom field name. For example, “My Field 1” should be “MyxFieldx1” when used with cols.
  • The name of the custom field used with cols always matches the first name of the custom field. If you change the name of the custom field, although all areas of Manuscript will display the new name, the JSON API will still expect the original name when used with cols.

Known Issues:

Note that you cannot set Date or Date and Time type field via the JSON API. Searching on Date or Date and Time custom fields via the JSON API is not currently supported.