Rules
Calls are made to https://api.footer365.net with an API key as a bearer token. This page is generated from the API's own description, which you can download.
/v1/rules
Lists the rules the key can see
Every signature rule of your organisation the key can see, in priority order (the order the portal lists them), in one response. Needs rules.read.
Answers 200 with RuleList.
/v1/rules/{id}
Reads one rule
One signature rule: who it is for, which messages, and the template it sends. Needs rules.read.
| Parameter | In | Type | About it |
|---|---|---|---|
id | path | string (uuid) | The rule's id. |
Answers 200 with RuleDetail.
/v1/rules/{id}/enable
Turns a rule on
Turns the rule on, as the Enabled switch on the Rules page does. Turning on a rule that is already on changes nothing and says so in changed. Needs rules.write, and a key can only change a rule in a folder it may change. A key made by an administrator limited to part of the organisation can only change a rule aimed wholly inside that part, and is refused with rule_outside_scope for any other.
| Parameter | In | Type | About it |
|---|---|---|---|
id | path | string (uuid) | The rule's id. |
Answers 200 with RuleChange.
/v1/rules/{id}/disable
Turns a rule off
Turns the rule off, as the Enabled switch on the Rules page does, so it gives nobody a signature until it is turned on again. Turning off a rule that is already off changes nothing. Needs rules.write, and the same limits as turning a rule on.
| Parameter | In | Type | About it |
|---|---|---|---|
id | path | string (uuid) | The rule's id. |
Answers 200 with RuleChange.
Types
RuleList
| Property | Type | About it |
|---|---|---|
items |
array of RuleDetail | Each rule, in priority order. |
RuleDetail
| Property | Type | About it |
|---|---|---|
id |
string (uuid) | The rule's id. |
name |
string | Its name. |
enabled |
boolean | Whether it is on. |
priority |
integer | Its place in the order; the lowest number is weighed first. |
templateId |
string (uuid) | The template it sends. |
template |
string, or null | The template's name, or null when the key cannot read that template. |
appliesTo |
string | The messages it applies to: all, new, reply or forward. |
recipients |
string | The recipients it applies to: all, anyExternal, allExternal, anyInternal or allInternal. |
scope |
string | Who it is for: everyone, user, group, department, jobTitle or domain. |
targets |
array of RuleTarget | The people, groups, departments, job titles or domains named, for any scope but everyone. |
hasConditions |
boolean | Whether it carries further conditions, such as exceptions or a schedule, set in the portal. |
folder |
ApiFolder, or null | |
createdAt |
string (date-time) | When it was made, in UTC. |
randomTemplates |
array of RuleTemplateChoice, or null | The templates the rule chooses between at random, each message getting one by weight, in the rule's order; the first is the one named by TemplateId. Null for a rule that sends one template. |
RuleChange
| Property | Type | About it |
|---|---|---|
changed |
boolean | False when the rule was already as asked, so nothing was changed. |
rule |
RuleDetail | The rule as it now is. |
RuleTarget
| Property | Type | About it |
|---|---|---|
type |
string | user, group, department, jobTitle or domain. |
value |
string, or null | The address of a person or group, or the department, job title or domain; null for a person or group no longer in the directory, and for a person outside the part of the organisation a limited key is held to. |
id |
string (uuid), or null | The Footer365 id of a person or group, or null; null for a person outside the part of the organisation a limited key is held to. |
ApiFolder
| Property | Type | About it |
|---|---|---|
id |
string (uuid) | The folder's id. |
name |
string | The folder's name. |
RuleTemplateChoice
| Property | Type | About it |
|---|---|---|
templateId |
string (uuid) | The template. |
template |
string, or null | The template's name, or null when the key cannot read that template. |
weight |
integer | Its weight, from 1 to 10; its share of the rule's messages is its weight over the total. |
Errors are written the same way for every call; see Errors. Answers may gain fields within a version, so ignore any you do not recognise.