Loyi API Reference
    Loyi API Reference
    • Getting Started
    • Architecture
    • User
      • Users Overview
      • Create user
        POST
      • Get users
        GET
      • Get user
        GET
      • Update user
        PUT
      • Delete user
        DELETE
    • Reward
      • Rewards Overview
      • Create reward
        POST
      • Get rewards
        GET
      • Delete reward
        DELETE
      • Create entry pass code
        POST
      • Get entry pass code
        GET
      • Airdrop reward
        PUT
      • Award reward
        POST
      • Redeem rewards
        GET
    • Collection
      • Collection Overview
      • Create collection
        POST
      • Get collections
        GET
      • Get collection
        GET
      • Update collection
        PUT
      • Delete collection
        DELETE
      • Get rewards
        GET
    • Collectible
      • Claim collectible
        POST
      • Get collectibles
        GET
    • Quest
      • Quest Overview
      • Create quest
      • Get quests
      • Get quest
      • Update quest
      • Delete quest
      • Get participants
      • Accept quest
      • Submit answers
      • Get answers
    • Leaderboard
      • Leaderboard Overview
      • Get leaderboard
    • Leveling
      • Get leveling configuration
      • Configure leveling
      • Get milestone levels
      • Create milestone level
      • Get milestone level
      • Update milestone level
      • Delete milestone level

    Architecture

    Here we explain the architecture of the Loyi system and the flow of data between a client application server and our API service.
    Architecture.jpg
    The flow begins with the client server, labeled "Your Server", making a request to the API server. This request first passes through a load balancer, which distributes traffic to maintain optimal performance. After load balancing, the request undergoes authentication to verify the requester's identity. The request needs an API key in the x-api-key header and a whitelisted domain in the origin header.
    Once authenticated as valid, the request is routed to the appropriate service within the API server. The service components process the specific business logic required for the request.
    The services interact with a database server when data needs to be retrieved or stored. After processing, the API server sends a response back to the client, completing the request-response cycle.

    Data Flow#

    Here is a data flow diagram showcasing how to use the Loyi API to allow a User to participate in a Quiz Quest.
    Data Flow (1).jpg
    Modified at 2025-03-27 16:04:23
    Previous
    Getting Started
    Next
    Users Overview
    Built with