APIs to pass events from Nitro to Orbis.
Orbis Production Host: https://app.orbisdata.ai
Endpoint to submit a learning event for tracking.
POST {{host}}/rest/v1/learn/event
¶ Request Body
JSON Parameters
- org_token (string, required): Your organization's unique token.
- eventName (string, required): Name of the event being tracked.
- eventVal (string or JSON, required): Value associated with the event. Can be a simple string or a JSON object.
- eventCategory (string, optional, default: "EXTERNAL"): Category of the event. Use "EXTERNAL" for events originating outside the system.
- u (string, optional): Canonical URL related to the event.
- lang (string, optional, default: "en"): Language of the event data.
Example Request
{
"org_token": "{{your_org_token}}",
"eventName": "{{eventname}}",
"eventVal": {
"key1": "value1",
"key2": "value2"
},
"eventCategory": "EXTERNAL",
"u": "{{canonicalUrl}}",
"lang": "en"
}
}
- The eventValue field can either be a simple string or a JSON object, providing flexibility in the type of data associated with the event.
- The eventCategory field is optional and defaults to "EXTERNAL" if not specified.
- The u field is optional and can be used to provide a canonical URL related to the event. This should be a valid URL.
- The lang field is optional and defaults to "en" if not specified.
- If the submission is successful, the API will respond with the following success message:
Response: 200 OK
{
"status": "success"
}
}
- If the organization is not found, the API will respond with the following error:
Response: 400 BAD REQUEST
{
"status": "failed",
"code": 5104,
"reason": "Please provide the correct token in the URL."
}
The API will respond with the appropriate status code and a JSON object containing any relevant information or error messages.
¶ User and Organization Registration API
Endpoint to register a new user and Organization.
POST {{host}}/api/v1/register?token=182416ce389f64a5ffc090dd14bc8da40b4ced86
¶ Request Body
JSON Parameters
- email (string, required): User's email address.
- password (string, required): User's chosen password.
- first_name (string, required): User's first name.
- domain (string, required): User's domain.
- entity (string, required): User's entity information.
{
"email": "[email protected]",
"password": "1234",
"first_name": "AT",
"domain": "domain3.com",
"entity": "x.getnitro.co"
}
Error Responses
- If the user already exists, the API will respond with a 400 BAD REQUEST and the following error message:
Response: 400 BAD REQUEST
{
"status": "error",
"message": "[email protected] already registered! Please sign in to continue."
}
- If the organization already exists, the API will respond with a 400 BAD REQUEST and the following error message:
Response: 400 BAD REQUEST
{
"status": "error",
"message": "Org already exists"
}
Success Response
- If the registration is successful, the API will respond with the following success message:
Response: 200 OK
{
"status": "success",
"message": "Registration successful"
}
The API will respond with the appropriate status code and a JSON object containing relevant information or error messages.