Bug Example of API/V8 create account is not working #4491

Open
opened 2026-02-20 16:18:14 -05:00 by deekerman · 0 comments
Owner

Originally created by @opravil-jan on GitHub (Mar 1, 2021).

Issue

I’m trying create account using an example in https://docs.suitecrm.com/developer/api/developer-setup-guide/json-api/#_authentication, but I’m getting error.

Expected Behavior

I'm expecting get response created with status code 201

Actual Behavior

Getting error

{
    "errors": {
    "status": 400,
    "title": null,
    "detail": "The required option \"data\" is missing."
  }
}

Stack trace in suitecrm.log

Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] current_language is: en_us
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheAPC
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheZend
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCachesMash
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheFile
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheMemcached
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheMemory
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Using cache backend SugarCacheMemory, since 999 is less than 1000
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheWincache
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheMemcache
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheRedis
Mon Mar  1 13:42:57 2021 [18][-none-][INFO] Found language file: en_us.lang.php
Mon Mar  1 13:42:57 2021 [18][-none-][INFO] Found extended language file: en_us.lang.ext.php
Mon Mar  1 13:42:57 2021 [18][-none-][WARN] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone="UTC" in php.ini!
Mon Mar  1 13:42:57 2021 [18][-none-][INFO] Query:SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = 'Active' and deleted = 0
Mon Mar  1 13:42:57 2021 [18][-none-][INFO] Query Execution Time:0.00052905082702637
Mon Mar  1 13:42:57 2021 [18][-none-][INFO] Query:SELECT category, name, value FROM config
Mon Mar  1 13:42:57 2021 [18][-none-][INFO] Query Execution Time:0.00049519538879395
Mon Mar  1 13:42:57 2021 [18][-none-][INFO] Query:SELECT id FROM outbound_email WHERE type = 'system' AND deleted = 0
Mon Mar  1 13:42:57 2021 [18][-none-][INFO] Query Execution Time:0.00047492980957031
Mon Mar  1 13:42:57 2021 [18][-none-][INFO] Query:SELECT * FROM outbound_email WHERE id = '730f58f3-c6c1-994b-215c-6037b200e52a'
Mon Mar  1 13:42:57 2021 [18][-none-][INFO] Query Execution Time:0.00056695938110352
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Hook called: ::after_entry_point
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Including module specific hook file for custom/modules
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Including Ext hook file for custom/application
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Hook called: ::after_session_start
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Unable to find SugarController:: get
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Hook called: ::server_round_trip
Mon Mar  1 13:42:57 2021 [18][-none-][DEBUG] Calling MySQLi::disconnect()
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] current_language is: en_us
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheAPC
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheZend
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCachesMash
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheFile
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheMemcached
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheMemory
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Using cache backend SugarCacheMemory, since 999 is less than 1000
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheWincache
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheMemcache
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheRedis
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Found language file: en_us.lang.php
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Found extended language file: en_us.lang.ext.php
Mon Mar  1 13:43:06 2021 [19][-none-][WARN] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone="UTC" in php.ini!
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query:SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = 'Active' and deleted = 0
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00039386749267578
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query:SELECT category, name, value FROM config
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00038290023803711
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query:SELECT id FROM outbound_email WHERE type = 'system' AND deleted = 0
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.0003049373626709
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query:SELECT * FROM outbound_email WHERE id = '730f58f3-c6c1-994b-215c-6037b200e52a'
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00038385391235352
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Hook called: ::after_entry_point
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Including module specific hook file for custom/modules
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Including Ext hook file for custom/application
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/slim.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/controllers.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/factories.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/globals.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/helpers.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/middlewares.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/params.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/services.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/validators.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/services.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/beanAliases.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Custom routes file is not exists: custom/application/Ext/Api/V8/Config/routes.php
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Retrieve OAuth2Tokens: SELECT oauth2tokens.* FROM oauth2tokens  WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Limit Query:SELECT oauth2tokens.* FROM oauth2tokens  WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0 Start: 0 count: 1
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query:SELECT oauth2tokens.* FROM oauth2tokens  WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0 LIMIT 0,1
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00049114227294922
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] get_user_array query: SELECT id, first_name, last_name, user_name FROM users WHERE 1=1 ORDER BY  user_name ASC 
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query:SELECT id, first_name, last_name, user_name FROM users WHERE 1=1 ORDER BY  user_name ASC 
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00031304359436035
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Retrieve OAuth2Tokens: SELECT oauth2tokens.* FROM oauth2tokens  WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Limit Query:SELECT oauth2tokens.* FROM oauth2tokens  WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0 Start: 0 count: 1
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query:SELECT oauth2tokens.* FROM oauth2tokens  WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0 LIMIT 0,1
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00050687789916992
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Hook called: Users::before_retrieve
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Including module specific hook file for custom/modules/Users
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Retrieve User : SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Limit Query:SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 Start: 0 count: 1
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query:SELECT users.* FROM users  WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00041103363037109
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query:SELECT u1.first_name, u1.last_name from users  u1, users  u2 where u1.id = u2.reports_to_id AND u2.id = '1' and u1.deleted=0
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00029110908508301
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] SugarBean[User].load_relationships, Loading relationship (reports_to_link).
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query:SELECT 
                    ea.email_address,
                    ea.email_address_caps,
                    ea.invalid_email,
                    ea.opt_out,
                    ea.confirm_opt_in,
                    ea.date_created,
                    ea.date_modified,
                    ear.id,
                    ear.email_address_id,
                    ear.bean_id,
                    ear.bean_module,
                    ear.primary_address,
                    ear.reply_to_address,
                    ear.deleted
                FROM email_addresses ea LEFT JOIN email_addr_bean_rel ear ON ea.id = ear.email_address_id
                WHERE 
                    ear.bean_module = 'Users'
                    AND ear.bean_id = '1'
                    AND ear.deleted = 0
                ORDER BY ear.reply_to_address, ear.primary_address DESC
Mon Mar  1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00042009353637695
Mon Mar  1 13:43:06 2021 [19][-none-][DEBUG] Hook called: Users::after_retrieve
Mon Mar  1 13:43:06 2021 [19][1][FATAL] API Exception detected:
Message was: The required option "data" is missing.
Exception details:

Code:0
/var/www/html/vendor/symfony/options-resolver/OptionsResolver.php:660
Trace:
#0 /var/www/html/Api/V8/Param/BaseParam.php(46): Symfony\Component\OptionsResolver\OptionsResolver->resolve(Array)
#1 /var/www/html/Api/V8/Middleware/ParamsMiddleware.php(47): Api\V8\Param\BaseParam->configure(Array)
#2 /var/www/html/Api/V8/Factory/ParamsMiddlewareFactory.php(37): Api\V8\Middleware\ParamsMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#3 [internal function]: Api\V8\Factory\ParamsMiddlewareFactory->Api\V8\Factory\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#4 /var/www/html/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array)
#5 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#6 /var/www/html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#7 /var/www/html/vendor/league/oauth2-server/src/Middleware/ResourceServerMiddleware.php(53): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#8 [internal function]: League\OAuth2\Server\Middleware\ResourceServerMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#9 /var/www/html/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(League\OAuth2\Server\Middleware\ResourceServerMiddleware), Array)
#10 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#11 /var/www/html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#12 /var/www/html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#13 /var/www/html/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#14 /var/www/html/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#15 /var/www/html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#16 /var/www/html/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 /var/www/html/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#18 /var/www/html/Api/index.php(4): Slim\App->run()
#19 {main}

Mon Mar  1 13:43:06 2021 [19][1][DEBUG] Hook called: ::server_round_trip
Mon Mar  1 13:43:06 2021 [19][1][DEBUG] Calling MySQLi::disconnect()

Possible Fix

Steps to Reproduce

1.make request

POST https://xxx/Api/V8/module
Authorization: Bearer XXX

    {
      "data": {
        "type": "Accounts",
        "attributes": {
          "name": "Test account"
        }
      }
    }

Context

Your Environment

  • SuiteCRM Version used: 7.11.18
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): ---
  • Environment name and version (e.g. MySQL, PHP 7): php7.3 (7.3.27-1~deb10u1)
  • Operating System and version (e.g Ubuntu 16.04): debian buster
Originally created by @opravil-jan on GitHub (Mar 1, 2021). #### Issue I’m trying create account using an example in https://docs.suitecrm.com/developer/api/developer-setup-guide/json-api/#_authentication, but I’m getting error. #### Expected Behavior I'm expecting get response created with status code 201 #### Actual Behavior Getting error ``` { "errors": { "status": 400, "title": null, "detail": "The required option \"data\" is missing." } } ``` Stack trace in suitecrm.log ``` Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] current_language is: en_us Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheAPC Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheZend Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCachesMash Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheFile Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheMemcached Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheMemory Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Using cache backend SugarCacheMemory, since 999 is less than 1000 Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheWincache Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheMemcache Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Found cache backend SugarCacheRedis Mon Mar 1 13:42:57 2021 [18][-none-][INFO] Found language file: en_us.lang.php Mon Mar 1 13:42:57 2021 [18][-none-][INFO] Found extended language file: en_us.lang.ext.php Mon Mar 1 13:42:57 2021 [18][-none-][WARN] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone="UTC" in php.ini! Mon Mar 1 13:42:57 2021 [18][-none-][INFO] Query:SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = 'Active' and deleted = 0 Mon Mar 1 13:42:57 2021 [18][-none-][INFO] Query Execution Time:0.00052905082702637 Mon Mar 1 13:42:57 2021 [18][-none-][INFO] Query:SELECT category, name, value FROM config Mon Mar 1 13:42:57 2021 [18][-none-][INFO] Query Execution Time:0.00049519538879395 Mon Mar 1 13:42:57 2021 [18][-none-][INFO] Query:SELECT id FROM outbound_email WHERE type = 'system' AND deleted = 0 Mon Mar 1 13:42:57 2021 [18][-none-][INFO] Query Execution Time:0.00047492980957031 Mon Mar 1 13:42:57 2021 [18][-none-][INFO] Query:SELECT * FROM outbound_email WHERE id = '730f58f3-c6c1-994b-215c-6037b200e52a' Mon Mar 1 13:42:57 2021 [18][-none-][INFO] Query Execution Time:0.00056695938110352 Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Hook called: ::after_entry_point Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Including module specific hook file for custom/modules Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Including Ext hook file for custom/application Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Hook called: ::after_session_start Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Unable to find SugarController:: get Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Hook called: ::server_round_trip Mon Mar 1 13:42:57 2021 [18][-none-][DEBUG] Calling MySQLi::disconnect() Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] current_language is: en_us Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheAPC Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheZend Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCachesMash Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheFile Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheMemcached Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheMemory Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Using cache backend SugarCacheMemory, since 999 is less than 1000 Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheWincache Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheMemcache Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Found cache backend SugarCacheRedis Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Found language file: en_us.lang.php Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Found extended language file: en_us.lang.ext.php Mon Mar 1 13:43:06 2021 [19][-none-][WARN] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone="UTC" in php.ini! Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query:SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = 'Active' and deleted = 0 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00039386749267578 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query:SELECT category, name, value FROM config Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00038290023803711 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query:SELECT id FROM outbound_email WHERE type = 'system' AND deleted = 0 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.0003049373626709 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query:SELECT * FROM outbound_email WHERE id = '730f58f3-c6c1-994b-215c-6037b200e52a' Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00038385391235352 Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Hook called: ::after_entry_point Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Including module specific hook file for custom/modules Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Including Ext hook file for custom/application Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/slim.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/controllers.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/factories.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/globals.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/helpers.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/middlewares.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/params.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/services.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/validators.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/services.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom file is not exists: custom/application/Ext/Api/V8/beanAliases.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Custom routes file is not exists: custom/application/Ext/Api/V8/Config/routes.php Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Retrieve OAuth2Tokens: SELECT oauth2tokens.* FROM oauth2tokens WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0 Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Limit Query:SELECT oauth2tokens.* FROM oauth2tokens WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0 Start: 0 count: 1 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query:SELECT oauth2tokens.* FROM oauth2tokens WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0 LIMIT 0,1 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00049114227294922 Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] get_user_array query: SELECT id, first_name, last_name, user_name FROM users WHERE 1=1 ORDER BY user_name ASC Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query:SELECT id, first_name, last_name, user_name FROM users WHERE 1=1 ORDER BY user_name ASC Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00031304359436035 Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Retrieve OAuth2Tokens: SELECT oauth2tokens.* FROM oauth2tokens WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0 Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Limit Query:SELECT oauth2tokens.* FROM oauth2tokens WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0 Start: 0 count: 1 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query:SELECT oauth2tokens.* FROM oauth2tokens WHERE access_token = '6d6c147bf05dbb61ccc584b7f5b2438ee2be197d74edb42d48000125dc9c66cb3e76963dea2bffea' AND deleted=0 LIMIT 0,1 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00050687789916992 Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Hook called: Users::before_retrieve Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Including module specific hook file for custom/modules/Users Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Retrieve User : SELECT users.* FROM users WHERE users.id = '1' AND users.deleted=0 Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Limit Query:SELECT users.* FROM users WHERE users.id = '1' AND users.deleted=0 Start: 0 count: 1 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query:SELECT users.* FROM users WHERE users.id = '1' AND users.deleted=0 LIMIT 0,1 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00041103363037109 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query:SELECT u1.first_name, u1.last_name from users u1, users u2 where u1.id = u2.reports_to_id AND u2.id = '1' and u1.deleted=0 Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00029110908508301 Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] SugarBean[User].load_relationships, Loading relationship (reports_to_link). Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query:SELECT ea.email_address, ea.email_address_caps, ea.invalid_email, ea.opt_out, ea.confirm_opt_in, ea.date_created, ea.date_modified, ear.id, ear.email_address_id, ear.bean_id, ear.bean_module, ear.primary_address, ear.reply_to_address, ear.deleted FROM email_addresses ea LEFT JOIN email_addr_bean_rel ear ON ea.id = ear.email_address_id WHERE ear.bean_module = 'Users' AND ear.bean_id = '1' AND ear.deleted = 0 ORDER BY ear.reply_to_address, ear.primary_address DESC Mon Mar 1 13:43:06 2021 [19][-none-][INFO] Query Execution Time:0.00042009353637695 Mon Mar 1 13:43:06 2021 [19][-none-][DEBUG] Hook called: Users::after_retrieve Mon Mar 1 13:43:06 2021 [19][1][FATAL] API Exception detected: Message was: The required option "data" is missing. Exception details: Code:0 /var/www/html/vendor/symfony/options-resolver/OptionsResolver.php:660 Trace: #0 /var/www/html/Api/V8/Param/BaseParam.php(46): Symfony\Component\OptionsResolver\OptionsResolver->resolve(Array) #1 /var/www/html/Api/V8/Middleware/ParamsMiddleware.php(47): Api\V8\Param\BaseParam->configure(Array) #2 /var/www/html/Api/V8/Factory/ParamsMiddlewareFactory.php(37): Api\V8\Middleware\ParamsMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route)) #3 [internal function]: Api\V8\Factory\ParamsMiddlewareFactory->Api\V8\Factory\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route)) #4 /var/www/html/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(Closure), Array) #5 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route)) #6 /var/www/html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route)) #7 /var/www/html/vendor/league/oauth2-server/src/Middleware/ResourceServerMiddleware.php(53): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response)) #8 [internal function]: League\OAuth2\Server\Middleware\ResourceServerMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure)) #9 /var/www/html/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Object(League\OAuth2\Server\Middleware\ResourceServerMiddleware), Array) #10 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure)) #11 /var/www/html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure)) #12 /var/www/html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response)) #13 /var/www/html/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response)) #14 /var/www/html/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response)) #15 /var/www/html/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response)) #16 /var/www/html/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response)) #17 /var/www/html/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response)) #18 /var/www/html/Api/index.php(4): Slim\App->run() #19 {main} Mon Mar 1 13:43:06 2021 [19][1][DEBUG] Hook called: ::server_round_trip Mon Mar 1 13:43:06 2021 [19][1][DEBUG] Calling MySQLi::disconnect() ``` #### Possible Fix #### Steps to Reproduce 1.make request ``` POST https://xxx/Api/V8/module Authorization: Bearer XXX { "data": { "type": "Accounts", "attributes": { "name": "Test account" } } } ``` #### Context #### Your Environment * SuiteCRM Version used: 7.11.18 * Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): --- * Environment name and version (e.g. MySQL, PHP 7): php7.3 (7.3.27-1~deb10u1) * Operating System and version (e.g Ubuntu 16.04): debian buster
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4491
No description provided.