Skip to content

API Server

API Server is esentially the public interface of the Exosphere platform for the users to interact with. API Server is created in fastapi and has following core apps, each independent of each other.

Project

Project is a logical grouping and seperation of the resources within exosphere ecosystem, thus each project has its unique namespace and billing details attached to it.

Note: Currently all users within a project have same access to all resources within the project. Billing information is set once and cannot be changed, these could be changed only by the exosphere team on email request as of now.

Project Model

{
    "_id":{
        "type": ObjectId,
        "required": true,
        "description": "Unique identifier for the project, auto generated by database"
    },
    "name":{
        "type": String,
        "required": true,
        "description": "Human readable name of the project"
    },
    "status":{
        "type": String,
        "required": true,
        "description": "Status of the project, active, inactive, blocked, deleted (enum)"
    },
    "billing_account":{
        "type": {
            "company_name": {
                "type": String,
                "required": true,
                "description": "Name of the company"
            },
            "company_address": {
                "type": String,
                "required": true,
                "description": "Address of the company"
            },
            "tax_number_type": {
                "type": String,
                "required": true,
                "description": "Type of the tax number, vat, gst, etc. (enum)"
            },
            "tax_number": {
                "type": String,
                "required": true,
                "description": "Tax number of the company"
            },
            "country": {
                "type": String,
                "required": true,
                "description": "Country of the company"
            }
        },
        "required": true,
        "description": "Billing account of the project, reference to the billing account document"
    },
    "users": [
        {
            {
                "role": {
                    "type": String,
                    "required": true,
                    "description": "Role of the user in the project, admin, user, etc. (enum)"
                },
                "user": {
                    "type": ObjectId,
                    "required": true,
                    "description": "Reference to the user document"
                }
            }
        }
    ],
    "super_admin": {
        "type": ObjectId,
        "required": true,
        "description": "Reference to the user document, super admin of the project"
    },
    "created_at":{
        "type": DateTime,
        "required": true,
        "description": "Date and time when the project was created"
    },
    "updated_at":{ 
        "type": DateTime,
        "required": true,
        "description": "Date and time when the project was last updated"
    }
}

User

Model representing exosphere user.

User Model

{
    "_id":{
        "type": ObjectId,
        "required": true,
        "description": "Unique identifier for the user, auto generated by database"
    },
    "name":{
        "type": String,
        "required": true,
        "description": "Human readable name of the user"
    },
    "type": {
        "type": String,
        "required": true,
        "description": "Type of the user, human, api, etc. (enum)"
    },
    "identifier": {
        "type": String,
        "required": true,
        "description": "Identifier of the user, email, phone, etc. (string)"
    },
    "verification_status": {
        "type": String,
        "required": true,
        "description": "Verification status of the user, verified, not_verified, blocked, deleted, not_required (enum)"
    },
    "credential": {
        "type": String,
        "required": true,
        "description": "Credential of the user, password, key, etc. (string)"
    },
    "status": {
        "type": String,
        "required": true,
        "description": "Status of the user, active, inactive, deleted, blocked (enum)"
    },
    "created_at":{
        "type": DateTime,
        "required": true,
        "description": "Date and time when the user was created"
    },
    "updated_at":{
        "type": DateTime,
        "required": true,
        "description": "Date and time when the user was last updated"
    }
}

Auth

The main role of this project is to issue tokens and verify the users and APIs to access the resources within the projects.