COE 558Lecture 03المحاضرة 03Glossaryالمصطلحات
Glossaryالمصطلحات
Every term in Application Programming Interfaces (APIs), defined once and used the same way in every part. Each entry links to the slides where the idea appears.كل مصطلح في محاضرة «واجهات برمجة التطبيقات (APIs)»، معرّف مرة واحدة ومستخدم بالمعنى نفسه في كل الأجزاء. كل مدخل يربطك بالشرائح التي تظهر فيها الفكرة.
- Termsالمصطلحات
- 64
- Lettersالحروف
- 18
#
- 200 OK
Success status code: the request worked and the response carries the result.رمز حالة نجاح: الطلب نجح والرد يحمل النتيجة.
- 400 Bad Request
Client error status code: the server will not process the request because the request itself is malformed or invalid.رمز حالة لخطأ من العميل: الخادم لن يعالج الطلب لأن الطلب نفسه مشوّه الصيغة أو غير صالح.
- 406 Not Acceptable
Client error status code: the server cannot produce a response in any format the client listed in Accept.رمز حالة لخطأ من العميل: الخادم لا يستطيع إنتاج رد بأي صيغة من الصيغ التي سردها العميل في Accept.
- 500 Internal Server Error
Server error status code: an unexpected condition on the server stopped it from completing the request.رمز حالة لخطأ من الخادم: حالة غير متوقعة على الخادم منعته من إكمال الطلب.
- 503 Service Unavailable
Server error status code: the server is temporarily unable to handle the request, for example when overloaded or under maintenance.رمز حالة لخطأ من الخادم: الخادم غير قادر مؤقتًا على معالجة الطلب، مثلًا عند الضغط الزائد overload أو أثناء الصيانة.
A
- Accept header
Request header listing the response formats the client accepts, such as Accept: text/html; a server that cannot produce one may answer 406 Not Acceptable.Header في الطلب يسرد صيغ الرد التي يقبلها العميل، مثل Accept: text/html؛ والخادم الذي لا يستطيع إنتاج أي منها قد يرد بـ 406 Not Acceptable.
- API gateway
An intermediary that receives API requests first and forwards them to the backend servers.وسيط intermediary يستقبل طلبات الـ API أولًا ثم يوجّهها إلى خوادم الخلفية backend.
- API layer (middle layer)
The layer between frontend and backend that fetches backend data for display and takes frontend data to insert into the backend.الطبقة الوسطى بين الواجهة الأمامية frontend والخلفية backend، تجلب بيانات الخلفية لعرضها، وتأخذ بيانات الواجهة الأمامية لإدخالها في الخلفية.
- Application Programming Interface (API)
The interface that lets one software component call another: it defines what you can call, independent of how the call travels.الواجهة التي تسمح لمكوّن برمجي باستدعاء مكوّن آخر (API): تحدد ما يمكنك استدعاؤه، بغض النظر عن طريقة انتقال الاستدعاء.
- Architectural style
A set of design constraints a system follows, as opposed to a protocol that fixes message formats.مجموعة من قيود التصميم design constraints التي يلتزم بها النظام، بخلاف البروتوكول الذي يحدد صيغ الرسائل بشكل ثابت.
- Authentication token
A credential in a header that proves who the client is.بيانات اعتماد credential داخل header تثبت هوية العميل، أي من هو.
C
- Cache-Control
Response header stating whether and how long a response may be reused; max-age=60 allows reuse for 60 seconds.Header في الرد يصرّح هل يمكن إعادة استخدام الرد ولأي مدة؛ فـ max-age=60 تسمح بإعادة استخدامه لمدة 60 ثانية.
- Cacheability
Responses state whether and how long they may be reused, for example Cache-Control: max-age=60 for 60 seconds.الردود تصرّح هل يمكن إعادة استخدامها ولأي مدة، مثل Cache-Control: max-age=60 لمدة 60 ثانية.
- Client-server constraint
Separation of responsibilities: the client handles the user interface, the server manages resource state.فصل المسؤوليات: العميل يتولى واجهة المستخدم، والخادم يدير حالة الموارد.
- Code-on-demand
The optional REST constraint: the server may send executable code, such as JavaScript, to extend the client.القيد الاختياري في REST: يمكن للخادم أن يرسل كودًا قابلًا للتنفيذ، مثل JavaScript، لتوسيع قدرات العميل.
- Collection endpoint
A URL naming a set of resources, such as /lamps, where a method acts on all members or creates a new one.URL يشير إلى مجموعة من الموارد، مثل /lamps، حيث تعمل الطريقة على جميع عناصر المجموعة أو تنشئ عنصرًا جديدًا.
- Connection
How the data physically travels between components, provided by the lower network layers under HTTP.الطريقة التي تنتقل بها البيانات فعليًا بين المكوّنات (connection)، وتوفرها طبقات الشبكة السفلى تحت HTTP.
- Content-Length
Header giving the size of the body in bytes.Header يعطي حجم المحتوى body بالبايت bytes.
- Content-Type
Header naming the media type of the body, such as text/html or application/json.Header يحدد نوع الوسائط media type للمحتوى body، مثل text/html أو application/json.
- CRUD
The four basic operations on a resource: Create, Read, Update, Delete.العمليات الأساسية الأربع على المورد: الإنشاء Create، والقراءة Read، والتحديث Update، والحذف Delete.
D
- DELETE
HTTP method for Delete; in the lamp API it disables the lamp rather than removing it.طريقة HTTP للحذف Delete؛ وفي lamp API تقوم بتعطيل المصباح بدلًا من إزالته.
E
- Endpoint
The API on the server, an abstraction of a resource that supports CRUD operations and holds the logic to execute them; reached through a URL.الـ API الموجودة على الخادم، وهي تجريد لمورد resource يدعم عمليات CRUD ويحتوي المنطق اللازم لتنفيذها؛ ويُوصل إليها عبر URL.
G
- GET
HTTP method for Read: returns a representation of a resource without changing it.طريقة HTTP للقراءة Read: تعيد تمثيلًا representation للمورد دون أن تغيّره.
H
- HATEOAS
Hypermedia as the Engine of Application State: responses include links to the actions available next, such as retrieve, update or delete the lamp.Hypermedia as the Engine of Application State: تتضمن الردود روابط للإجراءات المتاحة بعد ذلك، مثل جلب المصباح أو تحديثه أو حذفه.
- Header fields
Name and value lines of metadata in a request or response, such as Host, Accept, Content-Type, Content-Length, Authorization and Cookie.أسطر من البيانات الوصفية metadata على شكل اسم وقيمة في الطلب أو الرد، مثل Host وAccept وContent-Type وContent-Length وAuthorization وCookie.
- Host header
Request header naming the server the request is meant for, such as Host: localhost; HTTP/1.1 requires it.Header في الطلب يحدد الخادم المقصود بالطلب، مثل Host: localhost؛ وهو إلزامي في HTTP/1.1.
- HTTP client
The program that sends HTTP requests to a server, such as a browser or mobile app.البرنامج الذي يرسل طلبات HTTP إلى الخادم، مثل المتصفح أو تطبيق الجوال.
- HTTP method
The verb in a request that says what operation to perform, such as GET, POST, PUT, PATCH or DELETE.الفعل الموجود في الطلب الذي يحدد العملية المطلوب تنفيذها، مثل GET أو POST أو PUT أو PATCH أو DELETE.
- HTTP server
The program that hosts endpoints, receives HTTP requests and returns responses; to the client it is a set of APIs.البرنامج الذي يستضيف الـ endpoints، ويستقبل طلبات HTTP ويعيد الردود؛ وهو بالنسبة للعميل مجموعة من الـ APIs.
I
- Idempotent method
A method whose repeated identical requests leave the same server state as one request; GET, PUT and DELETE are idempotent, POST is not.طريقة إذا تكررت طلباتها المتطابقة تترك الخادم في الحالة نفسها التي يتركها طلب واحد (idempotent)؛ فـ GET وPUT وDELETE من هذا النوع، أما POST فليست كذلك.
- Item endpoint
A URL naming one resource by ID, such as /lamps/123, where a method acts on that single resource.URL يشير إلى مورد واحد بمعرّفه ID، مثل /lamps/123، حيث تعمل الطريقة على هذا المورد وحده.
J
- JSON
JavaScript Object Notation, a text format of key-value pairs commonly used to represent resources in REST APIs.JavaScript Object Notation، صيغة نصية من أزواج مفتاح وقيمة key-value، وتُستخدم عادةً لتمثيل الموارد في REST APIs.
L
- Layered system
Intermediaries such as proxies, API gateways and load balancers may sit between client and server without the client knowing.يمكن أن توجد وسائط intermediaries مثل الـ proxies وAPI gateways وموازنات الحمل load balancers بين العميل والخادم دون أن يعلم العميل بذلك.
- Load balancer
An intermediary that spreads incoming requests across several servers; one of the layers a layered system allows.وسيط intermediary يوزّع الطلبات الواردة على عدة خوادم؛ وهو إحدى الطبقات التي يسمح بها النظام الطبقي layered system.
- localhost
The host name of the machine itself; in the index.html example it names the server the request goes to.اسم المضيف host name للجهاز نفسه؛ وفي مثال index.html يشير إلى الخادم الذي يتجه إليه الطلب.
M
- Manipulation through representations
Second uniform interface sub-constraint: the client changes a resource by sending a representation, such as PATCH /lamps/123 with {"brightness":80}.القيد الفرعي الثاني في الواجهة الموحدة uniform interface: يغيّر العميل المورد بإرسال تمثيل representation له، مثل PATCH /lamps/123 مع {"brightness":80}.
- Media type
The label for a body's format, such as text/html or application/json, carried in Content-Type and Accept.التسمية التي تحدد صيغة المحتوى body، مثل text/html أو application/json، وتُحمل في Content-Type وAccept.
- Message body
The payload after the headers, such as an HTML page or a JSON representation of a resource.المحتوى الفعلي payload الذي يأتي بعد الـ headers، مثل صفحة HTML أو تمثيل JSON لمورد.
P
- PATCH
HTTP method for a partial update, changing only the fields sent, such as brightness alone.طريقة HTTP للتحديث الجزئي، تغيّر فقط الحقول المرسلة، مثل السطوع brightness وحده.
- POST
HTTP method for Create: sent to a collection to create a new resource whose ID the server assigns.طريقة HTTP للإنشاء Create: تُرسَل إلى مجموعة collection لإنشاء مورد جديد يحدد الخادم معرّفه ID.
- Protocol
The agreed rules for how a call is made and answered; for Web APIs this is HTTP.القواعد المتفق عليها لطريقة إجراء الاستدعاء والرد عليه (protocol)؛ وفي Web APIs هذا البروتوكول هو HTTP.
- Proxy
An intermediary that forwards requests and responses between client and server, and may cache responses; one of the layers a layered system allows.وسيط intermediary يمرر الطلبات والردود بين العميل والخادم، وقد يخزّن الردود مؤقتًا cache؛ وهو إحدى الطبقات التي يسمح بها النظام الطبقي layered system.
- PUT
HTTP method for Update or Replace: sends the new state of the resource at a known URL.طريقة HTTP للتحديث أو الاستبدال Update/Replace: ترسل الحالة الجديدة للمورد إلى URL معروف.
Q
- Query string
The part of a URL after '?', made of key=value pairs joined by '&', that passes inputs to the operation.الجزء من الـ URL الذي يأتي بعد '?'، ويتكون من أزواج key=value مفصولة بـ '&'، ويمرر المدخلات إلى العملية.
R
- Representation
A transferable description of a resource's state, usually JSON, sent in request and response bodies.وصف قابل للنقل لحالة المورد، وعادةً يكون بصيغة JSON، ويُرسل في محتوى body الطلبات والردود.
- Request line
The first line of an HTTP request: method, request target (path) and HTTP version, for example GET /index.html HTTP/1.1.السطر الأول في طلب HTTP: الطريقة method، وهدف الطلب request target (المسار)، وإصدار HTTP، مثل GET /index.html HTTP/1.1.
- Resource
Any entity a server manages and exposes, such as a file, user, virtual machine or IoT device, identified by a URI.أي كيان يديره الخادم ويكشفه للعملاء، مثل ملف أو مستخدم أو آلة افتراضية أو جهاز IoT، ويُعرَّف بواسطة URI.
- Resource identification (URIs)
First uniform interface sub-constraint: each resource has a URI that uniquely identifies it, such as /lamps/123 for lamp 123.القيد الفرعي الأول في الواجهة الموحدة uniform interface: لكل مورد URI يعرّفه تعريفًا فريدًا، مثل /lamps/123 للمصباح 123.
- REST (Representational State Transfer)
An architectural style for web APIs introduced by Roy Fielding in 2000 that uses HTTP to build scalable, stateless APIs; a style, not a protocol.نمط معماري لواجهات الويب البرمجية قدّمه Roy Fielding عام 2000، يستخدم HTTP لبناء APIs قابلة للتوسع وعديمة الحالة stateless؛ وهو نمط style وليس بروتوكولًا protocol.
- REST architectural constraints
Six constraints defining REST: client-server, statelessness, cacheability, uniform interface, layered system (all mandatory) and code-on-demand (optional).ستة قيود تعرّف REST: الفصل بين العميل والخادم client-server، وانعدام الحالة statelessness، وقابلية التخزين المؤقت cacheability، والواجهة الموحدة uniform interface، والنظام الطبقي layered system (وكلها إلزامية)، والكود عند الطلب code-on-demand (اختياري).
- REST design elements
The five things to specify when designing a REST API: URL, HTTP request method, response status code, header fields and JSON message.الأمور الخمسة التي يجب تحديدها عند تصميم REST API: الـ URL، وطريقة طلب HTTP، ورمز حالة الرد status code، وحقول الـ header، ورسالة JSON.
- Route
An HTTP method combined with a URL path that selects one operation on an endpoint.طريقة HTTP مقترنة بمسار URL، وتحدد عملية واحدة على الـ endpoint.
S
- Self-descriptive message
A message whose method, headers and body carry everything needed to understand it, such as PATCH with Content-Type: application/json.رسالة تحمل طريقتها method وheaders ومحتواها body كل ما يلزم لفهمها، مثل PATCH مع Content-Type: application/json.
- Statelessness
The server keeps no client session data; every request carries all information needed to process it, including IDs and authentication.الخادم لا يحتفظ بأي بيانات جلسة session للعميل؛ وكل طلب يحمل كل المعلومات اللازمة لمعالجته، بما فيها المعرّفات IDs والمصادقة authentication.
- Status code
A three-digit number from 100 to 599 telling the client the outcome: 2xx success, 4xx client error, 5xx server error.رقم من ثلاث خانات بين 100 و599 يخبر العميل بنتيجة الطلب: 2xx نجاح، و4xx خطأ من العميل، و5xx خطأ من الخادم.
- Status line
The first line of an HTTP response: HTTP version, status code and status message, for example HTTP/1.1 200 OK.السطر الأول في رد HTTP: إصدار HTTP، ورمز الحالة status code، ورسالة الحالة status message، مثل HTTP/1.1 200 OK.
- Status message
The short human-readable text after the status code in the status line, such as OK after 200.النص القصير المقروء للإنسان الذي يأتي بعد رمز الحالة في سطر الحالة status line، مثل OK بعد 200.
U
- Uniform interface
Standardized interaction through four sub-constraints: resource identification by URIs, manipulation through representations, self-descriptive messages and HATEOAS.تفاعل موحد قياسي عبر أربعة قيود فرعية: تعريف الموارد بواسطة URIs، والتعامل مع الموارد عبر التمثيلات representations، والرسائل ذاتية الوصف self-descriptive messages، وHATEOAS.
- URI
Uniform Resource Identifier, the string that uniquely identifies a resource, such as /lamps/123.المعرّف الموحد للموارد Uniform Resource Identifier، وهو السلسلة النصية التي تعرّف المورد تعريفًا فريدًا، مثل /lamps/123.
- URL
The web address that leads to an endpoint: domain name plus path, optionally followed by a query string, such as http://myHome.com/lamps/123.عنوان الويب الذي يوصل إلى الـ endpoint: اسم النطاق domain name مع المسار path، ويمكن أن يتبعهما query string، مثل http://myHome.com/lamps/123.
V
- Virtual resource
A server-side resource created with POST on /lamps to stand for a newly discovered physical lamp, assigned a unique ID.مورد على جهة الخادم يُنشأ باستخدام POST على /lamps ليمثّل مصباحًا فعليًا اكتُشف حديثًا، ويُعطى معرّفًا فريدًا ID.
W
- Web API
An API exposed over the web and called with HTTP; the Web API is the interface and HTTP is the protocol that carries the calls.واجهة API مكشوفة عبر الويب وتُستدعى باستخدام HTTP؛ فالـ Web API هي الواجهة، وHTTP هو البروتوكول الذي ينقل الاستدعاءات.