Skip to content

Persons

httpkom.persons

persons_get_user_area_block(pers_no, block_name) async

Get a user area block.

Parameters:

Name Type Description Default
pers_no int

Person number.

required
block_name string

Name of the user area block.

required

Request:

GET /<server_id>/persons/<pers_no>/user-area/<block_name> HTTP/1.1

Responses:

Block exists:

HTTP/1.1 200 OK

{ ... }

Block does not exist:

HTTP/1.1 404 NOT FOUND

Example:

curl -v "http://localhost:5001/lyskom/persons/14506/user-area/common"

persons_set_presentation(pers_no) async

Set the presentation text for a person.

Parameters:

Name Type Description Default
pers_no int

Person number.

required

Request:

POST /<server_id>/persons/<pers_no>/set-presentation HTTP/1.1

{
  "text_no": 19680717
}

Response:

Success:

HTTP/1.1 201 Created

Example:

curl -v -X POST -H "Content-Type: application/json" \
     -d '{ "text_no": 19680717 }' \
     "http://localhost:5001/lyskom/persons/14506/set-presentation"

persons_set_passwd(pers_no) async

Change password for a person.

Parameters:

Name Type Description Default
pers_no int

Person number.

required

Request:

POST /<server_id>/persons/<pers_no>/set-passwd HTTP/1.1

{
  "old_pwd": "oldpassword",
  "new_pwd": "newpassword"
}

Response:

Success:

HTTP/1.1 201 Created

Example:

curl -v -X POST -H "Content-Type: application/json" \
     -d '{ "old_pwd": "oldpassword", "new_pwd": "newpassword" }' \
     "http://localhost:5001/lyskom/persons/14506/set-passwd"

persons_create() async

Create a person.

Request:

POST /<server_id>/persons/ HTTP/1.0

{
  "name": "Oskars Testperson",
  "passwd": "test123",
}

Responses:

Person was created:

HTTP/1.0 201 Created

{
  "pers_no": 14506,
  "pers_name": "Oskars Testperson"
}

Example:

curl -v -X POST -H "Content-Type: application/json" \
     -d '{ "name": "Oskar Testperson", "passwd": "test123" }' \
     http://localhost:5001/lyskom/persons/