Table of Contents

API

Use ITFlow's API to work with ITFlow in scripts third-party applications.

The current version of the ITFlow API is v1. It can be accessed at itflow.example.com/api/v1/{module}/{function}.php

Generating an API Key

  1. Login and navigate to the Admin Settings page
  2. Select API Keys
  3. Select Create to open the New Key modal
  4. On Details tab, input the key name and expiration date. Select whether the key will allow access to all clients or a specific client
  5. On Keys tab, note down the API key and credential password and select the checkbox to confirm you've made a copy of the keys. You will not see these admin in the admin interface.
  6. Select Create to add the key into the database

Modules with API support at present

API Functions

Request Methods

Data Returned

Notes

API Docs/Examples

Documentation / an example of how to use a module API endpoint is shown on that module's doc page. Additional examples are available here.


API

Use ITFlow's API to work with ITFlow in scripts and third-party applications.

The current version of the ITFlow API is v1. It can be accessed at itflow.example.com/api/v1/{module}/{function}.php

Generating an API Key

  1. Login and navigate to the Admin Settings page
  2. Select API Keys
  3. Select Create to open the New Key modal
  4. On Details tab, input the key name and expiration date. Select whether the key will allow access to all clients or a specific client
  5. On Keys tab, note down the API key and credential password and select the checkbox to confirm you've made a copy of the keys. You will not see these again in the admin interface.
  6. Select Create to add the key into the database

Modules with API support

API Functions

Request Methods

Data Returned

Notes


API Reference Guide

Current API v1 Endpoints, Authentication, Examples, and Integration Guide

Quick Start Guide

Your First API Call in 5 Minutes

  1. Generate API Key
    1. Login to ITFlow as admin
    2. Navigate to Admin > API
    3. Click New Key
    4. Choose scope: All Clients (for testing) or Specific Client
    5. Copy the generated key
  1. Test Connection
curl "https://itflow.yourdomain.com/api/v1/clients/read.php?api_key=YOUR_KEY&limit=1"
  1. Expected Response
{
  "success": "True",
  "count": 1,
  "data": [{"client_id": "123", "client_name": "Example Corp"}]
}

API Overview

Standard Response Format

{
  "success": "True|False",
  "message": "Descriptive status message",
  "count": 50,
  "data": [
    {
      "id": 123,
      "field": "value"
    }
  ]
}

Create Response Format

{
  "success": "True",
  "count": "1",
  "data": [
    {
      "insert_id": 123
    }
  ]
}

Authentication & Security

API Key Management

Best Practices


Module Reference

Assets ''/api/v1/assets/''

Purpose: Computer and equipment inventory management

Available Endpoints:

Read Parameters (GET):

Parameter Type Description
asset_id integer Get specific asset by ID
asset_type string Filter by asset type (auto-capitalized)
asset_name string Filter by exact asset name
asset_serial string Filter by serial number
asset_mac string Filter by MAC address (searches primary interface)
asset_uri string Filter by URI

Create/Update Parameters (POST):

Parameter Type Required (Create) Description
api_key string Yes API authentication key
client_id integer Yes* Required if API key has all-client access
asset_name string Yes Asset name/hostname
asset_description string No Asset description
asset_type string No Type (Laptop, Desktop, Server, etc.)
asset_make string No Manufacturer
asset_model string No Model name/number
asset_serial string No Serial number
asset_os string No Operating system
asset_ip string No IP address (stored in primary interface)
asset_mac string No MAC address (stored in primary interface)
asset_uri string No Management URL
asset_status string No Status (Deployed, Spare, etc.)
asset_purchase_date date No Purchase date (YYYY-MM-DD)
asset_warranty_expire date No Warranty expiration date
asset_install_date date No Installation date
asset_notes string No Notes
asset_vendor_id integer No Associated vendor ID
asset_location_id integer No Associated location ID
asset_contact_id integer No Associated contact ID
asset_network_id integer No Network ID for primary interface

Update Additional Parameters:

Parameter Type Required Description
asset_id integer Yes ID of asset to update

Delete Parameters:

Parameter Type Required Description
asset_id integer Yes ID of asset to delete

<wrap em>Note: Deleting an asset also removes all associated network interfaces.</wrap>

Example - Create Asset:

curl -X POST "https://itflow.example.com/api/v1/assets/create.php" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_API_KEY",
    "client_id": 1,
    "asset_name": "DESKTOP-001",
    "asset_type": "Desktop",
    "asset_make": "Dell",
    "asset_model": "OptiPlex 7090",
    "asset_serial": "ABC123XYZ",
    "asset_os": "Windows 11 Pro",
    "asset_ip": "192.168.1.100",
    "asset_mac": "00:11:22:33:44:55",
    "asset_status": "Deployed"
  }'

Certificates ''/api/v1/certificates/''

Purpose: SSL/TLS certificate management and expiration tracking

Available Endpoints:

<wrap em>Note: Update and delete endpoints are not implemented.</wrap>

Read Parameters (GET):

Parameter Type Description
certificate_id integer Get specific certificate by ID
certificate_name string Filter by certificate name

Create Parameters (POST):

Parameter Type Required Description
api_key string Yes API authentication key
client_id integer Yes* Required if API key has all-client access
certificate_name string Yes Certificate friendly name
certificate_domain string Yes Domain the certificate covers
certificate_description string No Description
certificate_issued_by string No Issuing authority (e.g., Let's Encrypt)
certificate_expire date No Expiration date (YYYY-MM-DD)
certificate_public_key string No Certificate content/public key
certificate_notes string No Additional notes
certificate_domain_id integer No Link to domains table

Clients ''/api/v1/clients/''

Purpose: Customer/company management

Available Endpoints:

<wrap em>Note: Delete endpoint is not implemented. Use archive instead.</wrap>

Read Parameters (GET):

Parameter Type Description
client_name string Get specific client by exact name

Create Parameters (POST):

<wrap em>Important: Creating clients requires an API key with “All Clients” scope (client_id = 0).</wrap>

Parameter Type Required Description
api_key string Yes API authentication key (must be all-client scope)
client_name string Yes Client/company name
client_type string No Business type/category
client_website string No

$url = $base_url . 'clients/read.php?api_key=' . $api_key; $response = file_get_contents($url); $data = json_decode($response, true);

print_r($data); ?> </code>

cURL

# Get all assets for a client
curl "https://itflow.example.com/api/v1/assets/read.php?api_key=YOUR_KEY&limit=10"
 
# Create a contact
curl -X POST "https://itflow.example.com/api/v1/contacts/create.php" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_KEY",
    "client_id": 1,
    "contact_name": "John Smith",
    "contact_email": "john@example.com",
    "contact_phone": "5551234567",
    "contact_primary": 1
  }'

API Module Summary

Module Read Create Update Delete Archive Other
Assets - -
Certificates - - - -
Clients - unarchive
Contacts unarchive
Credentials - - -
Documents - - -
Domains - - - - -
Expenses - - - - -
Invoices - - - - -
Locations - - - -
Networks - - - - -
Payments - - - - -
Products - - - - -
Quotes - - - - -
Software - - - - -
Tickets - - - resolve
Vendors - - - - -