meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
clients [2023/10/29 02:55] – Added initial blurb on how to create 1st client record (incomplete) nicholaschancjclients [2024/02/10 07:13] (current) – add client read api example wrongecho
Line 31: Line 31:
  
 For more details on client portal authentication, see [[aad_sso|Client Portal - Azure AD SSO]]. For more details on client portal authentication, see [[aad_sso|Client Portal - Azure AD SSO]].
 +
 +
 +----
 +
  
 ===== API ===== ===== API =====
 ''/api/v1/clients'' ''/api/v1/clients''
 +
 +==== Read ====
 +Retrieve client information - ''/read.php''.
 +
 +  * Default / No params - Returns all clients
 +  * client_id - Specific client ID from the ITFlow database
 +  * client_name - Lookup by client name
 +
 +  Invoke-RestMethod -Uri "https://demo.itflow.org/api/v1/clients/read.php?api_key=YOUR-API-KEY&client_id=111" | ConvertTo-Json
 +  
 +  {
 +    "success":  "True",
 +    "count":  1,
 +    "data":  [
 +                 {
 +                     "0":  "111",
 +                     "client_id":  "111",
 +                     "1":  "0",
 +                     "client_lead":  "0",
 +                     "2":  "Let it burn Inc",
 +                     "client_name":  "Let it burn Inc",
 +                     "3":  "Safety and Fire",
 +                     "client_type":  "Safety and Fire",
 +                     "4":  "",
 +                     "client_website":  "example.com",
 +  [...]