Skip to content

Latest commit

 

History

History
122 lines (77 loc) · 2.81 KB

UsersApi.md

File metadata and controls

122 lines (77 loc) · 2.81 KB

WaziupApi.UsersApi

All URIs are relative to https://api.waziup.io/api/v2

Method HTTP request Description
getUsers GET /users/ Get all users in a realm
GetUser GET /users/{userid} Get a single user
putUserSmsCredit PUT /users/{user_id}/sms_credit put sms credit

getUsers

[User] getUsers(opts)

User data

Example

//Options for fetching the values. Use ('limit', 'offset').
var opts = {
  username: "cdupont",
  limit: "50", // String | In case of pagination, number of entris per page
  offset: "0" // String | In case of pagination, offset for the starting entry
};
let users = await apiInstance.getUsers(opts);
//You can use the users here

Parameters

Name Type Description Notes
username String
limit String In case of pagination, number of entris per page [optional]
offset String In case of pagination, offset for the starting entry [optional]

Return type

[User]

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getUser

User getUser(userId)

get user

Example

var userID = "test";
let user = await apiInstance.getUser(userID);
//You can use the user here

Parameters

Name Type Description Notes
userId String

Return type

User

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

putUserSmsCredit

putUserSmsCredit(userId, body)

insert name

Example

var userID = "test";
apiInstance.putUserSmsCredit(userID, {});

Parameters

Name Type Description Notes
userId String
body String

Return type

null (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: text/plain
  • Accept: application/json