/one-users-post-one¶
Summary¶
Source repository:
jef-systems/jef-one-backendSource SHA:
255c303dcc5f304ce39a65a64fefbf61a44ac8e2Source run id:
25995611060Lambda function:
jef-one-users-post-oneHTTP method:
POSTAPI path:
/one-users-post-oneEndpoint URL:
https://mfr670zvsh.execute-api.ap-southeast-1.amazonaws.com/prod/one-users-post-onePayload mode:
json-body
Description¶
Function: jef-one-users-post-oneModule: jef-oneAction: post-oneMethod: POSTInvocation Mode: ASYNCResource Path: /one-users-post-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: 10000display\_name: Ramon Santospassword\_hash: Sample text 001children.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": "True",
"root.attributes.employee_number.regex": "^[0-9]{5}$",
"root.attributes.display_name.type": "S",
"root.attributes.display_name.required": "True",
"root.attributes.display_name.regex": "^[A-Za-z0-9 .,'_-]{1,120}$",
"root.attributes.password_hash.type": "S",
"root.attributes.password_hash.required": "True",
"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": "True",
"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": "10000",
"display_name": "Ramon Santos",
"password_hash": "Sample text 001",
"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 POST "https://mfr670zvsh.execute-api.ap-southeast-1.amazonaws.com/prod/one-users-post-one" -H "Content-Type: application/json" --data-raw "{\"user_id\": \"5d604ee6-02b3-4678-a898-6293b635b555\", \"employee_number\": \"10000\", \"display_name\": \"Ramon Santos\", \"password_hash\": \"Sample text 001\", \"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 POST "https://mfr670zvsh.execute-api.ap-southeast-1.amazonaws.com/prod/one-users-post-one" -H "Content-Type: application/json" --data-raw '{"user_id": "5d604ee6-02b3-4678-a898-6293b635b555", "employee_number": "10000", "display_name": "Ramon Santos", "password_hash": "Sample text 001", "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"}]}}'