insights-python-client 0.0.5
Insights Service API -test
Keywords: Swagger,Insights Service API -test

    ## Introduction to PlotRisk  PlotRisk is a module, which ease to create plot for the given area of interest and also   facilitate to check satellite indices, weather and yield data.    **Note**&#x60;&#x60;  Indices, Weather and Yield data can be accessed based on features subscriptions.  &#x60;&#x60;  ## Resources  A resource is an entity that has a set of exposed operations. The entity can represent an actual object (account, users..) or a set of logical operations collated together. It is up to the specification user to decide whether sub-resources should be referred to as part of their main resource or as a resource of their own. For example, assume the following URL set:     &#x60;&#x60;&#x60;    /users         -GET                   POST                    /users/{id}    -GET                   PATCH                   DELETE   &#x60;&#x60;&#x60;  For more details, see [CRUD Operations](https://docs.microsoft.com/en-us/iis-administration/api/crud) to learn more about it.  ## Trying the API  You can use [Swagger UI](https://swagger.io/tools/swagger-ui/) or any third party client such as ,[Postman](https://www.postman.com/), [cURL](https://curl.se/) etc. to test the REST API.    **Swagger UI**    **Step 1.** Generate access tokens using **/token** resource      **Info** : &#x60;&#x60;If you are a SMARTFARM_PLUS user, you can request for tokens using tenant,username,password  &#x60;&#x60;    **Step 2.** Copy **_access_token_** from **Step 1**, then click on **Authorize** button and paste the token.    **Step 3.** Select an API resource and click on **_Try it out_**.    **Step 4.** Fill the headers such as _**TenantType**_, _**OrgId**_ &amp; _**X-Api-Key**_.    **Info** : &#x60;&#x60;X-Api-Key can be obtained from Step 1  &#x60;&#x60;    **Step 5.**  Query parameters are optional. It filters result based on provided parameter value.  &#x60;&#x60;&#x60;   e.g.   {           \&quot;size\&quot;: 300,           \&quot;page\&quot;: 0,          }             e.g.   {          }            &#x60;&#x60;&#x60;   **Step 6.** Click on **Execute**    **Curl**  &#x60;&#x60;&#x60;  curl -X &#x27;GET&#x27; \  &#x27;http://localhost:8085/api/v1/crops&#x27; \  -H &#x27;accept: application/json&#x27; \  -H &#x27;TenantType: SMARTRISK&#x27; \  -H &#x27;orgId: test&#x27; \  -H &#x27;X-Api-Key: qwjokooopppp&#x27; \  -H &#x27;Authorization: Bearer jklkopalkddlplplllllllllll2340k&#x27;  &#x60;&#x60;&#x60;  Using a graphical tool such as Postman, it is possible to import the API specifications directly:    - Download the API specification by clicking the **swagger.json** hypelink at top of this document  - Import the JSON specification in the graphical tool of your choice.  - In *Postman*, you can click the import button at the top    ## Authentication  The API authentication process validates the identity of the client attempting to make a connection by using an authentication protocol.  **Access Token** is required to access PlotRisk APIs &amp; same can be generated by following API on passing valid request payload (see Token API)  &#x60;&#x60;&#x60;  POST   /tokens  &#x60;&#x60;&#x60;    For more details, see [Authentication and Authorization](https://swagger.io/docs/specification/authentication/).    ## Errors  The REST API reports errors by returning an appropriate HTTP response code, for example 404 (Not Found), and a JSON response. Any HTTP response code that is not in the range 200 - 299 is considered an error.    For more details on HTTP Status code, see [HTTP Status Codes](https://restfulapi.net/http-status-codes/)   # noqa: E501