logo

Barong

Management API for barong OAuth server

#Version: 2.7.0

Security

SecurityScope

basicBasic
DescriptionJWT should have signature keychains
NameAuthorization

/api/v2/barong/management/labels/delete

POST

Description

Delete a label with 'private' scope

Parameters
NameLocated inDescriptionRequiredSchema
user_uidformDataUser uidYesstring
keyformDataLabel key.Yesstring
Responses
CodeDescription
201Delete a label with 'private' scope

/api/v2/barong/management/labels

PUT

Description

Update a label with 'private' scope

Parameters
NameLocated inDescriptionRequiredSchema
user_uidformDataUser uidYesstring
keyformDataLabel key.Yesstring
valueformDataLabel value.Yesstring
descriptionformDataLabel desc.Nostring
replaceformDataWhen true label will be created if not existNoboolean
Responses
CodeDescriptionSchema
200Update a label with 'private' scopeAPI_V2_Entities_Label

POST

Description

Create a label with 'private' scope and assigns to users

Parameters
NameLocated inDescriptionRequiredSchema
user_uidformDataUser uidYesstring
keyformDataLabel key.Yesstring
valueformDataLabel value.Yesstring
descriptionformDataLabel desc.Nostring
Responses
CodeDescriptionSchema
201Create a label with 'private' scope and assigns to usersAPI_V2_Entities_Label

/api/v2/barong/management/labels/list

POST

Description

Get user collection filtered on label attributes

Parameters
NameLocated inDescriptionRequiredSchema
user_uidformDataUser uidYesstring
Responses
CodeDescriptionSchema
201Get user collection filtered on label attributesAPI_V2_Entities_AdminLabelView

/api/v2/barong/management/labels/filter/users

POST

Description

Get all labels assigned to users

Parameters
NameLocated inDescriptionRequiredSchema
keyformDataLabel key.Yesstring
valueformDataLabel value.Nostring
scopeformDataLabel scope.Nostring
extendedformDataWhen true endpoint returns full information about usersNoboolean
rangeformDataNostring
pageformDataPage number (defaults to 1).Nointeger
limitformDataNumber of users per page (defaults to 100, maximum is 100).Nointeger
Responses
CodeDescriptionSchema
201Get all labels assigned to usersAPI_V2_Entities_User

/api/v2/barong/management/users/import

POST

Description

Imports an existing user

Parameters
NameLocated inDescriptionRequiredSchema
emailformDataUser EmailYesstring
password_digestformDataUser Password HashYesstring
referral_uidformDataReferral uidNostring
phoneformDataPhoneNostring
first_nameformDataFirst NameNostring
last_nameformDataLast NameNostring
dobformDataBirth dateNodate
addressformDataAddressNostring
postcodeformDataPostcodeNostring
cityformDataCityNostring
countryformDataCountryNostring
stateformDataStateNostring
Responses
CodeDescriptionSchema
201Imports an existing userAPI_V2_Management_Entities_UserWithProfile

/api/v2/barong/management/users/update

POST

Description

Updates role and data fields of existing user

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataUser UidYesstring
roleformDataUser RoleNostring
dataformDataAny additional key:value pairs in json formatNostring
Responses
CodeDescriptionSchema
201Updates role and data fields of existing userAPI_V2_Management_Entities_UserWithProfile

/api/v2/barong/management/users

POST

Description

Creates new user

Parameters
NameLocated inDescriptionRequiredSchema
emailformDataUser EmailYesstring
passwordformDataUser PasswordYesstring
referral_uidformDataReferral uidNostring
Responses
CodeDescriptionSchema
201Creates new userAPI_V2_Management_Entities_UserWithProfile

/api/v2/barong/management/users/list

POST

Description

Returns array of users as collection

Parameters
NameLocated inDescriptionRequiredSchema
extendedformDataWhen true endpoint returns full information about usersNoboolean
rangeformDataNostring
fromformDataAn integer represents the seconds elapsed since Unix epoch.If set, only records FROM the time will be retrieved.Nointeger
toformDataAn integer represents the seconds elapsed since Unix epoch.If set, only records BEFORE the time will be retrieved.Nointeger
pageformDataPage number (defaults to 1).Nointeger
limitformDataNumber of users per page (defaults to 100, maximum is 100).Nointeger
Responses
CodeDescriptionSchema
201Returns array of users as collectionAPI_V2_Entities_User

/api/v2/barong/management/users/get

POST

Description

Get users and profile information

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataUser uidNostring
emailformDataUser emailNostring
phone_numformDataUser phone numberNostring
Responses
CodeDescriptionSchema
201Get users and profile informationAPI_V2_Management_Entities_UserWithKYC

/api/v2/barong/management/profiles

POST

Description

Imports a profile for user

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataUser UidYesstring
first_nameformDataFirst NameNostring
last_nameformDataLast NameNostring
dobformDataBirth dateNodate
addressformDataAddressNostring
postcodeformDataPostcodeNostring
cityformDataCityNostring
countryformDataCountryNostring
stateformDataStateNostring
metadataformDataMetadataNostring
Responses
CodeDescriptionSchema
201Imports a profile for userAPI_V2_Management_Entities_UserWithProfile

/api/v2/barong/management/phones/delete

POST

Description

Delete phone number for user

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataUser uidYesstring
numberformDataUser phone numberYesstring
Responses
CodeDescriptionSchema
201Delete phone number for userAPI_V2_Management_Entities_Phone

/api/v2/barong/management/phones

POST

Description

Create phone number for user

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataUser uidYesstring
numberformDataUser phone numberYesstring
Responses
CodeDescriptionSchema
201Create phone number for userAPI_V2_Management_Entities_Phone

/api/v2/barong/management/phones/get

POST

Description

Get user phone numbers

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataUser uidYesstring
Responses
CodeDescriptionSchema
201Get user phone numbersAPI_V2_Management_Entities_Phone

/api/v2/barong/management/otp/sign

POST

Description

Sign request with barong signature

Parameters
NameLocated inDescriptionRequiredSchema
user_uidformDataAccount UIDYesstring
otp_codeformDataCode from Google AuthenticatorYesstring
Responses
CodeDescription
201Sign request with barong signature

/api/v2/barong/management/documents

POST

Description

Push documents to barong DB

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataUser uidYesstring
doc_typeformDataDocument typeYesstring
doc_numberformDataDocument numberYesstring
filenameformDataDocument nameYesstring
file_extformDataDocument file extensionYesstring
uploadformDataBase64 encoded documentYesstring
doc_expireformDataDocument expiration dateNodate
update_labelsformDataIf set to false, user label will not be created/updatedNoboolean
metadataformDataAny additional key: value pairs in json string formatNostring
Responses
CodeDescription
201Push documents to barong DB

/api/v2/barong/management/service_accounts/delete

POST

Description

Delete specific service_account

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataservice_account uidYesstring
Responses
CodeDescriptionSchema
201Delete specific service_accountAPI_V2_Entities_ServiceAccounts

/api/v2/barong/management/service_accounts/create

POST

Description

Create service_account

Parameters
NameLocated inDescriptionRequiredSchema
owner_uidformDataowner uidYesstring
service_account_roleformDataservice_account roleYesstring
service_account_uidformDataservice_account uidNostring
service_account_emailformDataservice_account emailNostring
Responses
CodeDescriptionSchema
201Create service_accountAPI_V2_Entities_ServiceAccounts

/api/v2/barong/management/service_accounts/list

POST

Description

Get service_accounts as a paginated collection

Parameters
NameLocated inDescriptionRequiredSchema
pageformDataPage number (defaults to 1).Nointeger
limitformDataNumber of users per page (defaults to 100, maximum is 100).Nointeger
owner_uidformDataowner uidNostring
owner_emailformDataowner emailNostring
Responses
CodeDescriptionSchema
201Get service_accounts as a paginated collectionAPI_V2_Entities_ServiceAccounts

/api/v2/barong/management/service_accounts/get

POST

Description

Get specific service_account information

Parameters
NameLocated inDescriptionRequiredSchema
uidformDataservice_account uidNostring
emailformDataservice_account emailNostring
Responses
CodeDescriptionSchema
201Get specific service_account informationAPI_V2_Entities_ServiceAccounts

/api/v2/barong/management/timestamp

POST

Description

Returns server time in seconds since Unix epoch.

Responses
CodeDescription
201Returns server time in seconds since Unix epoch.

Models

API_V2_Entities_Label

Create a label with 'private' scope and assigns to users

NameTypeDescriptionRequired
keystringLabel key. [a-z0-9_-]+ should be used. Min - 3, max - 255 characters.No
valuestringLabel value. [A-Za-z0-9_-] should be used. Min - 3, max - 255 characters.No
scopestringLabel scope: 'public' or 'private'No
created_atstringNo
updated_atstringNo

API_V2_Entities_AdminLabelView

Get user collection filtered on label attributes

NameTypeDescriptionRequired
keystringLabel key. [a-z0-9_-]+ should be used. Min - 3, max - 255 characters.No
valuestringLabel value. [A-Za-z0-9_-] should be used. Min - 3, max - 255 characters.No
scopestringLabel scope: 'public' or 'private'No
descriptionstringLabel desc: json string with any additional informationNo
created_atstringNo
updated_atstringNo

API_V2_Entities_User

Returns array of users as collection

NameTypeDescriptionRequired
emailstringNo
usernamestringUser usernameNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanis 2FA enabled for accountNo
statestringUser state: active, pending, inactiveNo
referral_uidstringUID of referrerNo
datastringAdditional phone and profile infoNo

API_V2_Management_Entities_UserWithProfile

Imports a profile for user

NameTypeDescriptionRequired
emailstringNo
usernamestringUser usernameNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanis 2FA enabled for accountNo
statestringUser state: active, pending, inactiveNo
referral_uidstringUID of referrerNo
datastringAdditional phone and profile infoNo
profilesAPI_V2_Management_Entities_ProfileNo
created_atstringNo
updated_atstringNo

API_V2_Management_Entities_Profile

NameTypeDescriptionRequired
first_namestringFirst NameNo
last_namestringLast nameNo
dobdateBirth dateNo
addressstringAddressNo
postcodestringAddress PostcodeNo
citystringCity nameNo
countrystringCountry nameNo
statestringProfile state: drafted, submitted, verified, rejectedNo
metadataobjectProfile additional fieldsNo
created_atstringNo
updated_atstringNo

API_V2_Management_Entities_UserWithKYC

Get users and profile information

NameTypeDescriptionRequired
emailstringNo
usernamestringUser usernameNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanNo
statestringNo
datastringadditional phone and profile infoNo
profilesAPI_V2_Management_Entities_ProfileNo
labelsAPI_V2_Entities_AdminLabelViewNo
phonesAPI_V2_Management_Entities_PhoneNo
documentsAPI_V2_Management_Entities_DocumentNo
data_storagesAPI_V2_Entities_DataStorageNo
commentsAPI_V2_Entities_CommentNo
created_atstringNo
updated_atstringNo

API_V2_Management_Entities_Phone

Get user phone numbers

NameTypeDescriptionRequired
countrystringPhone countryNo
numberstringPhone NumberNo
validated_ats (g)Phone validation dateNo

API_V2_Management_Entities_Document

NameTypeDescriptionRequired
uploadstringFile urlNo
doc_typestringDocument type: passport, driver license, utility bill, identity card, institutional, address, residentalNo
doc_numberstringDocument number: AB123123 typeNo
doc_expirestringExpire date of uploaded documentsNo
metadatastringAny additional stored dataNo
created_atstringNo
updated_atstringNo

API_V2_Entities_DataStorage

NameTypeDescriptionRequired
titlestringAny additional data titleNo
datastringAny additional data json key:value pairsNo
created_atstringNo
updated_atstringNo

API_V2_Entities_Comment

NameTypeDescriptionRequired
idintegerComment idNo
author_uidstringComment author UIDNo
titlestringComment titleNo
datastringComment plain textNo
created_atstringNo
updated_atstringNo

API_V2_Entities_ServiceAccounts

Get specific service_account information

NameTypeDescriptionRequired
emailstringUser EmailNo
uidstringUser UIDNo
rolestringService Account RoleNo
levelintegerUser LevelNo
statestringService Account State: active, disabledNo
userAPI_V2_Entities_UserNo
created_atstringNo
updated_atstringNo

API_V2_Entities_APIKey

NameTypeDescriptionRequired
kidstringJWT public keyNo
algorithmstringCryptographic hash function typeNo
scopestringSerialized array of scopesNo
statestringactive/non-active state of keyNo
secretstringApi key secretNo
created_atstringNo
updated_atstringNo

API_V2_Entities_UserWithFullInfo

NameTypeDescriptionRequired
emailstringNo
usernamestringUser usernameNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanNo
statestringNo
referral_uidstringUID of referrerNo
datastringAdditional phone and profile infoNo
csrf_tokenstringСsrf protection tokenNo
labelsAPI_V2_Entities_LabelNo
phonesAPI_V2_Entities_PhoneNo
profilesAPI_V2_Entities_ProfileNo
data_storagesAPI_V2_Entities_DataStorageNo
created_atstringNo
updated_atstringNo

API_V2_Entities_Phone

NameTypeDescriptionRequired
countrystringPhone countryNo
numberstringSubmasked phone numberNo
validated_ats (g)Phone validation dateNo

API_V2_Entities_Profile

NameTypeDescriptionRequired
first_namestringFirst NameNo
last_namestringSubmasked last nameNo
dobdateSubmasked birth dateNo
addressstringAddressNo
postcodestringAddress PostcodeNo
citystringCity nameNo
countrystringCountry nameNo
statestringProfile state: drafted, submitted, verified, rejectedNo
metadataobjectProfile additional fieldsNo
created_atstringNo
updated_atstringNo