{ "filename": "test.txt", "categories": [407, 406] }Response:
{
"error": {
"code": null,
"message": "Internal Server Error"
}
}
Request returns "Internal Server Error"
[2019-07-26 23:16:37] api[].ERROR: Directus\Exception\UnauthorizedException: Unauthorized request in /server/html/directus/src/helpers/app.php:270
Stack trace:
#0 /server/html/directus/vendor/slim/slim/Slim/App.php(530): Directus\{closure}
#1 /server/html/directus/src/core/Directus/Application/Http/Middleware/CorsMiddleware.php(66): Slim\App->__invoke
#2 [internal function]: Directus\Application\Http\Middleware\CorsMiddleware->__invoke
#3 /server/html/directus/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array
#4 [internal function]: Slim\DeferredCallable->__invoke
#5 /server/html/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func
#6 /server/html/directus/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}
#7 /server/html/directus/vendor/slim/slim/Slim/App.php(405): Slim\App->callMiddlewareStack
#8 /server/html/directus/vendor/slim/slim/Slim/App.php(313): Slim\App->process
#9 /server/html/directus/src/core/Directus/Application/Application.php(161): Slim\App->run
#10 /server/html/directus/public/index.php(5): Directus\Application\Application->run [] []
master branchSomeone on Slack suggested I observe what /app does when creating a new item and it's very unecpected in my opinion but it does work.
App payload:
{"filename":"test.txt","categories":[{"files_categories_id":{"id":407,"name":"testcat1"}}]}
I'll leave the issue open though as I couldn't find any documentation on this and I'm not sure if it's the best solution...
I am closing this as it is not an API related but a DOC specific issue. I send PR(https://github.com/directus/docs/pull/179)
There are a lot of open tickets in the docs right now, can you update the docs for these tickets at you go @bjgajjar ? That way we know they're getting resolved and not just getting shifted to a different repo.
@benhaynes
That's what I am doing right now. Please check I added 2 PR in DOC repo :)
Haha, just saw that!! Thanks! 馃槈