logo

Barong

Management API for barong OAuth server

#Version: 2.4.0

Security

BearerToken

jwtundefined
DescriptionBearer Token authentication
NameAuthorization
Inheader

/labels/delete

POST

Description:

Delete a label with 'private' scope

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

/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' scopeAdminLabelView

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 usersAdminLabelView

/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 attributesLabel

/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 usersLabel

/users/import

POST

Description:

Imports an existing user

Parameters
NameLocated inDescriptionRequiredSchema
emailformDataUser EmailYesstring
password_digestformDataUser Password HashYesstring
referral_uidformDataReferral uidNostring
phoneformDataNostring
first_nameformDataNostring
last_nameformDataNostring
dobformDataBirthday dateNodate
addressformDataNostring
postcodeformDataNostring
cityformDataNostring
countryformDataNostring
stateformDataNostring
Responses
CodeDescriptionSchema
201Imports an existing userUserWithProfile

/users

POST

Description:

Creates new user

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

/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 collectionUser

/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 informationUserWithProfile

/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

/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
CodeDescriptionSchema
201Push documents to barong DBUserWithProfile

/timestamp

POST

Description:

Returns server time in seconds since Unix epoch.

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

Models

AdminLabelView

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
descriptionstringLabel desc: json string with any additional informationNo
created_atstringNo
updated_atstringNo

Label

Get all labels assigned 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

UserWithProfile

Push documents to barong DB

NameTypeDescriptionRequired
emailstringNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanis 2FA enabled for accountNo
statestringNo
datastringadditional phone and profile infoNo
profilesProfileNo
referral_uidstringUID of referrerNo
created_atstringNo
updated_atstringNo

Profile

NameTypeDescriptionRequired
first_namestringNo
last_namestringNo
dobdateBirthday dateNo
addressstringNo
postcodestringNo
citystringNo
countrystringNo
statestringNo
metadataobjectProfile additional fieldsNo

User

Returns array of users as collection

NameTypeDescriptionRequired
emailstringNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanis 2FA enabled for accountNo
statestringNo
referral_uidstringUID of referrerNo
datastringadditional phone and profile infoNo

APIKey

NameTypeDescriptionRequired
kidstringjwt public keyNo
algorithmstringcryptographic hash function typeNo
scopestringserialized array of scopesNo
statestringactive/non-active state of keyNo
secretstringNo
created_atstringNo
updated_atstringNo

UserWithFullInfo

NameTypeDescriptionRequired
emailstringNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanNo
statestringNo
referral_uidstringUID of referrerNo
csrf_tokenstringcsrf protection tokenNo
datastringadditional phone and profile infoNo
created_atstringNo
updated_atstringNo
labelsLabelNo
phonesPhoneNo
profilesProfileNo
data_storagesDataStorageNo

Phone

NameTypeDescriptionRequired
countrystringNo
numberstringNo
validated_ats (g)No

DataStorage

NameTypeDescriptionRequired
titlestringany additional data titleNo
datastringany additional data json key:value pairsNo
created_atstringNo
updated_atstringNo

UserWithKYC

NameTypeDescriptionRequired
emailstringNo
uidstringNo
rolestringNo
levelintegerNo
otpbooleanNo
statestringNo
datastringadditional phone and profile infoNo
profilesProfileNo
labelsAdminLabelViewNo
phonesPhoneNo
documentsDocumentNo
data_storagesDataStorageNo
referral_uidstringUID of referrerNo
created_atstringNo
updated_atstringNo

Document

NameTypeDescriptionRequired
uploadstringfile urlNo
doc_typestringdocument type: passport, driver licenseNo
doc_numberstringdocument number: AB123123 typeNo
doc_expirestringexpire date of uploaded documentsNo
metadatastringany additional stored dataNo
created_atstringNo
updated_atstringNo