Profile
GET CURRENT USER INFORMATION
Note
This API is used to get information of current user.
| Action | Parameters | Description | 
|---|---|---|
get | 
None | 
Get current user information. | 
Endpoint
Example Request
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://app.engineerforce.io/api/v2/users/me/',
  headers: { 'Authorization': 'API-Token {{YOUR_API_TOKEN}}' }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url('https://app.engineerforce.io/api/v2/users/me/')
  .method("GET", body)
  .addHeader("Authorization", "API-Token {{YOUR_API_TOKEN}}")
  .build();
Response response = client.newCall(request).execute();
Example Response
{
    "url": "https://app.engineerforce.io/api/v2/users/1000/",
    "id": 1000,
    "email": "test@testing.io",
    "imageUrl": "/static/img/no-pic.png",
    "companyName": "Testing Ltd.",
    "teams": [{
        "url": "https://app.engineerforce.io/api/v2/teams/100/",
        "id": 100,
        "name": "Team A",
        "created": "2021-12-06",
        "perms": ["Estimator", "Watcher", "Approver"],
        "qs": 1
    }],
    "fullname": "John Doe",
    "firstName": "John",
    "lastName": "Doe",
    "last_login": "2022-12-30T18:23:35.877249+09:00",
    "date_joined": "2022-04-04T18:55:54+09:00",
    "is_staff": false,
    "aboutMe": "",
    "language": null,
    "skill": "\"\"",
    "informationId": 110,
    "isOwner": false,
    "organizationInfo": {
        "url": "https://app.engineerforce.io/api/v2/organizations/120/",
        "name": "Testing",
        "prefix": "M3jQi7O4VzhvUJaI",
        "isOwner": false,
        "isUser": true,
        "isAdminActivated": true,
        "quantity": 100,
        "ownerUsers": ["owner@testing.io"],
        "ownerUsersWithDetail": [{
            "name": "George Wells",
            "email": "owner@testing.io",
            "avatarUrl": "/media/images/3754273ce388b4d9e8290f61ab97b93794.JPG",
            "bio": "",
            "teams": [{
                "name": "Team A",
                "perms": ["add_team", "Approver", "change_team", "delete_team", "Estimator", "Owner", "view_team", "Watcher"]
            },]
        }],
        "normalUsersWithDetail": [{
            "name": "John Doe",
            "email": "test@testing.io",
            "avatarUrl": "/static/img/no-pic.png",
            "bio": "",
            "teams": [{
                "name": "Team A",
                "perms": ["Estimator", "Watcher", "Approver"]
            }]
        }],
        "normalUsers": ["test@testing.io"],
        "subscription": {},
        "limit": "You can invite 99 more members",
        "seatLeft": 99
    }
}
UPDATE CURRENT USER INFORMATION
Note
This API is used to update information of current user.
| Action | Parameters | Description | 
|---|---|---|
put | 
None | 
Update current user information. | 
Endpoint
Example Request
var axios = require('axios');
var payload = {}
var config = {
  method: 'put',
  url: '/api/v2/users/me/',
  headers: { 'Authorization': 'API-Token {{YOUR_API_TOKEN}}' },
  data: payload
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
String json = "{}";
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, json);
Request request = new Request.Builder()
  .url('/api/v2/users/me/')
  .method("PUT", body)
  .addHeader("Authorization", "API-Token {{YOUR_API_TOKEN}}")
  .build();
Response response = client.newCall(request).execute();
Example Payload
firstName , lastName and companyName are required.
Example Response (200 OK)
The reponse will be the created instance like this one.