Skip to main content

Insights Service API -test

Project description

## 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**`` Indices, Weather and Yield data can be accessed based on features subscriptions. `` ## 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: ``` /users -GET POST /users/{id} -GET PATCH DELETE ``` 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 : ``If you are a SMARTFARM_PLUS user, you can request for tokens using tenant,username,password `` 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**_ & _**X-Api-Key**_. Info : ``X-Api-Key can be obtained from Step 1 `` Step 5. Query parameters are optional. It filters result based on provided parameter value. ``` e.g. { "size": 300, "page": 0, } e.g. { } ``` Step 6. Click on Execute Curl ``` curl -X 'GET' 'http://localhost:8085/api/v1/crops' -H 'accept: application/json' -H 'TenantType: SMARTRISK' -H 'orgId: test' -H 'X-Api-Key: qwjokooopppp' -H 'Authorization: Bearer jklkopalkddlplplllllllllll2340k' ``` 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 & same can be generated by following API on passing valid request payload (see Token API) ``` POST /tokens ``` 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

insights_python_client-0.0.5.tar.gz (35.0 kB view details)

Uploaded Source

Built Distribution

insights_python_client-0.0.5-py3-none-any.whl (143.8 kB view details)

Uploaded Python 3

File details

Details for the file insights_python_client-0.0.5.tar.gz.

File metadata

File hashes

Hashes for insights_python_client-0.0.5.tar.gz
Algorithm Hash digest
SHA256 a43aa569a66995b298c67b626b986d37997bb5df3b568db0c951ddbcb0b5dfd0
MD5 802f4d9a3c1a39d4d84454190abba520
BLAKE2b-256 d922f86117056efd8e3d016f72e0fc49159a2ee136ce789c3ec92ed7f17391ed

See more details on using hashes here.

File details

Details for the file insights_python_client-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for insights_python_client-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0c9584a498832900be162b74a3bd547ff665d39c61e98de7a25367100cd7aa41
MD5 1c8c7b57c0a24fc96a0b2467b86ad890
BLAKE2b-256 ceedfe61409dff88d241f68ca3f751c758e75987c9f819f49fa194dc6c90f0bb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page