SlideShare a Scribd company logo
Úvod do
FlexiBee REST API
Petr Ferschmann
FlexiBee Systems s.r.o.
Co je FlexiBee?
Obchodní partneři Nákup a prodej Skladová evidence
Majetek a leasing Účetnictví Personalistika
a mzdy
FlexiBee a cloud
Nová architektura
Úvod do
FlexiBee REST API
Petr Ferschmann
FlexiBee Systems s.r.o.
Snadno
začít
REST API
XML import
<winstrom version="1.0">
<faktura-vydana>
<typDokl>code:FAKTURA</typDokl>
<firma>code:WINSTROM</firma>
<popis>Ukázková faktura</popis>
<sumZklZakl>1000.0</sumZklZakl>
<bezPolozek>true</bezPolozek>
</faktura-vydana>
</winstrom>
Ukázka v PHP
require_once("HTTP/Request.php");
$req = new HTTP_Request();
$req->setBasicAuth("winstrom", "winstrom");
$req->setURL(“https://demo.flexibee.eu:5434/c/demo/faktura-vydana.json");
$req->setMethod(GET);
$req->sendRequest();
URL
/c/<identifikátor firmy>/<evidence>/<ID záznamu>.<výstupní formát>
/c/<identifikátor firmy>/<evidence>/(<filtr>).<výstupní formát>
Způsoby integrace
Importy a exporty
Forma odkazu
Jako SQL
Integrace GUI
Identifikace záznamů
123
code:CZK
ext:SHOP:123
ean:4710937332698
vatid:CZ28019920
in:28019920
plu:4020
key:550e8400e29b41d4a716
[123][code:CZK][ext:SHOP:abc]
Typ dokladu
Parametry URL
• Řazení - ?order=nazev@D
• Stránkování ?limit=100&page=20
• Počet záznamů: ?add-row-count=true
• Formát výstupu ?format=pohoda
Detail záznamu
• ?detail=id
• ?detail=summary
• výchozí pro seznam záznamů
• ?detail=full
• výchozí pro detail záznamu
• ?detail=custom:kod,nazev
• ?detail=custom:kod,polozky(nazev,cena)
• ID vždy
• ?detail=custom:...&includes=...
Filtrace
FQL (FlexiBee Query Language)
(typDokl=‘code:FAKTURA’ and uzivatel = me())
Pokročilé XML
<firma if-not-found="null">code:FIRMA</firma>
<faktura create=”ignore”>
<faktura update=”fail”>
Ukázka XML
<winstrom version="1.0">
<adresar update=”ignore”>
<id>ext:MY:firmicka</id>
<id>vatid:CZ123456</id>
<dic>CZ123456</dic>
<nazev>Název firmy</nazev>
</cenik>
<faktura-vydana>
<typDokl>code:FAKTURA</typDokl>
<firma>ext:MY:firmicka</firma>
<popis>Ukázková faktura</popis>
<sumZklZakl>1000.0</sumZklZakl>
<bezPolozek>true</bezPolozek>
</faktura-vydana>
</winstrom>
Navázané objekty
• ?relations=
• polozky
• vazby
• prilohy
• sklad-karty
• Seznam vazeb lze získat na adrese
/c/firma/<evidence>/relations
• ?includes=…
<stat>code:CZ</stat>
• ?includes=/adresar/stat
<stat><stat><id>...</id>...</stat></stat>
FlexiBee Developers Day 2014 - úvod do rest api

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

FlexiBee Developers Day 2014 - úvod do rest api

Editor's Notes

  1. Než začneme řeknu něco o FlexiBee. Je to účetnictví: - pro Linux, Windows a Mac OS X - umí sklady, mzdy, majetek, apod. - má desktopovou aplikaci, mobilní přístup a webový přístup - má otevřené programátorské rozhraní REST API. - umí fungovat přes internet. Ještě jednou zopakuji – aplikace už uměla komunikovat přes internet.
  2. Konkurence je Pohoda, Money S3 a S4, Abra G1, G2 a trochu G3
  3. volské oko :-)
  4. lineární vs logaritmická složitost lineární na disku (ten je levný) lineární na počet současných požadavků (každý trvá 5 vteřin). logaritmická na počet instalací, počet klientů cloud má nedostatek aktuálního výkonu, ale hodně výkonu celkem - optimalizace pro odloženou realizaci           - selhání je standard - klientské aplikace s tím musí počítat           - OBRÁZEK: průměr za 5 minut vs průměr za 5 vteřin
  5. Uvažovali jsme zda nepoužít nějakou platformu. Bohužel zatím žádná z nich nepodporuje PostreSQL. A současně běží daleko. Naše specializovaná aplikace je citlivá na latenci (provádí mnoho volání). Proto je i irsko příliš daleko. Museli jsme proto zatím aplikaci provozovat jen na vlastní infrastruktuře. Na tomto obrázku je vidět, že máme vždy tři repliky (jedna z nich je master) pro databázové úložiště. Těch databázových úložišť je více. Každé úložiště je v RAIDu. Takže od každých dat máme 6 kopií. A to nepočítám zálohy. Každý megabajt máme cca desetkrát. Dále máme více aplikačních serverů. Každý z nich se může napojit na libovolné databázové úložiště dle firmy. Před tím jsou postaveny dva loadbalancery, které rozhazují zátěž na aplikační servery a sledují jejich životnost. Je zde maximální snaha, aby vždy stejný klient šel stejnou cestou. Tím můžeme cachovat některá data. První věc a nejzásadnější byla úprava aplikace tak, aby mohlo na jednom serveru běžet více klientů. Znamená to načtení dat o firmě při prvním požadavku a jen její krátké cachování. Nemůžeme si tedy moc věcí přednačítat a musíme tomu podvolit vývoj. Prostě si nemůže aplikační server nahrát pár megabajtů dat a ty pak držet dlouho. Museli jsme také upravit všechny části tak, aby byly maximálně bezstavové. Přepsali jsme třeba ochranu proti CSRF a je kompletně bezstavová – používá cookie.
  6. Samodokumentace Browser je nástroj Podívám se jak to funguje.
  7. Doklad je idempotentní. Import lze opakovat. Uvádíme jen to co měníme. I povinné atributy není nutné vyplňovat, protože se dopočtou/doplní Podporujeme formáty: XML, JSON, CSV, DBF, XLS, PDF, ISDOC, EDI, vCard, iCalendar, HTML. Umíme importovat i gigové XML (více než je RAM).
  8. Nejjednodušší - vyžaduje účet ve FlexiBee
  9. Nejjednodušší - vyžaduje účet ve FlexiBee
  10. Informační systém se autorizuje do FlexiBee.
  11. Informační systém může říct - toto je uživatel Jarda. Lze tak použít single sign-on.
  12. Externí identifikátory používáme i pro importy. Uděláme velké XML a tím se pak odkazujeme.
  13. Doklad je idempotentní. Import lze opakovat. Uvádíme jen to co měníme. I povinné atributy není nutné vyplňovat, protože se dopočtou/doplní Podporujeme formáty: XML, JSON, CSV, DBF, XLS, PDF, ISDOC, EDI, vCard, iCalendar, HTML. Umíme importovat i gigové XML (více než je RAM).