Best Answer

Api user created by

  • 18 April 2024
  • 9 replies
  • 44 views

I’ve been thinking about something:
When creating a user, inside of the platform or using the api…. how do we know which user created the new “user record”?

I can see that there is a “created date” field… but what about “created by” or something similar?
Docebo does not save this type of detail?
No “created by, modified by, owner” and other similar fields like in other platforms like dynamics or salesforce?

Can I retrieve this information using the endpoint “/manage/v1/user/list”?

If there is no such fields… how can I handle this? create custom fields for this purpose? 

icon

Best answer by dwilburn 18 April 2024, 16:20

View original

9 replies

Userlevel 5
Badge

Hi @flistergod I looked a /manager/v1/user/{user_id} and it does not have created by info. I know that is stored in other elements like power users info. It also doesn’t show the creation date/time. So there may be a better endpoint.

Typically when I am looking for this info I go to the audit trail and filter where the target = the user’s email address (our main tracking element).

I’m going to take another look around. At the least it would seem that we could find where the last access date/time is stored.

 

Userlevel 5
Badge

There is an audit trail endpoint in the API, I have not tested it.

Userlevel 5
Badge

API Browser Quick Grabs: Browsing the Browser | Community (docebo.com)

@dwilburn Amazing help! I’m still checking this… I was thinking about creating the fields myself and create a automation around them… is this possible? I’ll check what you’ve said and I’ll be back with updates! TY!

Userlevel 5
Badge

The system automation app is pretty limited. Docebo Connect has some lookup type automations. 

That could be an option, add a user addition field, “Created by” and populate it. Especially if it is being created by a small user set. 

With the user additional field you could also populate this field when a user creates the new user with an API or CSV.

@dwilburn  You are correct! The Audit does return the details that I’m looking for!
Post https://domain.docebosaas.com/audittrail/v1/audittrail
In the body, provide the filters that you want.
In my case, I wanted every change to Users:

sample:

 

{

  "timeframe": {

    "from": "2024-04-11 14:51:34",

    "to": "2024-04-18 14:51:34"

  },

  "eventTypes": [

    "newUserCreated",

    "newUserCreatedByExtIntegration",

    "userDeleted",

    "userModified",

    "userModifiedByExtIntegration",

    "newUserCreatedSelfReg",

    "userSuspended",

    "userUnSuspended"

  ]

}



Use the queryId returned from the 1st request and use it on the request below:

Get https://domain.docebosaas.com/audittrail/v1/audittrail/queryId

It returns the filtered logs:
 

 

Userlevel 7
Badge +5

@flistergod You can also use the Audit app from the Admin menu…

 

The post is about using the Api, but i did use that to double check my postman results!

Userlevel 5
Badge

That filter is handy, that is how I typically look things up.

Reply