{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • BaaS/Usergrid /
avatar image
1
Question by phani b madgula · Aug 11, 2017 at 01:16 PM · 94 Views collections

APIBaas Usage Titbits

There are some titbits that help to make your experience with API BaaS collections easy and faster.

  • Use name property in the entities of BaaS collections. The value of name is unique in a BaaS collection across entities.
  • The value of the name property could be anything that is user defined and meaningful for the application. The only criterion is that it should be unique.
  • For example, if the name of the collection is stores then the value of the name property could be unique ID of a store. Below is an example of the stores collection.
GET <baas_app_name>/stores
{
"UUID":"sasasdxxx"
"name":"store_ID_1",
"store_name":"ABC",
"region:": "AP"
..
},
{
"UUID":"erdfdfccvxxx"
"name":"store_ID_2",
"store_name":"EFG",
"region:": "EU"
..
}
  • Note that in the above collection stores, each entity should have a unique value for the name property.
  • Like UUID, the value of name property can be used to retrieve the entity by using the the following API call.
GET <baas_app_name>/stores/<value_of_name> 

For example, using the above collection, we can use 

GET <baas_app_name>/stores/store_ID_1 

to retrieve the entity 

{
"UUID":"sasasdxxx"
"name":"store_ID_1",
"store_name":"ABC",
"region:": "AP"
..
}
  • Using the value of the name in the URL as described above will be always faster when compared to using select query as below.
 GET <baas_app_name>/stores?select * where name="store_ID_1" 
  • This is because, the select queries always involve searching elasticsearch index. Whereas value of name in the URL will bypass the elastic search.
  • If there is any latency indexing entities in elasticsearch the select queries fail to retrieve the corresponding entity. However the former approach always will retrieve the entity.
Comment
Add comment Show 1
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Akash Prabhashankar ♦ · Aug 11, 2017 at 02:08 PM 0
Link

Thanks for sharing this @phani b madgula

Close

0 Answers

  • Sort: 

Follow this Question

Answers Answers and Comments

29 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can i know if a property in the entity is full text indexed? 1 Answer

Apigee BaaS Javascript SDK, How to retrieve all collection names ? 1 Answer

i am not able to delete collection through shell 2 Answers

How to retrieve all entities in one collection using android sdk 0 Answers

Is there a way to query a collection for entities that do not contain an attribute? 2 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges