AI Network
  • What is AI Network
  • AIN Blockchain
    • Architecture
      • Design Principles
      • Event-driven Architectures
      • Blockchain Database
        • States
          • State Types
          • Operations
          • Predefined Structures
        • Rules and Owners
          • Rule Configs
          • Owner Configs
        • Functions
          • Built-in Functions
      • Instant Execution, and Eventual Consistency
      • Network ID and Chain ID
      • Transactions
        • Structure
        • Nonce
        • Read Concern
        • Propagation
      • Block Structure
      • Account and Keys
      • Consensus
      • Scalability
      • Apps
    • Developer Guide
      • Quick Start
      • AI Network Products
        • AI Network Worker
        • AI Network Insight
        • Testnet Server Node
        • Ainize Trigger
          • Project user
          • Project deployer
          • Why do we have to use Ainize Trigger?
      • Token Bridge
      • Trouble Shooting
    • Developer Reference
      • Blockchain API
        • JSON RPC API
        • Node Client API
      • Blockchain SDK
        • ain-js
        • ain-py
      • Validators
    • Staking
  • AIN DAO
    • What is AIN DAO
      • Runo (Run Your Node)
      • GPU Sponsorship Program
    • Onboarding & Participation
    • Governance
    • Tokenomics
      • AI Network Tokenomics
      • AINFT Tokenomics
  • AI Agents
    • AINFT
    • AINFT Factory
    • AINFT Projects
      • 🍳MiniEggs
      • 🦈Baby Shark
      • 🛸Soul Fiction
      • 🎻NFT Classics Society
    • Developer Reference
      • Ainft-Js
      • AINFT tutorial
        • Create AINFT object and Mint
        • Transfer AINFT
        • Set metadata of AINFT
        • Search and Retrieve AINFT
  • AIN Wallet
    • What is AIN Wallet?
    • AIN Wallet API
  • PROPOSAL DOCUMENTS
    • AIN Improvement Memos (AIMs)
    • AIN Improvement Proposals (AIPs)
Powered by GitBook
On this page

Was this helpful?

  1. AIN Blockchain
  2. Developer Guide
  3. AI Network Products
  4. Ainize Trigger

Project user

PreviousAinize TriggerNextProject deployer

Last updated 3 years ago

Was this helpful?

Let's find out how to create an App on AI Network Blockchain and set up the Trigger Function through Ainize.

(1) Create your own app

First, let's create an App.

(2) Set a Trigger Function

Now, let’s register the Trigger Function. When a value is written in a specific path set as the Database path, a POST request is sent to the endpoint set as the API endpoint, including the value written to the path.

(3) Test Trigger Function (optional)

Let's check if the Trigger Function has been set correctly. First, input the path and value you want to write down and click the Test trigger button. When this button is clicked, the value entered as Input will be written in the Database path. When the value is written, the trigger function set in step 2 will be triggered and a POST request will go to the API endpoint. After creating the result value in the API Server deployed on Ainize, the result value will be written on the blockchain.

When you click the “Go to check result” button, you can see the blockchain, like in the following picture, and you will be able to see that the values are written correctly.

To summarize the flow:

When creating an app, the /manage_app/${appName} Database path will appear as shown in the picture above. This means that the user who created the app has been registered as the admin of the app. The admin will get owner and writing permissions in the /apps/${appName} path. (You can check the following picture in detail on )

AI Network Insight