Projects
The Project:
Projects exist within an organization.
The Structure:
Much of the same features that exist at the organization level also exist at the project level.
Projects are mostly utilized to separate users, logs and forwarders within an organization.
A project can only have one organization
A project can have multiple forwarders and users.
Users assigned to a project can have different roles, which determine what they can do within the project.
Users roles will be inherited by the project from the parent organization.
Users roles will be also be inherited by all other entites that belong to the project, such as notifications, tickets, forwarders and logs.
A project can be transferred to other organizations.
Archiving/Deleting:
Get all
Description
Get all projects
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
Responses
200
OK
Description:
The [project](/docs/api/projects) objects with populated attributes.
Type:
Array of Project objects
Example:
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
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
/:orgId/project/
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/ \ -X GET \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
Get by id
Description
Find the project that matches the {projectId} query parameter.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
The [project](/docs/api/projects) object with populated attributes.
Type:
Project object
Example:
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
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
/:orgId/project/:projectId
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/:projectId \ -X GET \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
Get events
Description
Get all events for the project. This includes theings like user role changes, forwarder changes, other updates, etc.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
{Events} for the [project](/docs/api/projects).
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
/:orgId/project/:projectId/events
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/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 notifications for the project.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
[notifications](/docs/api/notifications) for the [project](/docs/api/projects).
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
/:orgId/project/:projectId/notifications
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/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 stats for the project. This includes things like user count, forwarder count, log count, etc.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Stats for the [project](/docs/api/projects).
Type:
ProjectStats object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
{ usersTimeseries: {}, 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
/:orgId/project/:projectId/stats
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/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
{ usersTimeseries: {}, 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 project.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
body
name
string
Required
Description:
Project name
Example:
"Production"
notes
string
Description:
Project notes
Example:
"Production project for LogHarvestor Org"
org
string
Description:
Organization ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns the newly created [project](/docs/api/projects).
Type:
Project object
Example:
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
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
/:orgId/project/
Request
1 2 3 4 5
curl https://logharvestor.com/api/v1/:orgId/project/ \ -X POST \ -H 'Authorization: Bearer <token>' \ -H 'Content-Type: application/json' \ --data-raw '{"name":"\"Production\"","notes":"\"Production project for LogHarvestor Org\"","org":"\"0f9c0b0b4f0c6b0017f0e3b1\""}'
Response
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
Update
Description
Update a project.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
body
name
string
Required
Description:
Project name
Example:
"Production"
notes
string
Description:
Project notes
Example:
"Production project for LogHarvestor Org"
Responses
200
OK
Description:
Returns the updated [project](/docs/api/projects).
Type:
Project object
Example:
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
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
/:orgId/project/:projectId
Request
1 2 3 4 5
curl https://logharvestor.com/api/v1/:orgId/project/:projectId \ -X PUT \ -H 'Authorization: Bearer <token>' \ -H 'Content-Type: application/json' \ --data-raw '{"name":"\"Production\"","notes":"\"Production project for LogHarvestor Org\""}'
Response
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
Delete
Description
Delete a project.
⚠️ WARNING ⚠️
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Snapshot of the [project](/docs/api/projects) before it was deleted.
Type:
Project object
Example:
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
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
/:orgId/project/:projectId
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/:projectId \ -X DELETE \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
Transfer
Description
Transfer a project to another organization.
To transfer a project:
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
body
orgId
string
Required
Description:
Organization ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns the newly transferred [project](/docs/api/projects).
Type:
Project object
Example:
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
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
/:orgId/project/:projectId/transfer
Request
1 2 3 4 5
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/transfer \ -X POST \ -H 'Authorization: Bearer <token>' \ -H 'Content-Type: application/json' \ --data-raw '{"orgId":"\"0f9c0b0b4f0c6b0017f0e3b1\""}'
Response
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
Archive
Description
Archive a project.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns the archived [project](/docs/api/projects)
Type:
Project object
Example:
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
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
/:orgId/project/:projectId/archive
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/archive \ -X POST \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
Unarchive
Description
Unarchive a project.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Returns the unarchived [project](/docs/api/projects)
Type:
Project object
Example:
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
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
/:orgId/project/:projectId/unarchive
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/unarchive \ -X POST \ -H 'Authorization: Bearer <token>' \
Response
1 2 3 4 5 6 7
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", name: "Production", notes: "Production project for LogHarvestor Org", org: "0f9c0b0b4f0c6b0017f0e3b1", createdBy: "0f9c0b0b4f0c6b0017f0e3b1" }
Get all users
Description
Get all users that belong to or have access to an project.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
RBAC objects for the projects [user](/docs/api/users).
Type:
Array of RBAC objects
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", user: { _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 }, role: "owner", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }
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
/:orgId/project/:projectId/user
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/user \ -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
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", user: { _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 }, role: "owner", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }
Get user by id
Description
Find a user, belonging to the project, that matches the {userId} query parameter.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
RBAC object for the [user](/docs/api/users).
Type:
RBAC object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", user: { _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 }, role: "owner", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }
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
/:orgId/project/:projectId/user/:userId
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/user/:userId \ -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
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", user: { _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 }, role: "owner", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }
Add user
Description
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
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:
RBAC object for the newly added [user](/docs/api/users).
Type:
RBAC object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", user: { _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 }, role: "owner", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }
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
/:orgId/project/:projectId/user
Request
1 2 3 4 5
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/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 16 17 18 19 20 21
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", user: { _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 }, role: "owner", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }
Update user role
Description
Update the {role} of a user in a project.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
userId
string
Required
Description:
User ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
body
role
string
Required
Description:
User role
Options:
owner | member
Example:
"owner"
Responses
200
OK
Description:
RBAC object for the new [user](/docs/api/users) role.
Type:
RBAC object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", user: { _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 }, role: "owner", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }
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
/:orgId/project/:projectId/user/:userId
Request
1 2 3 4 5
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/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 16 17 18 19 20 21
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", user: { _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 }, role: "owner", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }
Remove user
Description
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
userId
string
Required
Description:
User ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
Description:
Snapshot of the RBAC object for the [user](/docs/api/users) at the time of deletion.
Type:
RBAC object
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", user: { _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 }, role: "owner", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }
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
/:orgId/project/:projectId/user/:userId
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/user/:userId \ -X DELETE \ -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
{ _id: "0f9c0b0b4f0c6b0017f0e3b1", user: { _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 }, role: "owner", entity: "0f9c0b0b4f0c6b0017f0e3b1", entityType: "Forwarder" }
Get forwarders
Description
Get all forwarders that belong to a project.
Parameters
headers
Authorization
string
Required
Description:
Bearer token - JWT
Example:
"Bearer <token>"
params
projectId
string
Required
Description:
Project ID
Example:
"0f9c0b0b4f0c6b0017f0e3b1"
Responses
200
OK
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
/:orgId/project/:projectId/forwarder
Request
1 2 3 4
curl https://logharvestor.com/api/v1/:orgId/project/:projectId/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