Loading...
NAV Navbar
Shell HTTP JavaScript Node.JS Python Ruby Java

AppWise API Reference

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

The Content Event Publishing API is a platform-as-a-service that enables you to publish real-time events that happen in your application to AppDirect. AppDirect consumes these events and exposes them to users who connect their data to AppDirect through features such as enterprise search, team messaging, and activity logs.

Use the following URL format to send API calls:

https://{marketplaceURL}/api/{endpoint}

For example:

https://marketplace.appdirect.com/api/integration/v1/content/accounts

Generated on Wed May 27 2020 14:44:02 GMT+0000 (Coordinated Universal Time)

Content Events

Ingest content events

Example request

curl -X POST https://{marketplaceURL}/api/integration/v1/content/events \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v1/content/events HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/content/events',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "type": "object",
  "title": "Event",
  "required": [
    "key"
  ],
  "properties": {
    "action": {
      "allOf": [
        {
          "type": "object",
          "title": "Action",
          "required": [
            "text",
            "verb"
          ],
          "properties": {
            "delete": {
              "description": "If true, the resource will be deleted",
              "type": "boolean"
            },
            "text": {
              "description": "Description of the action to apply as a suffix",
              "type": "string",
              "example": "task #55 to Alice Beal"
            },
            "verb": {
              "description": "Verb of the action",
              "type": "string",
              "example": "assigned"
            }
          }
        },
        {
          "description": "Description of changes in the event"
        }
      ]
    },
    "actor": {
      "allOf": [
        {
          "type": "object",
          "title": "User",
          "required": [
            "identifier"
          ],
          "properties": {
            "delete": {
              "description": "If true, the user's access to the resource will be revoked (only applies to \"users\" array)",
              "type": "boolean"
            },
            "identifier": {
              "description": "Identifier of the user in the application",
              "type": "string",
              "example": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4"
            },
            "name": {
              "description": "Full name of the user in the application",
              "type": "string",
              "example": "Bob Roberts"
            }
          }
        },
        {
          "description": "User who made the change"
        }
      ]
    },
    "changes": {
      "allOf": [
        {
          "type": "object",
          "title": "Changes",
          "properties": {
            "fields": {
              "description": "Field changes",
              "type": "array",
              "items": {
                "type": "object",
                "title": "Field",
                "required": [
                  "name",
                  "value"
                ],
                "properties": {
                  "display": {
                    "description": "Controls how the field is displayed",
                    "type": "string",
                    "enum": [],
                    "example": "expanded"
                  },
                  "label": {
                    "description": "Display label of the field",
                    "type": "string",
                    "example": "Project Status"
                  },
                  "name": {
                    "description": "Unique name of the field",
                    "type": "string",
                    "example": "projectStatus"
                  },
                  "op": {
                    "description": "Controls how the field will be merged with an existing field of the same name",
                    "type": "string",
                    "enum": [],
                    "example": "replace"
                  },
                  "value": {
                    "description": "Value of the field",
                    "type": "number",
                    "example": "In progress"
                  }
                }
              }
            },
            "users": {
              "description": "User access changes",
              "type": "array",
              "items": {
                "type": "object",
                "title": "User",
                "required": [
                  "identifier"
                ],
                "properties": {
                  "delete": {
                    "description": "If true, the user's access to the resource will be revoked (only applies to \"users\" array)",
                    "type": "boolean"
                  },
                  "identifier": {
                    "description": "Identifier of the user in the application",
                    "type": "string",
                    "example": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4"
                  },
                  "name": {
                    "description": "Full name of the user in the application",
                    "type": "string",
                    "example": "Bob Roberts"
                  }
                }
              }
            }
          }
        },
        {
          "description": "List of field and user access changes to apply to the resource"
        }
      ]
    },
    "contents": {
      "description": "Content items associated with the resource",
      "type": "array",
      "items": {
        "type": "object",
        "title": "Content",
        "required": [
          "url"
        ],
        "properties": {
          "delete": {
            "description": "If true, the content will be removed from the resource",
            "type": "boolean"
          },
          "title": {
            "description": "Title of the content",
            "type": "string",
            "example": "Order request"
          },
          "url": {
            "description": "URL of the content",
            "type": "string",
            "example": "https://myapp.com/orders/1234"
          }
        }
      }
    },
    "key": {
      "allOf": [
        {
          "type": "object",
          "title": "Key",
          "required": [
            "instance",
            "resourceId",
            "source"
          ],
          "properties": {
            "instance": {
              "description": "Tenant account identifier within the application",
              "type": "string",
              "example": "myclient.myapp.com"
            },
            "resourceId": {
              "description": "Unique ID of the resource in the instance",
              "type": "string",
              "example": "order-12345"
            },
            "source": {
              "description": "Application UUID",
              "type": "string",
              "example": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
            },
            "timestamp": {
              "description": "UTC timestamp of when the event occurred in epoch format, with millisecond precision",
              "type": "integer",
              "format": "int64",
              "example": 1500558736123
            }
          }
        },
        {
          "description": "Event key"
        }
      ]
    },
    "messages": {
      "description": "Messages to send about the event",
      "type": "array",
      "items": {
        "type": "object",
        "title": "Message",
        "required": [
          "recipient",
          "text"
        ],
        "properties": {
          "recipient": {
            "allOf": [
              {
                "type": "object",
                "title": "User",
                "required": [
                  "identifier"
                ],
                "properties": {
                  "delete": {
                    "description": "If true, the user's access to the resource will be revoked (only applies to \"users\" array)",
                    "type": "boolean"
                  },
                  "identifier": {
                    "description": "Identifier of the user in the application",
                    "type": "string",
                    "example": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4"
                  },
                  "name": {
                    "description": "Full name of the user in the application",
                    "type": "string",
                    "example": "Bob Roberts"
                  }
                }
              },
              {
                "description": "Recipient user"
              }
            ]
          },
          "text": {
            "description": "Description of the action to apply as a suffix",
            "type": "string",
            "example": "you task #55"
          }
        }
      }
    },
    "userAction": {
      "allOf": [
        {
          "type": "object",
          "title": "UserAction",
          "properties": {
            "buttons": {
              "description": "List of action buttons",
              "type": "array",
              "items": {
                "type": "object",
                "title": "ActionButton",
                "required": [
                  "displayStyle",
                  "label",
                  "url"
                ],
                "properties": {
                  "action": {
                    "description": "Type of action to execute when the action button is pressed",
                    "type": "string",
                    "enum": [],
                    "example": "event"
                  },
                  "content": {
                    "allOf": []
                  },
                  "displayStyle": {
                    "description": "Display style of the action button",
                    "type": "string",
                    "enum": [],
                    "example": "positive"
                  },
                  "failureMessage": {
                    "description": "Message to display if the action fails",
                    "type": "string",
                    "example": "An error occurred. Please make sure you are authorized to complete the action."
                  },
                  "label": {
                    "description": "Label of the action button",
                    "type": "string",
                    "example": "Approve"
                  },
                  "successMessage": {
                    "description": "Message to display if the action succeeds",
                    "type": "string",
                    "example": "You have approved the ticket."
                  },
                  "url": {
                    "description": "The URL to navigate to when the action button is pressed",
                    "type": "string",
                    "example": "https://myapp.com/approveOrder/1234"
                  }
                }
              }
            },
            "delete": {
              "description": "If true, the user action will be removed from the resource",
              "type": "boolean"
            },
            "description": {
              "description": "Description displayed to provide context on the user action",
              "type": "string",
              "example": "This ticket needs approval."
            },
            "failureMessage": {
              "description": "Message to display if the action fails",
              "type": "string",
              "example": "An error occurred. Please make sure you are authorized to complete the action."
            },
            "successMessage": {
              "description": "Message to display if the action succeeds",
              "type": "string",
              "example": "You have approved the ticket."
            }
          }
        },
        {
          "description": "User action associated with the resource"
        }
      ]
    }
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/content/events',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v1/content/events', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v1/content/events',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/content/events");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST/integration/v1/content/events

Ingests a content event that contains changes to a referenced resource.

Body Parameters

Structure that contains the full context of a change to a resource: resource key, change description, changes to fields, user access, content and action buttons.

Event object:

Property Type Description
action Action

Description of changes in the event

actor User

User who made the change

changes Changes

List of field and user access changes to apply to the resource

contents array of Content

Content items associated with the resource

key Key

Event key

messages array of Message

Messages to send about the event

userAction UserAction

User action associated with the resource

Responses

Status Meaning Description Definition
200 OK Success
400 Bad Request Input is invalid or malformed Error
401 Unauthorized Unauthorized to publish this event Error
500 Internal Server Error An internal error occurred during event processing Error

User Accounts

Disconnect user accounts

Example request

curl -X DELETE https://{marketplaceURL}/api/integration/v1/content/accounts?appId=type,string&accountName=type,string \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

DELETE https://{marketplaceURL}/api/integration/v1/content/accounts?appId=type,string&accountName=type,string HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/content/accounts',
  method: 'delete',
  data: '?appId=type,string&accountName=type,string',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');

const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/content/accounts?appId=type,string&accountName=type,string',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.delete('https://{marketplaceURL}/api/integration/v1/content/accounts', params={
  'appId': {
  "type": "string"
},  'accountName': {
  "type": "string"
}
}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.delete 'https://{marketplaceURL}/api/integration/v1/content/accounts',
  params: {
  'appId' => 'string',
'accountName' => 'string'
}, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/content/accounts?appId=type,string&accountName=type,string");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

DELETE/integration/v1/content/accounts

Disconnects an existing user account from AppDirect.

Parameters

Parameter Type Data Type Default Description
*accountName query string The user account name to disconnect
*appId query string Application UUID
callbackUrl query string Callback URL to which to publish status updates about the disconnection

Responses

Status Meaning Description Definition
200 OK Success UserAccountDisonnectionResponse
400 Bad Request Input is invalid or malformed UserConnectionError
401 Unauthorized Request cannot be authenticated UserConnectionError
403 Forbidden Request is authenticated but does not have permission to access the resource(s) UserConnectionError
502 Bad Gateway Internal services are unavailable UserConnectionError

Create user connections

Example request

curl -X POST https://{marketplaceURL}/api/integration/v1/content/accounts \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \

POST https://{marketplaceURL}/api/integration/v1/content/accounts HTTP/1.1
Host: appdirect.com
Content-Type: application/json
Accept: application/json

var headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
$.ajax({
  url: 'https://{marketplaceURL}/api/integration/v1/content/accounts',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const request = require('node-fetch');
const inputBody = '{
  "type": "object",
  "title": "UserConnection",
  "required": [
    "app",
    "user"
  ],
  "properties": {
    "app": {
      "allOf": [
        {
          "type": "object",
          "title": "ApplicationToConnect",
          "required": [
            "id"
          ],
          "properties": {
            "id": {
              "description": "Application UUID",
              "type": "string",
              "example": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
            },
            "subFilterFields": {
              "description": "Sub-filter fields",
              "type": "array",
              "items": {
                "type": "object",
                "title": "SubFilterField",
                "required": [
                  "name"
                ],
                "properties": {
                  "label": {
                    "description": "Filterable field label",
                    "type": "string",
                    "example": "Project"
                  },
                  "name": {
                    "description": "Filterable field name",
                    "type": "string",
                    "example": "project"
                  }
                }
              }
            }
          }
        },
        {
          "description": "Application to provision"
        }
      ]
    },
    "user": {
      "allOf": [
        {
          "type": "object",
          "title": "UserToConnect",
          "required": [
            "companyId",
            "handle",
            "userId"
          ],
          "properties": {
            "companyId": {
              "description": "The user's company UUID",
              "type": "string",
              "example": "2cc88871-e942-4910-96e3-0521d7ae52f4"
            },
            "handle": {
              "description": "The user's handle in the application",
              "type": "string",
              "example": "bob"
            },
            "userId": {
              "description": "The user's UUID",
              "type": "string",
              "example": "a13a9998-e025-4751-8fee-72afdc0fe6d5"
            }
          }
        },
        {
          "description": "User to provision (connect to AppDirect)"
        }
      ]
    }
  }
}';
const headers = {
    'Content-Type':'application/json',
    'Accept':'application/json'
};
fetch('https://{marketplaceURL}/api/integration/v1/content/accounts',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://{marketplaceURL}/api/integration/v1/content/accounts', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post 'https://{marketplaceURL}/api/integration/v1/content/accounts',
  params: {
  }, headers: headers

p JSON.parse(result)

URL obj = new URL("https://{marketplaceURL}/api/integration/v1/content/accounts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

POST/integration/v1/content/accounts

Creates a new user connection in AppDirect with the provided user information.

Body Parameters

A connection request that contains information about the user and application. This information is used to set up the application record in AppDirect (if it has not been set up already) and connect the user's account to it.

UserConnection object:

Property Type Description
app ApplicationToConnect

Application to provision

user UserToConnect

User to provision (connect to AppDirect)

Responses

Status Meaning Description Definition
201 Created Success UserConnectionResponse
400 Bad Request Input is invalid or malformed UserConnectionError
401 Unauthorized Request cannot be authenticated UserConnectionError
403 Forbidden Request is authenticated but does not have permission to access the resource(s) UserConnectionError
404 Not Found The specified application and/or user were not found UserConnectionError
409 Conflict Inputs are valid, but this user and handle are already connected to the service UserConnectionError
502 Bad Gateway Internal services are unavailable UserConnectionError

Definitions

Action

{
  "type": "object",
  "title": "Action",
  "required": [
    "text",
    "verb"
  ],
  "properties": {
    "delete": {
      "description": "If true, the resource will be deleted",
      "type": "boolean"
    },
    "text": {
      "description": "Description of the action to apply as a suffix",
      "type": "string",
      "example": "task #55 to Alice Beal"
    },
    "verb": {
      "description": "Verb of the action",
      "type": "string",
      "example": "assigned"
    }
  }
}
Name Type Description
delete boolean If true, the resource will be deleted
text string Description of the action to apply as a suffix
verb string Verb of the action

ActionButton

{
  "type": "object",
  "title": "ActionButton",
  "required": [
    "displayStyle",
    "label",
    "url"
  ],
  "properties": {
    "action": {
      "description": "Type of action to execute when the action button is pressed",
      "type": "string",
      "enum": [
        "navigate",
        "info",
        "event"
      ],
      "example": "event"
    },
    "content": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ActionButtonContent"
        },
        {
          "description": "Content to display with an \"info\" type action button"
        }
      ]
    },
    "displayStyle": {
      "description": "Display style of the action button",
      "type": "string",
      "enum": [
        "primaryOption",
        "secondaryOption",
        "positive",
        "negative"
      ],
      "example": "positive"
    },
    "failureMessage": {
      "description": "Message to display if the action fails",
      "type": "string",
      "example": "An error occurred. Please make sure you are authorized to complete the action."
    },
    "label": {
      "description": "Label of the action button",
      "type": "string",
      "example": "Approve"
    },
    "successMessage": {
      "description": "Message to display if the action succeeds",
      "type": "string",
      "example": "You have approved the ticket."
    },
    "url": {
      "description": "The URL to navigate to when the action button is pressed",
      "type": "string",
      "example": "https://myapp.com/approveOrder/1234"
    }
  }
}
Name Type Description
action string Type of action to execute when the action button is pressed
content ActionButtonContent Content to display with an "info" type action button
displayStyle string Display style of the action button
failureMessage string Message to display if the action fails
label string Label of the action button
successMessage string Message to display if the action succeeds
url string The URL to navigate to when the action button is pressed

ActionButtonContent

{
  "type": "object",
  "title": "ActionButtonContent",
  "required": [
    "button",
    "description",
    "title"
  ],
  "properties": {
    "button": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ActionButtonContentButton"
        },
        {
          "description": "Button to display in the content panel of the \"info\" type action button"
        }
      ]
    },
    "description": {
      "description": "Description to display in the content panel of the \"info\" type action button",
      "type": "string",
      "example": "Please follow these instructions to register your account: ..."
    },
    "title": {
      "description": "Title to display in the content panel of the \"info\" type action button",
      "type": "string",
      "example": "Information"
    }
  }
}
Name Type Description
button ActionButtonContentButton Button to display in the content panel of the "info" type action button
description string Description to display in the content panel of the "info" type action button
title string Title to display in the content panel of the "info" type action button

ActionButtonContentButton

{
  "type": "object",
  "title": "ActionButtonContentButton",
  "required": [
    "displayStyle",
    "label"
  ],
  "properties": {
    "displayStyle": {
      "description": "Display style of the button",
      "type": "string",
      "enum": [
        "primaryOption",
        "secondaryOption",
        "positive",
        "negative"
      ],
      "example": "primaryOption"
    },
    "label": {
      "description": "Label of the button",
      "type": "string",
      "example": "OK"
    }
  }
}
Name Type Description
displayStyle string Display style of the button
label string Label of the button

ApplicationToConnect

{
  "type": "object",
  "title": "ApplicationToConnect",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "description": "Application UUID",
      "type": "string",
      "example": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
    },
    "subFilterFields": {
      "description": "Sub-filter fields",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/SubFilterField"
      }
    }
  }
}
Name Type Description
id string Application UUID
subFilterFields array of SubFilterField Sub-filter fields

ApplicationToDisconnect

{
  "type": "object",
  "title": "ApplicationToDisconnect",
  "properties": {
    "id": {
      "description": "Application UUID",
      "type": "string",
      "example": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
    }
  }
}
Name Type Description
id string Application UUID

Changes

{
  "type": "object",
  "title": "Changes",
  "properties": {
    "fields": {
      "description": "Field changes",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Field"
      }
    },
    "users": {
      "description": "User access changes",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/User"
      }
    }
  }
}
Name Type Description
fields array of Field Field changes
users array of User User access changes

ConnectionDetails

{
  "type": "object",
  "title": "ConnectionDetails",
  "required": [
    "accountName"
  ],
  "properties": {
    "accountName": {
      "description": "User account identifier",
      "type": "string",
      "example": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4"
    }
  }
}
Name Type Description
accountName string User account identifier

Content

{
  "type": "object",
  "title": "Content",
  "required": [
    "url"
  ],
  "properties": {
    "delete": {
      "description": "If true, the content will be removed from the resource",
      "type": "boolean"
    },
    "title": {
      "description": "Title of the content",
      "type": "string",
      "example": "Order request"
    },
    "url": {
      "description": "URL of the content",
      "type": "string",
      "example": "https://myapp.com/orders/1234"
    }
  }
}
Name Type Description
delete boolean If true, the content will be removed from the resource
title string Title of the content
url string URL of the content

DisconnectionDetails

{
  "type": "object",
  "title": "DisconnectionDetails",
  "required": [
    "status"
  ],
  "properties": {
    "accountName": {
      "description": "The user account name to disconnect",
      "type": "string",
      "example": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4"
    },
    "status": {
      "description": "Disconnection status",
      "type": "string",
      "example": "PENDING_REMOVAL"
    }
  }
}
Name Type Description
accountName string The user account name to disconnect
status string Disconnection status

Error

{
  "type": "object",
  "title": "Error",
  "required": [
    "code",
    "message",
    "status"
  ],
  "properties": {
    "code": {
      "description": "Canonical error code",
      "type": "string",
      "example": "NOT_FOUND"
    },
    "message": {
      "description": "Error message",
      "type": "string",
      "example": "User not found."
    },
    "moreInfo": {
      "description": "URL with more information about the error",
      "type": "string",
      "example": "https://help.appdirect.com/api/appwise.html"
    },
    "status": {
      "description": "HTTP status code",
      "type": "integer",
      "format": "int32",
      "example": 404
    }
  }
}
Name Type Description
code string Canonical error code
message string Error message
moreInfo string URL with more information about the error
status integer HTTP status code

Event

{
  "type": "object",
  "title": "Event",
  "required": [
    "key"
  ],
  "properties": {
    "action": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Action"
        },
        {
          "description": "Description of changes in the event"
        }
      ]
    },
    "actor": {
      "allOf": [
        {
          "$ref": "#/components/schemas/User"
        },
        {
          "description": "User who made the change"
        }
      ]
    },
    "changes": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Changes"
        },
        {
          "description": "List of field and user access changes to apply to the resource"
        }
      ]
    },
    "contents": {
      "description": "Content items associated with the resource",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Content"
      }
    },
    "key": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Key"
        },
        {
          "description": "Event key"
        }
      ]
    },
    "messages": {
      "description": "Messages to send about the event",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Message"
      }
    },
    "userAction": {
      "allOf": [
        {
          "$ref": "#/components/schemas/UserAction"
        },
        {
          "description": "User action associated with the resource"
        }
      ]
    }
  }
}
Name Type Description
action Action Description of changes in the event
actor User User who made the change
changes Changes List of field and user access changes to apply to the resource
contents array of Content Content items associated with the resource
key Key Event key
messages array of Message Messages to send about the event
userAction UserAction User action associated with the resource

Field

{
  "type": "object",
  "title": "Field",
  "required": [
    "name",
    "value"
  ],
  "properties": {
    "display": {
      "description": "Controls how the field is displayed",
      "type": "string",
      "enum": [
        "expanded",
        "hidden"
      ],
      "example": "expanded"
    },
    "label": {
      "description": "Display label of the field",
      "type": "string",
      "example": "Project Status"
    },
    "name": {
      "description": "Unique name of the field",
      "type": "string",
      "example": "projectStatus"
    },
    "op": {
      "description": "Controls how the field will be merged with an existing field of the same name",
      "type": "string",
      "enum": [
        "replace",
        "remove"
      ],
      "example": "replace"
    },
    "value": {
      "description": "Value of the field",
      "type": "number",
      "example": "In progress"
    }
  }
}
Name Type Description
display string Controls how the field is displayed
label string Display label of the field
name string Unique name of the field
op string Controls how the field will be merged with an existing field of the same name
value number Value of the field

Key

{
  "type": "object",
  "title": "Key",
  "required": [
    "instance",
    "resourceId",
    "source"
  ],
  "properties": {
    "instance": {
      "description": "Tenant account identifier within the application",
      "type": "string",
      "example": "myclient.myapp.com"
    },
    "resourceId": {
      "description": "Unique ID of the resource in the instance",
      "type": "string",
      "example": "order-12345"
    },
    "source": {
      "description": "Application UUID",
      "type": "string",
      "example": "b2fc6737-3d3f-4da2-afda-f80f25b89af9"
    },
    "timestamp": {
      "description": "UTC timestamp of when the event occurred in epoch format, with millisecond precision",
      "type": "integer",
      "format": "int64",
      "example": 1500558736123
    }
  }
}
Name Type Description
instance string Tenant account identifier within the application
resourceId string Unique ID of the resource in the instance
source string Application UUID
timestamp integer UTC timestamp of when the event occurred in epoch format, with millisecond precision

Message

{
  "type": "object",
  "title": "Message",
  "required": [
    "recipient",
    "text"
  ],
  "properties": {
    "recipient": {
      "allOf": [
        {
          "$ref": "#/components/schemas/User"
        },
        {
          "description": "Recipient user"
        }
      ]
    },
    "text": {
      "description": "Description of the action to apply as a suffix",
      "type": "string",
      "example": "you task #55"
    }
  }
}
Name Type Description
recipient User Recipient user
text string Description of the action to apply as a suffix

SubFilterField

{
  "type": "object",
  "title": "SubFilterField",
  "required": [
    "name"
  ],
  "properties": {
    "label": {
      "description": "Filterable field label",
      "type": "string",
      "example": "Project"
    },
    "name": {
      "description": "Filterable field name",
      "type": "string",
      "example": "project"
    }
  }
}
Name Type Description
label string Filterable field label
name string Filterable field name

User

{
  "type": "object",
  "title": "User",
  "required": [
    "identifier"
  ],
  "properties": {
    "delete": {
      "description": "If true, the user's access to the resource will be revoked (only applies to \"users\" array)",
      "type": "boolean"
    },
    "identifier": {
      "description": "Identifier of the user in the application",
      "type": "string",
      "example": "bob@a13a9998-e025-4751-8fee-72afdc0fe6d5@2cc88871-e942-4910-96e3-0521d7ae52f4"
    },
    "name": {
      "description": "Full name of the user in the application",
      "type": "string",
      "example": "Bob Roberts"
    }
  }
}
Name Type Description
delete boolean If true, the user's access to the resource will be revoked (only applies to "users" array)
identifier string Identifier of the user in the application
name string Full name of the user in the application

UserAccountDisonnectionResponse

{
  "type": "object",
  "title": "UserAccountDisonnectionResponse",
  "properties": {
    "app": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ApplicationToDisconnect"
        },
        {
          "description": "The application the account refers to"
        }
      ]
    },
    "connection": {
      "allOf": [
        {
          "$ref": "#/components/schemas/DisconnectionDetails"
        },
        {
          "description": "Disconnection details"
        }
      ]
    },
    "user": {
      "allOf": [
        {
          "$ref": "#/components/schemas/UserToDisconnect"
        },
        {
          "description": "The user the account belongs to"
        }
      ]
    }
  }
}
Name Type Description
app ApplicationToDisconnect The application the account refers to
connection DisconnectionDetails Disconnection details
user UserToDisconnect The user the account belongs to

UserAction

{
  "type": "object",
  "title": "UserAction",
  "properties": {
    "buttons": {
      "description": "List of action buttons",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ActionButton"
      }
    },
    "delete": {
      "description": "If true, the user action will be removed from the resource",
      "type": "boolean"
    },
    "description": {
      "description": "Description displayed to provide context on the user action",
      "type": "string",
      "example": "This ticket needs approval."
    },
    "failureMessage": {
      "description": "Message to display if the action fails",
      "type": "string",
      "example": "An error occurred. Please make sure you are authorized to complete the action."
    },
    "successMessage": {
      "description": "Message to display if the action succeeds",
      "type": "string",
      "example": "You have approved the ticket."
    }
  }
}
Name Type Description
buttons array of ActionButton List of action buttons
delete boolean If true, the user action will be removed from the resource
description string Description displayed to provide context on the user action
failureMessage string Message to display if the action fails
successMessage string Message to display if the action succeeds

UserConnection

{
  "type": "object",
  "title": "UserConnection",
  "required": [
    "app",
    "user"
  ],
  "properties": {
    "app": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ApplicationToConnect"
        },
        {
          "description": "Application to provision"
        }
      ]
    },
    "user": {
      "allOf": [
        {
          "$ref": "#/components/schemas/UserToConnect"
        },
        {
          "description": "User to provision (connect to AppDirect)"
        }
      ]
    }
  }
}
Name Type Description
app ApplicationToConnect Application to provision
user UserToConnect User to provision (connect to AppDirect)

UserConnectionError

{
  "type": "object",
  "title": "UserConnectionError",
  "required": [
    "code",
    "message",
    "status"
  ],
  "properties": {
    "code": {
      "description": "Canonical error code",
      "type": "string",
      "example": "NOT_FOUND"
    },
    "details": {
      "description": "Details of the error",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "message": {
      "description": "Error message",
      "type": "string",
      "example": "User not found."
    },
    "moreInfo": {
      "description": "URL with more information about the error",
      "type": "string",
      "example": "https://help.appdirect.com/api/appwise.html"
    },
    "status": {
      "description": "HTTP status code",
      "type": "integer",
      "format": "int32",
      "example": 404
    }
  }
}
Name Type Description
code string Canonical error code
details array of string Details of the error
message string Error message
moreInfo string URL with more information about the error
status integer HTTP status code

UserConnectionResponse

{
  "type": "object",
  "title": "UserConnectionResponse",
  "properties": {
    "connection": {
      "$ref": "#/components/schemas/ConnectionDetails"
    }
  }
}
Name Type Description
connection ConnectionDetails

UserToConnect

{
  "type": "object",
  "title": "UserToConnect",
  "required": [
    "companyId",
    "handle",
    "userId"
  ],
  "properties": {
    "companyId": {
      "description": "The user's company UUID",
      "type": "string",
      "example": "2cc88871-e942-4910-96e3-0521d7ae52f4"
    },
    "handle": {
      "description": "The user's handle in the application",
      "type": "string",
      "example": "bob"
    },
    "userId": {
      "description": "The user's UUID",
      "type": "string",
      "example": "a13a9998-e025-4751-8fee-72afdc0fe6d5"
    }
  }
}
Name Type Description
companyId string The user's company UUID
handle string The user's handle in the application
userId string The user's UUID

UserToDisconnect

{
  "type": "object",
  "title": "UserToDisconnect",
  "properties": {
    "companyId": {
      "description": "The user's company UUID",
      "type": "string",
      "example": "2cc88871-e942-4910-96e3-0521d7ae52f4"
    },
    "userId": {
      "description": "The user's UUID",
      "type": "string",
      "example": "a13a9998-e025-4751-8fee-72afdc0fe6d5"
    }
  }
}
Name Type Description
companyId string The user's company UUID
userId string The user's UUID