/one-users-patch-one¶
Summary¶
Source repository:
jef-systems/jef-one-backendSource SHA:
3270463a2e6a5d905ceae779f9a588fdde3cef87Source run id:
25887982658Lambda function:
jef-one-users-patch-oneHTTP method:
PATCHAPI path:
/one-users-patch-oneEndpoint URL:
https://mfr670zvsh.execute-api.ap-southeast-1.amazonaws.com/prod/one-users-patch-onePayload mode:
json-body
Description¶
Function: jef-one-users-patch-oneModule: jef-oneAction: patch-oneMethod: PATCHInvocation Mode: ASYNCResource Path: /one-users-patch-oneTable: jef-one-usersPrimary Key: user_id
API Gateway Response¶
status\_code: 202message: Request accepted for asynchronous processing.
Payload Example¶
user\_id: 5d604ee6-02b3-4678-a898-6293b635b555employee\_number: 00001display\_name: Maria Santospassword\_hash: pbkdf2_sha256$120000$wogMU1ge3YeI1HGnBcqO5A$jrCpqgeuRGg1_ePn7w2psAy5CRxX2jjKdCzJa_0L4NUchildren.user\_entity\_access\[0\].user\_entity\_access\_id: df24406d-5ffd-4bee-9b05-7d4db08f771dchildren.user\_entity\_access\[0\].user\_id: 5d604ee6-02b3-4678-a898-6293b635b555children.user\_entity\_access\[0\].entity\_id: d49b8a8c-30d9-4172-bb72-71855d5804c2
Payload Schema¶
{
"root.type": "M",
"root.required": "True",
"root.attributes.user_id.type": "S",
"root.attributes.user_id.required": "True",
"root.attributes.user_id.format": "uuidv4",
"root.attributes.user_id.regex": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"root.attributes.employee_number.type": "S",
"root.attributes.employee_number.required": "False",
"root.attributes.employee_number.regex": "^[0-9]{5}$",
"root.attributes.display_name.type": "S",
"root.attributes.display_name.required": "False",
"root.attributes.display_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
"root.attributes.password_hash.type": "S",
"root.attributes.password_hash.required": "False",
"root.attributes.password_hash.regex": "^.{1,500}$",
"root.attributes.children.type": "M",
"root.attributes.children.required": "False",
"root.attributes.children.attributes.user_entity_access.type": "L",
"root.attributes.children.attributes.user_entity_access.required": "False",
"root.attributes.children.attributes.user_entity_access.items.type": "M",
"root.attributes.children.attributes.user_entity_access.items.attributes.user_entity_access_id.type": "S",
"root.attributes.children.attributes.user_entity_access.items.attributes.user_entity_access_id.required": "True",
"root.attributes.children.attributes.user_entity_access.items.attributes.user_entity_access_id.format": "uuidv4",
"root.attributes.children.attributes.user_entity_access.items.attributes.user_entity_access_id.regex": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"root.attributes.children.attributes.user_entity_access.items.attributes.user_id.type": "S",
"root.attributes.children.attributes.user_entity_access.items.attributes.user_id.required": "False",
"root.attributes.children.attributes.user_entity_access.items.attributes.user_id.format": "uuidv4",
"root.attributes.children.attributes.user_entity_access.items.attributes.user_id.regex": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"root.attributes.children.attributes.user_entity_access.items.attributes.entity_id.type": "S",
"root.attributes.children.attributes.user_entity_access.items.attributes.entity_id.required": "False",
"root.attributes.children.attributes.user_entity_access.items.attributes.entity_id.format": "uuidv4",
"root.attributes.children.attributes.user_entity_access.items.attributes.entity_id.regex": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
}
Response Schema¶
{
"root.type": "M",
"root.required": "True",
"root.attributes.is_accepted.type": "BOOL",
"root.attributes.is_accepted.required": "True",
"root.attributes.message.type": "S",
"root.attributes.message.required": "True",
"root.attributes.request_id.type": "S",
"root.attributes.request_id.required": "False"
}
Request Payload¶
{
"user_id": "5d604ee6-02b3-4678-a898-6293b635b555",
"employee_number": "00001",
"display_name": "Maria Santos",
"password_hash": "pbkdf2_sha256$120000$wogMU1ge3YeI1HGnBcqO5A$jrCpqgeuRGg1_ePn7w2psAy5CRxX2jjKdCzJa_0L4NU",
"children.user_entity_access[0].user_entity_access_id": "df24406d-5ffd-4bee-9b05-7d4db08f771d",
"children.user_entity_access[0].user_id": "5d604ee6-02b3-4678-a898-6293b635b555",
"children.user_entity_access[0].entity_id": "d49b8a8c-30d9-4172-bb72-71855d5804c2"
}
Response¶
{
"root.type": "M",
"root.required": "True",
"root.attributes.is_accepted.type": "BOOL",
"root.attributes.is_accepted.required": "True",
"root.attributes.message.type": "S",
"root.attributes.message.required": "True",
"root.attributes.request_id.type": "S",
"root.attributes.request_id.required": "False"
}
CMD curl¶
curl -X PATCH "https://mfr670zvsh.execute-api.ap-southeast-1.amazonaws.com/prod/one-users-patch-one" -H "Content-Type: application/json" --data-raw "{\"user_id\": \"5d604ee6-02b3-4678-a898-6293b635b555\", \"employee_number\": \"00001\", \"display_name\": \"Maria Santos\", \"password_hash\": \"pbkdf2_sha256$120000$wogMU1ge3YeI1HGnBcqO5A$jrCpqgeuRGg1_ePn7w2psAy5CRxX2jjKdCzJa_0L4NU\", \"children\": {\"user_entity_access\": [{\"user_entity_access_id\": \"df24406d-5ffd-4bee-9b05-7d4db08f771d\", \"user_id\": \"5d604ee6-02b3-4678-a898-6293b635b555\", \"entity_id\": \"d49b8a8c-30d9-4172-bb72-71855d5804c2\"}]}}"
PowerShell curl¶
curl.exe -X PATCH "https://mfr670zvsh.execute-api.ap-southeast-1.amazonaws.com/prod/one-users-patch-one" -H "Content-Type: application/json" --data-raw '{"user_id": "5d604ee6-02b3-4678-a898-6293b635b555", "employee_number": "00001", "display_name": "Maria Santos", "password_hash": "pbkdf2_sha256$120000$wogMU1ge3YeI1HGnBcqO5A$jrCpqgeuRGg1_ePn7w2psAy5CRxX2jjKdCzJa_0L4NU", "children": {"user_entity_access": [{"user_entity_access_id": "df24406d-5ffd-4bee-9b05-7d4db08f771d", "user_id": "5d604ee6-02b3-4678-a898-6293b635b555", "entity_id": "d49b8a8c-30d9-4172-bb72-71855d5804c2"}]}}'