# إنشاء مستخدمين عبر RESTFUL Users API - تم مسح Users.json

**URL:** <https://meta.discourse.org/t/creating-users-through-restful-users-api-users-json-got-wiped/110362>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [28 فبراير 2019، 4:15م UTC](https://meta.discourse.org/t/creating-users-through-restful-users-api-users-json-got-wiped/110362 "2019-02-28T16:15:59Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ka0sdev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ka0sdev/32/132296_2.png) [@ka0sdev](https://meta.discourse.org/u/ka0sdev)\
**Post date:** [28 فبراير 2019، 4:15م UTC](https://meta.discourse.org/t/creating-users-through-restful-users-api-users-json-got-wiped/110362/1 "2019-02-28T16:15:59Z")

</div>

مرحبًا،

أحاول إنشاء مستخدمين جدد باستخدام واجهة برمجة تطبيقات RESTful للمستخدمين باستخدام الكود التالي:

> [@kevincolten](#):
>
> const fetch = require(‘node-fetch’);  
> const FormData = require(‘form-data’);
> 
> const data = {  
> api\_key: ‘generated key’,  
> api\_username: ‘username’,  
> name: ‘Test User’,  
> email: ‘test@gmail.com’,  
> password: ‘hello12345’,  
> username: ‘testuser-0’  
> };
> 
> const formData = new FormData();  
> for (let key in data) {  
> formData.append(key, data[key]);  
> }
> 
> fetch(‘/users.json’, {  
> method: ‘POST’,  
> body: formData  
> }).then(res =\> {  
> res.json().then(json =\> {  
> console.log(json);  
> }).catch(err =\> {  
> console.log(err);  
> });  
> }).catch(err =\> {  
> console.log(err);  
> });

كان هذا يعمل بلا عيب أمس، وفجأة الآن عند الذهاب إلى  
`<discourse-url>/users.json`

كل ما أراه هو:  
`{"errors":["The requested URL or resource could not be found."],"error_type":"not_found"}`

لسبب ما، تم مسح users.json، ولا أعرف السبب.

هل من الممكن استعادته؟ أم توليد ملف users.json جديد بطريقة ما؟

---

_[View the full topic](https://meta.discourse.org/t/creating-users-through-restful-users-api-users-json-got-wiped/110362)._
