Operations for a Single User.

/cnbs/v1/apu/users/id
GET | POST

Required GET

  • Parameters (URI Parameter)
    • User ID (user_id)
      • GUID identifying an application user (Obtained by a Users Search).

cURL:

curl -X GET "https://<<your.server.here>>/cnbs/v1/apu/users/id?sap-client=800&sap-language=EN&apiid=CNBSMV01R&user_id=A959E6704DF21EEAA1CD6258E10BEA56 -H  "content-type: application/json" -H  "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI="

The response consists of a user list table with a single record (data) and a status (status).

  • User List (data)
    • User ID (user_id)
      • System Generated
    • Login Name (login)
    • First Name (first_name)
    • Last Name (last_name)
    • Company (company)
    • Email Address (email)
    • Invite Token (invite_token)
    • Number of Logins (num_logins)
    • Status (status)
    • Password Reset Token (password_reset_token)
    • Salt (salt)
    • Hash (hash)
    • Primary Account Type ID (primary_account_type_id)
    • User Role (user_role)
    • Confirmation Token (confirmation_token)
    • Date Created (created_date)
    • Time Created (created_time)
    • Last Change Date (updated_date)
    • Last Change Time (updated_time)
    • Last Login Date (last_login_date)
    • Last Login Time (last_login_time)
    • Date of Last Password Change (last_pwd_change_date)
    • Time of Last Password Change (last_pwd_change_time)
    • Password Change Required? (require_password_change)
    • Third Party ID (third_party_id)
  • Status (status)
    • Message Type (message_type)
      • SAP Message Type.
        • Errors:
          • E = Error
          • A = Abort
          • X = Exception
        • Others:
          • S = Success
          • W = Warning
          • I = Information
    • Message Identifier (message_identification)
      • SAP Message ID.
    • Message Number (message_number)
      • SAP Message Number.
    • Message Line (message_line_string)
      • SAP Message Text.

JSON:

{
  "data": [
{
            "user_id": "A959E6704DF21EEA97F78B7E1430CA56",
            "login": "sjones",
            "first_name": "Steven",
            "last_name": "Jones",
            "company": "CNBS",
            "email": "steven.jones@cnbssoftware.com",
            "invite_token": "",
            "num_logins": 5,
            "status": "active",
            "password_reset_token": "",
            "salt": "dfhskfdjowejsks",
            "hash": "yuerwiiweruiew",
            "primary_account_type_id": "Payer",
            "user_role": "user",
            "confirmation_token": "",
            "created_date": "00000000",
            "created_time": "000000",
            "updated_date": "20200413",
            "updated_time": "130830",
            "last_login_date": "00000000",
            "last_login_time": "000000",
            "last_pwd_change_date": "00000000",
            "last_pwd_change_time": "000000",
            "require_password_change": "",
            "third_party_id": ""
        }
  ],
  "status": {
    "message_type": "S",
    "message_identification": "/CNBS/X_API",
    "message_number": 10,
    "message_line_string": "Request successfully processed ,document selected 1"
  }
}

Required POST

  • Parameters (body Payload)
    • Action (action)
      • Three actions are supported, Create (create), Modify/Update (modify) and Delete (delete)
      • Modify and Delete actions require a valid user_id to be supplied in the body.
      • NOTE: The Create action requires the user_id to be left blank as the system will generate a unique value for the field.
      • NOTE: As of this time, it is the responsibility of the web service consumer to maintain referencial integrity in relation to the User Accounts database. On delete, make sure you delete the accounts of a user before deleting the user.
    • User ID (user_id)
      • GUID identifying an application user (Obtained by a Users Search, or left blank for the creation of a user).
    • Fields maintained by the system include (all others are assumed to be supplied by the calling application):
      • created_date
      • created_time
      • updated_date
      • updated_time

Example POST

JSON body Payload:

{
    "action": "create",
    "data": {
        "user_id": "",
        "login": "PostmanTemp2",
        "first_name": "Postman",
        "last_name": "TestUser",
        "company": "CNBS",
        "email": "postmantemp@cnbssoftware.com",
        "invite_token": "",
        "num_logins": 0,
        "status": "active",
        "password_reset_token": "",
        "salt": "dummyvaluesalt",
        "hash": "dummyvaluehash",
        "primary_account_type_id": "Payer",
        "user_role": "User",
        "confirmation_token": "",
        "created_date": "",
        "created_time": "",
        "updated_date": "00000000",
        "updated_time": "000000",
        "last_login_date": "00000000",
        "last_login_time": "000000",
        "last_pwd_change_date": "00000000",
        "last_pwd_change_time": "000000",
        "require_password_change": "",
        "third_party_id": ""
    }
}

cURL:

curl -X POST "https://<<your.server.here>>/cnbs/v1/apu/users/id?sap-client=800&sap-language=EN&apiid=CNBSMV01R -H  "accept: application/json" -H  "content-type: application/json" -H  "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI=" -d "{ \"action\": \"create\",    \"data\": {  \"user_id\": \"\",  \"login\":\"PostmanTemp2\",   \"first_name\": \"Postman\",   \"last_name\": \"TestUser\",   \"company\": \"CNBS\",   \"email\": \"postmantemp@cnbssoftware.com\",   \"invite_token\": \"\",   \"num_logins\": 0,   \"status\": \"active\",   \"password_reset_token\": \"\",   \"salt\": \"dummyvaluesalt\",   \"hash\": \"dummyvaluehash\",   \"primary_account_type_id\": \"Payer\",   \"user_role\": \"User\",   \"confirmation_token\": \"\",   \"created_date\": \"\",   \"created_time\": \"\",   \"updated_date\": \"00000000\",   \"updated_time\": \"000000\",   \"last_login_date\": \"00000000\",   \"last_login_time\": \"000000\",   \"last_pwd_change_date\": \"00000000\",   \"last_pwd_change_time\": \"000000\",   \"require_password_change\": \"\",   \"third_party_id\": \"\" }}"

Same definition as above GET response. A created user record will include the user_id in the response. Modified records will include changed data in the response. Delete will not return a response detail record.

  • public/docs/webarapi/v130/applicationuserdetail.txt
  • Last modified: 2020/10/30 08:26
  • by Christian Koessl