Ana içeriğe atla

Postman-1

API stands for Application Programming Interface. Sometimes it is also called Application Program Interface.

An interface can be thought of as a contract because it defines a set of rules that must be followed in order for two entities to communicate or interact with each other. An API defines a set of rules and protocols for how one system can access and make use of the functionality and data provided by another system.

A web API is a set of rules and protocols that define how two systems can communicate with each other over the internet. It allows one system (such as a server) to expose certain functionality or data to other systems (such as mobile application). Web APIs are typically accessed over HTTP or HTTPS, and they can use a variety of data formats (such as JSON or XML) to exchange information. They are often used to enable integrations between different systems, or to allow developers to build applications that interact with a web-based service or platform.

The API documentation can be a valuable resource for anyone who is working with APIs, as it can help you understand how to use the API effectively, troubleshoot any issues that may arise, and learn about the different features and capabilities of the API.

A space and any other characters at the end of an address are encoded and sent with the request. This often leads to a 404 Not found error.

In HTTP, a status code of 200 OK indicates that the request was successful and the server was able to fulfill the request. This is the most common status code that is returned in response to a successful request.

To ensure the highest level of accuracy and avoid typos, it is generally safer to copy and paste the API endpoint and parameters from the API documentation.

From the perspective of how we interact with APIs in Postman, there is no difference between HTTP and HTTPS. HTTP and HTTPS (HTTP Secure) are both protocols for transferring data over the internet. The main difference between the two is that HTTPS uses an encrypted connection to secure the transmission of data, while HTTP does not. When you make a request to an API in Postman, URL specifies the protocol to use (such as HTTP or HTTPS). Regardless of whether you use HTTP or HTTPS in the URL, the way you use Postman to make the request and inspect the response will be essentially the same.

Unresolved variable: Postman bu degiskeni nereden alacagini bilmiyor. Collection`a dahil etmemissin demek.
Base url gibi bir degiskenin var: Current value, Postmanin gonderdigi deger. Mesela sifreni degisken yaptiginda baskasinin gormesini istemedigin icin onu Current Value ya yazmalisin. Initial value kismina da `Buraya sifreni gir` gibi bir yazi yazabilirsin. 2sinin farki, 1i herkesle paylasilir, 1i sana ozeldir. Postman, current value yi kullanir.

Variables in Postman allow for efficient value storage and reuse across multiple requests, especially useful when a value needs frequent updates. Using variables eliminates the need to update each request individually. Another benefit of using variables in Postman is that it allows you to store sensitive information, such as passwords or API keys, in a secure and centralized location. Variables in Postman can also be used to automate certain tasks and reduce manual input, which can help to increase efficiency and reduce errors.

If you open the Postman console and the variable is shown in the URL, it means that Postman could not resolve the variable. Because URLs are NOT case sensitive, any unresolved variables will appear in lowercase.

If Postman can't resolve a variable, it won't be replaced in the request and the invalid information may lead the request to fail.

URL=Uniform Resource Locator

Sorgu parametresi zorunlu degilse, Postman format duzgun oldugu surece sana hata vermez ama sorgunun sonucunu degil hepsini gonderir.

An endpoint is a specific URL that serves as the entry point for interacting with a particular resource (for example, one specific product) or set of resources (for example, a list of products). Endpoints are typically defined for each resource that the API exposes. In other words, each resource will have its own uniquely identifiable address.

Most APIs are sensitive about how query parameters are written. So generally-speaking, query parameters are case-sensitive. Some APIs may handle query parameters as case-insensitive because it is more convenient and less error-prone. But this is not a rule. You should always check the API documentation to see how the query parameters are written.
This endpoint supports only one category at a time. Every API is designed and built differently. This is why it is essential to study the API documentation and to understand what is the intended usage of the API. 

Her Api bir filtre icin 2 deger kabul etmeyebilir, request url sinde.

REST is an architectural style. There is no set rule on whether to have a query parameter as mandatory or optional. This depends on API design.

What does the following JSON-encoded response body represent?
[]
This is a representation of an empty list of data objects in JSON. This is not considered an error and the status code should be 200 OK.

JSON is a lightweight, easy-to-read every by humans and is supported in virtually all major programming languages. It simplified the machine to machine communication.

Query parameters are present only in the request. The response typically is an object with properties. You may find query parameters that have the same name as a property from the body, but this is not mandatory.

Path variables in an REST API endpoint are used to specify a unique identifier for a resource.

If no value is specified, the :productId placeholder will not be replaced by Postman and sent as it is to the API. You can observe this in the Postman console.

Both 200 OK and 201 Created are valid status codes for this case. Which code is returned depends on the API design.

Eger Headers`a zaten var olan birisinin aynisindan ekleyeceksen onun uzerine yazar bu yenisini ama Authorization icin baska birsey yapman lazim. Ilgili istegin Authorization tab indan yani `Inherit..` ya da `No Auth` u secip kendininkini ekleyebilirsin.

APIs implement request methods differently. While one API may use PUT/PATCH for updating a resource, another API might use POST. For this reason, it is best to check the API documentation first.
Javascript
You cannot start a String with a backtick and end it with a single quote. 
NaN=Not a Number

Yorumlar

Bu blogdaki popüler yayınlar

Selenium Actions Sınıfını Kullanarak Klavye ve Fare İşlemleri

Karmaşık kullanıcı hareketlerini (sağ tıklama, iki kere tıklama, sürükleme,...) taklit etmek için kullanılan API. Doğrudan Klavye veya Fare kullanmak yerine bu sınıf kullanılır. Build patternini uygular: yöntem çağrıları tarafından belirtilen tüm eylemleri içeren bir CompositeAction oluşturur. Kullanıcı hareketlerini uygulayan fonksiyonları kullanmak için Actions ve Action sınıfını import etmek gerekir: Actions sınıfı ve Action sınıfı, WebDriver API'sinin org.openqa.selenium.Interactions paketinde bulunur. import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.interactions.Action; Yöntemlerini kullanmaya çağırmak için Actions sınıfı nesnesine ihtiyaç vardır.  Actions actions = new Actions(WebDriver nesnesi); Üzerinde işlem yapılacak elementi bulmak gerekiyor. WebElement webElement = driver.findElement(...);  actions.contextClick(webElement).perform(); //contextClick, element üzerinde sağ tıklar. Bu sınıfının bazı fonksiyonları:

TestNG - Notasyonlar (Annotations), Doğrulamalar (Assertions)

TestNG, JUnit ve NUnit kütüphanelerinden etkilenen ve onlara göre daha fazla yetkinlik barındıran bir test kütüphanesidir. TestNG ait özellikler ve kolaylıklar için şunları örnek verebiliriz: Notasyonlar (Annotations) Testlerin kendine has Thread’lerde koşabilmesi testng.xml dosyasıyla testlerin önceliklendirilmesi, gruplandırılması vb. kolaylıklar Kendi içerisinde loglama, raporlama desteği Notasyonlar sayesinde kodun ve oluşturulan raporun kolaylıkla anlaşılması @DataProvider notasyonu sayesinde veriye dayalı test desteği (Data Driven Test) Maven, Jenkins vb. ide ler için eklenti desteği Parametre desteği Notasyonlar: @Test Notasyonu Yazılan otomasyon kodunda test olarak çalışmasını istediğimiz kod parçasının önüne bu notasyonu ekleriz. Bu notasyonu birden fazla kez kullanabiliriz. Eğer herhangi bir parametre tanımlanmadıysa testler alfabetik olarak çalışır.  Aşağıdaki parametreler, hangi testin hangi sırayla çalışacağının, koşturulup koşturulmayacağının,

Selenium WebDriver - Dinamik Web Tablolarla Kod Örnekleri

Verisi sürekli değişen tablolarda XPath kullanılması gerekir. Bunu da tablonun satır ve sütun sayı bilgileriyle yapmak daha doğru olur. Tablo 1: Şirket Grup Kapanış Şimdiki Ücret % Değişim IL&FS Transportation A 337.4 66.5 + 5.4 GRUH Finance Li A 383.8 998.9 + 2.3 IDFC Bank A 351.4 715.9 + 5.1 YES Bank Ltd. A 697.9 669.3 + 3.2 IRB Infrastructure A 271 724.8 + 3.1 Escorts Ltd. A 113.4 890.3 + 5.1 Cox & Kings L A 867 900.8 + 5.5 Bharat Electroni A 176.5 849 + 7.5 Nestle India A 64.8 187.3 + 7.6 Cox & Kings L A 749.4 729.5 + 9.5 JK Tyre & Industries A 687 601.4 + 6 Navin Fluorine Inter A 416.7 865.3 + 8.9 NIIT Technologies A 966.9 117.2 + 9.4 DCB Bank A 853.2 760.2 + 2.4 UCO Bank A 358 719.6 + 9 Coffee Day Enterpris A 53.8 538.6 + 4.1 Kirloskar Oil Engine A 134.1 102.8 + 7.7 Repco Home Finance L A 96.2 449.9 + 8.9 Ajanta Pharma Lt A 161.3 838 + 4.4 CESC Ltd. A 817 490.5 + 4.7 JaiprakashAssociates A 247.3 961.1 + 7.1 Vakrangee A 888.3 652.9