简体   繁体   中英

BIM 360 or ACC APIs POST users completes but missing information

Using this reference: https://forge.autodesk.com/en/docs/acc/v1/reference/http/users-POST/

The request completes successfully, and the response is correct. However, when going into the member directory, it only has their name, company and email address (not phone number, address, or other attributes).

I'm using workato so copying code here is not a simple thing. Here is a scrubbed copy of the JSON from the request/response:

Input:

{
    "Request name": "POST new user with found company id",
    "Request": {
        "method": "POST",
        "content_type": "application/json",
        "form_body": [
            {
                "param": "company_id",
                "value": "COMPANY_ID"
            },
            {
                "param": "email",
                "value": "EMAIL"
            },
            {
                "param": "first_name",
                "value": "FIRST"
            },
            {
                "param": "last_name",
                "value": "LAST"
            },
            {
                "param": "address_line_1",
                "value": "ADDRESS 1"
            },
            {
                "param": "city",
                "value": "CITY"
            },
            {
                "param": "state_or_province",
                "value": "STATE"
            },
            {
                "param": "postal_code",
                "value": "ZIP"
            },
            {
                "param": "phone",
                "value": "PHONE"
            },
            {
                "param": "country",
                "value": "COUNTRY"
            }
        ],
        "headers": [
            {
                "header": "Authorization",
                "value": "Bearer TOKEN"
            },
            {
                "header": "Content-Type",
                "value": "application/json"
            }
        ],
        "url": "https://developer.api.autodesk.com/hq/v1/accounts/HUB_ID/users",
        "body": {
            "email": "EMAIL",
            "company_id": "COMPANY_ID",
            "nickname": "",
            "first_name": "FIRST",
            "last_name": "LAST",
            "image_url": "",
            "address_line_1": "ADDRESS 1",
            "address_line_2": "",
            "city": "CITY",
            "postal_code": "ZIP",
            "state_or_province": "STATE",
            "country": "COUNTRY",
            "phone": "PHONE",
            "company": "COMPANY",
            "job_title": "Subcontractor",
            "industry": "Subcontractor",
            "about_me": "ADDED VIA API"
        }
    },
    "Response": {
        "output_type": "json",
        "expected_encoding": "UTF-8",
        "ignore_http_errors": "false",
        "response_schema": "[{\"control_type\":\"text\",\"label\":\"ID\",\"type\":\"string\",\"name\":\"id\"},{\"control_type\":\"text\",\"label\":\"Account ID\",\"type\":\"string\",\"name\":\"account_id\"},{\"control_type\":\"text\",\"label\":\"Status\",\"type\":\"string\",\"name\":\"status\"},{\"control_type\":\"text\",\"label\":\"Role\",\"type\":\"string\",\"name\":\"role\"},{\"control_type\":\"text\",\"label\":\"Company ID\",\"type\":\"string\",\"name\":\"company_id\"},{\"control_type\":\"text\",\"label\":\"Company name\",\"type\":\"string\",\"name\":\"company_name\"},{\"control_type\":\"text\",\"label\":\"Last sign in\",\"type\":\"string\",\"name\":\"last_sign_in\"},{\"control_type\":\"text\",\"label\":\"Email\",\"type\":\"string\",\"name\":\"email\"},{\"control_type\":\"text\",\"label\":\"Name\",\"type\":\"string\",\"name\":\"name\"},{\"control_type\":\"text\",\"label\":\"Nickname\",\"type\":\"string\",\"name\":\"nickname\"},{\"control_type\":\"text\",\"label\":\"First name\",\"type\":\"string\",\"name\":\"first_name\"},{\"control_type\":\"text\",\"label\":\"Last name\",\"type\":\"string\",\"name\":\"last_name\"},{\"control_type\":\"text\",\"label\":\"Uid\",\"type\":\"string\",\"name\":\"uid\"},{\"control_type\":\"text\",\"label\":\"Image URL\",\"type\":\"string\",\"name\":\"image_url\"},{\"control_type\":\"text\",\"label\":\"Address line 1\",\"type\":\"string\",\"name\":\"address_line_1\"},{\"control_type\":\"text\",\"label\":\"Address line 2\",\"type\":\"string\",\"name\":\"address_line_2\"},{\"control_type\":\"text\",\"label\":\"City\",\"type\":\"string\",\"name\":\"city\"},{\"control_type\":\"text\",\"label\":\"Postal code\",\"type\":\"string\",\"name\":\"postal_code\"},{\"control_type\":\"text\",\"label\":\"State or province\",\"type\":\"string\",\"name\":\"state_or_province\"},{\"control_type\":\"text\",\"label\":\"Country\",\"type\":\"string\",\"name\":\"country\"},{\"control_type\":\"text\",\"label\":\"Phone\",\"type\":\"string\",\"name\":\"phone\"},{\"control_type\":\"text\",\"label\":\"Company\",\"type\":\"string\",\"name\":\"company\"},{\"control_type\":\"text\",\"label\":\"Job title\",\"type\":\"string\",\"name\":\"job_title\"},{\"control_type\":\"text\",\"label\":\"Industry\",\"type\":\"string\",\"name\":\"industry\"},{\"control_type\":\"text\",\"label\":\"About me\",\"type\":\"string\",\"name\":\"about_me\"},{\"control_type\":\"text\",\"label\":\"Created at\",\"render_input\":\"date_time_conversion\",\"parse_output\":\"date_time_conversion\",\"type\":\"date_time\",\"name\":\"created_at\"},{\"control_type\":\"text\",\"label\":\"Updated at\",\"render_input\":\"date_time_conversion\",\"parse_output\":\"date_time_conversion\",\"type\":\"date_time\",\"name\":\"updated_at\"}]"
    }
}

Output:

{
    "headers": {
        "cache_control": "max-age=0, private, must-revalidate, no-store, no-cache",
        "content_encoding": "gzip",
        "content_type": "application/json; charset=utf-8",
        "date": "Thu, 05 May 2022 15:17:43 GMT",
        "etag": "W/\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"",
        "pragma": "no-cache",
        "referrer_policy": "strict-origin-when-cross-origin",
        "strict_transport_security": "max-age=31536000; includeSubDomains",
        "vary": "Accept-Encoding",
        "x_content_type_options": "nosniff",
        "x_download_options": "noopen",
        "x_frame_options": "SAMEORIGIN",
        "x_permitted_cross_domain_policies": "none",
        "x_request_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "x_xss_protection": "1; mode=block",
        "content_length": "474",
        "connection": "keep-alive"
    },
    "response": {
        "account_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "role": "account_user",
        "status": "not_invited",
        "company_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "company_name": "COMPANY",
        "last_sign_in": null,
        "default_role": null,
        "default_role_id": null,
        "access_level": "account_user",
        "id": "ID",
        "email": "EMAIL",
        "name": "NAME",
        "nickname": "NICKNAME",
        "first_name": "FIRST",
        "last_name": "LAST",
        "uid": "UID",
        "image_url": "IMAGE",
        "address_line_1": "",
        "address_line_2": "",
        "city": "",
        "postal_code": "",
        "state_or_province": "",
        "country": "United States",
        "phone": null,
        "company": "",
        "job_title": "",
        "industry": "",
        "about_me": "",
        "created_at": "2019-08-26T14:58:42.849000+00:00",
        "updated_at": "2022-04-01T16:46:35.292000+00:00"
    },
    "Status code": 201,
    "Error": "",
    "Body": "{\"account_id\":\"(truncated for security)..."}"
}

https://i.stack.imgur.com/Y1qXL.png

I can reproduce the issue my side, some fields in the request body did not take effect, sorry for that. I am checking with internal team and will log a JIRA ticket for this. But we are working on the next version of Admin API currently, it will be coming soon.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM