set_profile()

The User API

The set_profile() function sets (updates) information about a user’s profile.

Production URL

https://api.nextpertise.nl/user/v1

Method

set_profile

Input

Set user profile request

https://api.nextpertise.nl/schemas/user/set_user_profile_request_v1.json

Set information about a user’s profile

type

object

properties

  • user

type

object

properties

  • language

IETF BCP 47 language tag

type

string

enum

en-US, nl-NL

  • firstname

type

string

  • lastname

type

string

additionalProperties

False

  • notification

type

array

additionalProperties

False

Output

Set user profile reply

https://api.nextpertise.nl/schemas/user/set_user_profile_request_v1.json

Set information about a user’s profile

type

object

properties

  • user

type

object

properties

  • language

IETF BCP 47 language tag

type

string

enum

en-US, nl-NL

  • firstname

type

string

  • lastname

type

string

  • username

type

string

  • notification

type

array

additionalProperties

False

Example

After calling get_profile() for our user we got:

{
    "jsonrpc": "2.0",
    "id": "1",
    "result": {
        "user": {
            "language": "nl-NL",
            "firstname": "Teun",
            "lastname": "Ouwehand",
            "username": "teun@nextpertise.nl"
        }
    }
}

Information can be changed with set_profile():

Request

curl -s -u <credential> https://api.nextpertise.nl/user/v1 -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "get_permission",
    "params":{
        "user": {
            "firstname": "New",
            "language": "en-US"
        }
    }
}' | jq .

Reply

{
    "jsonrpc": "2.0",
    "id": "1",
    "result": {
        "user": {
            "language": "en-US",
            "firstname": "New",
            "lastname": "Ouwehand",
            "username": "teun@nextpertise.nl"
        }
    }
}