I4A API 2.0: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 13: | Line 13: | ||
|style="width: 20%;"|<code>username</code> | |style="width: 20%;"|<code>username</code> | ||
<small>required | string</small> | <small>required | string</small> | ||
| | | See [[API Settings]] page on how to obtain the value. | ||
|- | |- | ||
| <code>password</code> | | <code>password</code> | ||
<small>required | string</small> | <small>required | string</small> | ||
| | | See [[API Settings]] page on how to obtain the value. | ||
|- | |- | ||
| <code>token</code> | | <code>token</code> | ||
<small>required | string</small> | <small>required | string</small> | ||
| | | See [[API Settings]] page on how to obtain the value. | ||
|} | |} | ||
Line 44: | Line 44: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Retrieving Data == | == Retrieving Data == |
Revision as of 14:30, 26 October 2022
Security
For security purposes, I4A API 2 will only work on a secure port through HTTPS. To access any of the API functionality, you must first authenticate. Information is available on the API Settings page on how to obtain the values needed to authenticate and update them, if need be.
Authentication Endpoint
POST /i4a/api2/authenticate/
Parameters
username
required | string |
See API Settings page on how to obtain the value. |
password
required | string |
See API Settings page on how to obtain the value. |
token
required | string |
See API Settings page on how to obtain the value. |
Example:
curl --location --request POST 'https://<yourdomain.com>/i4a/api2/authenticate' \
--form 'username="XXXXXXXX"' \
--form 'password="XXXXXXXX"' \
--form 'token="XXXXXX-XXXX-XXXXX-XXXXXXXXXXX"'
Response:
{
"expiration": "{ts '2022-10-25 16:03:47'}",
"success": true,
"authKey": "XXXXXX-XXXX-XXXXX-XXXXXXXXXXX",
"error": ""
}
Retrieving Data
Once you have successfully obtained the authKey, you can then access a few different read-only endpoints. Note: Your authKey will expire after 4 hours.
Contacts Endpoint
POST /i4a/api2/contacts/
Views Endpoint
POST /i4a/api2/views/