Orgs
The Organization:
Organizations (Orgs) are the top level of the Log Harvestor permissions hierarchy. All billing is done at the Org level, and all users must belong to an Org.
Structure:
An organization can have multiple projects and users.
Users assigned to an organization can have different roles, which determine what they can do within the organization.
Users roles will be inherited by all projects within the organization.
Users roles will also be inherited by all other entites that belong to the organization, such as notifications, tickets, dashboards, and cards.
Users can be assigned to multiple organizations.
Archiving/Deleting:
Billing:
Get all
Description
Get all {organizations} that the user belongs to or has access to.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
Responses
200
OK
Type:
Array of Org objects
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
get
/org/
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/ \ -X GET \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
Get by id
Description
Find the organization that matches the {orgId} query parameter.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
The id of the org
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Type:
Org object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
get
/org/:orgId
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/:orgId \ -X GET \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
Get events
Description
Get all the events for an organization. These events include things like user or project changes, {billing} events, any other related updates.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns all events for the Org.
Type:
Array of Event objects
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", type: "updated", message: "User 0f9c0b0b4f0c6b0017f0e3b1 updated forwarder 0f9c0b0b4f0c6b0017f0e3b1", user: "0f9c0b0b4f0c6b0017f0e3b1", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder", refs: [ { entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }, { entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Project" } ] }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
get
/org/:orgId/events
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/:orgId/events \ -X GET \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", type: "updated", message: "User 0f9c0b0b4f0c6b0017f0e3b1 updated forwarder 0f9c0b0b4f0c6b0017f0e3b1", user: "0f9c0b0b4f0c6b0017f0e3b1", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder", refs: [ { entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }, { entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Project" } ] }
Get notifications
Description
Get all the notifications for an organization.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns all notifications for the org.
Type:
Array of Notification objects
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Error notification", notes: "This notification is for errors", ownerEntityType: "User", ownerEntity: "0f9c0b0b4f0c6b0017f0e3b1", rules: { id: "0f9c0b0b4f0c6b0017f0e3b1", field: "typ", operator: "EQUALS", comparator: "error", combinator: "AND" }, mediums: { email: true, sms: true, push: true }, enabled: true }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
get
/org/:orgId/notifications
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/:orgId/notifications \ -X GET \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Error notification", notes: "This notification is for errors", ownerEntityType: "User", ownerEntity: "0f9c0b0b4f0c6b0017f0e3b1", rules: { id: "0f9c0b0b4f0c6b0017f0e3b1", field: "typ", operator: "EQUALS", comparator: "error", combinator: "AND" }, mediums: { email: true, sms: true, push: true }, enabled: true }
Get stats
Description
Get all the {stats} for an organization. This includes things like the total numbers of users, projects, forwarders, etc.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns the stats for the Org.
Type:
OrgStats object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
{ usersTimeseries: {}, projectsTimeseries: {}, forwarderTimeseries: { id: "forwarderTimeseries", total: 20053, totalTicks: 3, data: [ { _id: "168910405000", count: 123 }, { _id: "168910415000", count: 5234 }, { _id: "168910425000", count: 4567 } ] } }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
get
/org/:orgId/stats
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/:orgId/stats \ -X GET \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
{ usersTimeseries: {}, projectsTimeseries: {}, forwarderTimeseries: { id: "forwarderTimeseries", total: 20053, totalTicks: 3, data: [ { _id: "168910405000", count: 123 }, { _id: "168910415000", count: 5234 }, { _id: "168910425000", count: 4567 } ] } }
Create
Description
Create a new organization.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
body
name
string
Required
Description:
Forwarder name
Example:
"LogHarvestor"
notes
string
Description:
Forwarder notes
Example:
"LogHarvestor is a all in one analytics platform"
billing
object
Description:
Forwarder billing
Example:
OrgBilling
Responses
200
OK
Type:
Org object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
post
/org/
Request
1 2 3 4 5
curl https://logharvestor.com/api/v1/org/ \ -X POST \ -H 'Authorization: Bearer <token>' \ -H 'Content-Type: application/json' \ --data-raw '{"name":"\"LogHarvestor\"","notes":"\"LogHarvestor is a all in one analytics platform\""}'
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
Update
Description
Update an organization.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
body
name
string
Required
Description:
Forwarder name
Example:
"LogHarvestor"
notes
string
Description:
Forwarder notes
Example:
"LogHarvestor is a all in one analytics platform"
billing
object
Description:
Forwarder billing
Example:
OrgBilling
Responses
200
OK
Description:
Returns the updated forwarder.
Type:
Org object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
put
/org/:orgId
Request
1 2 3 4 5
curl https://logharvestor.com/api/v1/org/:orgId \ -X PUT \ -H 'Authorization: Bearer <token>' \ -H 'Content-Type: application/json' \ --data-raw '{"name":"\"LogHarvestor\"","notes":"\"LogHarvestor is a all in one analytics platform\""}'
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
Delete
Description
Delete an organization.
⚠️ WARNING ⚠️
Parameters
Responses
delete
/org/:orgId
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/:orgId \ -X DELETE \ undefined \
Response
1
Archive
Description
Archive an organization.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns the archived org.
Type:
Org object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
post
/org/:orgId/archive
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/:orgId/archive \ -X POST \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
Unarchive
Description
Unarchive an organization.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns the unarchived org.
Type:
Org object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
post
/org/:orgId/unarchive
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/:orgId/unarchive \ -X POST \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "LogHarvestor", notes: "LogHarvestor is a all in one analytics platform", stripeId: "cus_123456789", stripePlan: "pro", projects: [ "0f9c0b0b4f0c6b0017f0e3b1" ], billing: { email: "ljack21@logharvestor.com", phone: "123-456-7890" } }
Get users
Description
Get all users that belong to or have access to an organization.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns the users in the org.
Type:
Array of User objects
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", fname: "Jack", lname: "Lumber", dname: "Jack Lumber", email: "ljack21@logharvestor.com", password: "password", image: "{image url}", phone: "123-456-7890", queries: {}, settings: {}, role: "demo", onboardingStage: "welcome", dismissOnboarding: false }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
get
/org/:orgId/user
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/:orgId/user \ -X GET \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", fname: "Jack", lname: "Lumber", dname: "Jack Lumber", email: "ljack21@logharvestor.com", password: "password", image: "{image url}", phone: "123-456-7890", queries: {}, settings: {}, role: "demo", onboardingStage: "welcome", dismissOnboarding: false }
Get user by id
Description
Find a user, belonging to the organization, that matches the {userId} query parameter.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns org user.
Type:
User object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", fname: "Jack", lname: "Lumber", dname: "Jack Lumber", email: "ljack21@logharvestor.com", password: "password", image: "{image url}", phone: "123-456-7890", queries: {}, settings: {}, role: "demo", onboardingStage: "welcome", dismissOnboarding: false }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
get
/org/:orgId/user/:userid
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/:orgId/user/:userid \ -X GET \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", fname: "Jack", lname: "Lumber", dname: "Jack Lumber", email: "ljack21@logharvestor.com", password: "password", image: "{image url}", phone: "123-456-7890", queries: {}, settings: {}, role: "demo", onboardingStage: "welcome", dismissOnboarding: false }
Add user
Description
Add a new user to an organization.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
body
string
Required
Description:
User email
Example:
"ljack21@logharvestor.com"
role
string
Required
Description:
User role
Options:
owner | member
Example:
"owner"
Responses
200
OK
Description:
Returns the added user.
Type:
User object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", fname: "Jack", lname: "Lumber", dname: "Jack Lumber", email: "ljack21@logharvestor.com", password: "password", image: "{image url}", phone: "123-456-7890", queries: {}, settings: {}, role: "demo", onboardingStage: "welcome", dismissOnboarding: false }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
post
/org/:orgId/user
Request
1 2 3 4 5
curl https://logharvestor.com/api/v1/org/:orgId/user \ -X POST \ -H 'Authorization: Bearer <token>' \ -H 'Content-Type: application/json' \ --data-raw '{"email":"\"ljack21@logharvestor.com\"","role":"\"owner\""}'
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", fname: "Jack", lname: "Lumber", dname: "Jack Lumber", email: "ljack21@logharvestor.com", password: "password", image: "{image url}", phone: "123-456-7890", queries: {}, settings: {}, role: "demo", onboardingStage: "welcome", dismissOnboarding: false }
Update user role
Description
Update the {role} of a user in an organization.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
userid
string
Required
Description:
User identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
body
role
string
Required
Description:
User role
Options:
owner | member
Example:
"owner"
Responses
200
OK
Description:
Returns the updated user.
Type:
User object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", fname: "Jack", lname: "Lumber", dname: "Jack Lumber", email: "ljack21@logharvestor.com", password: "password", image: "{image url}", phone: "123-456-7890", queries: {}, settings: {}, role: "demo", onboardingStage: "welcome", dismissOnboarding: false }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
put
/org/:orgId/user/:userid
Request
1 2 3 4 5
curl https://logharvestor.com/api/v1/org/:orgId/user/:userid \ -X PUT \ -H 'Authorization: Bearer <token>' \ -H 'Content-Type: application/json' \ --data-raw '{"role":"\"owner\""}'
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", fname: "Jack", lname: "Lumber", dname: "Jack Lumber", email: "ljack21@logharvestor.com", password: "password", image: "{image url}", phone: "123-456-7890", queries: {}, settings: {}, role: "demo", onboardingStage: "welcome", dismissOnboarding: false }
Remove user
Description
Remove a user from an organization.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
userid
string
Required
Description:
User identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns the removed user.
Type:
User object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", fname: "Jack", lname: "Lumber", dname: "Jack Lumber", email: "ljack21@logharvestor.com", password: "password", image: "{image url}", phone: "123-456-7890", queries: {}, settings: {}, role: "demo", onboardingStage: "welcome", dismissOnboarding: false }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
delete
/org/:orgId/user/:userid
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/:orgId/user/:userid \ -X DELETE \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", fname: "Jack", lname: "Lumber", dname: "Jack Lumber", email: "ljack21@logharvestor.com", password: "password", image: "{image url}", phone: "123-456-7890", queries: {}, settings: {}, role: "demo", onboardingStage: "welcome", dismissOnboarding: false }
Get forwarders
Description
Get all forwarders that belong to an organization.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
orgId
string
Required
Description:
Org identifier
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns the unarchived forwarder.
Type:
Array of Forwarder objects
Example:
1 2 3 4 5 6 7 8 9 10 11 12
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Web server 1", notes: "Forwarder assigned to the web server", host: "10.10.10.100", token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", enabled: true, org: "0f9c0b0b4f0c6b0017f0e3b1", project: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1", tot_logs: 10000 }
401
Unauthorized
Type:
Error object
Example:
1 2 3 4 5
{ name: "Invalid Role", message: "You do not have the required role to access this resource", status: 401 }
404
Not Found
Type:
Error object
Example:
1 2 3 4 5
{ name: "Entity not found", message: "Entity not found", status: 404 }
500
Internal Server Error
Type:
Error object
Example:
1 2 3 4 5
{ name: "Internal Server Error", message: "Internal Server Error", status: 500 }
get
/org/:orgId/forwarder
Request
1 2 3 4
curl https://logharvestor.com/api/v1/org/:orgId/forwarder \ -X GET \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7 8 9 10 11 12
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Web server 1", notes: "Forwarder assigned to the web server", host: "10.10.10.100", token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", enabled: true, org: "0f9c0b0b4f0c6b0017f0e3b1", project: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1", tot_logs: 10000 }
Resources
Docs
Pricing
Roadmap
About
Integrations
Copyright © Log Harvestor 2023 • Terms • Privacy