SlideShare une entreprise Scribd logo
1  sur  38
Télécharger pour lire hors ligne
Social Networks
       Your Enterprise Social Network   For Enterprises




    Developing using the REST API
1
Agenda


        REST API overview

        REST API services

        OAuth authorization

        Let’s play with the API

        REST API entities

        PHP API client




2
REST API overview


         The REST API gives you access to the most of the features you
         see in our web app and lets you extend them for use in your
         own app. It strives to be RESTful and is organized around the
         main resources you’re familiar with from the Zyncro web
         interface.

         Use our REST API to create applications and web sites that
         natively integrate with Zyncro

         The REST API is a collection of web services, which means that
         you can create Zyncro applications using any modern
         programming language and operating system on any computer
         connected to the Internet.

         OAuth 1.0a protocol is used to provide authorized access to our
         REST API services.

         HTTP REST services use JSON format in their responses.
3
REST API overview


         You access a resource by sending an HTTPS request to the Zyncro
         API server. The server replies with a response that either contains
         the data you requested, or a status indicator, or both.

         The format of the URL to access the API is, for example,
         https://my.sandbox.zyncro.com/api/v1/rest

         HTTP methods separate API actions

            GET is used to retrieve a representation (or, "stuff") from a
            resource or a collection of resources.

            POST is used to create or modify a representation of a
            resource (we do not use PUT).

            DELETE is used to remove the information about a resource.


4
REST API overview


         HTTP status code in responses:

             200 The request was successfully received, understood, and
             accepted.

             4xx An error in the request. Usually a bad parameter.

             5xx The request is fine, but something is wrong on Zyncro’s end.



         Our REST API is split up into different areas, which contain a subset of
         services grouped by functionality.




5
REST API - Use

     We are using the REST API, for example, in these integrations and native apps




6
Play with REST API



                   Show me the money!

         http://apidocs.sandbox.zyncro.com/




7
REST API services


                                         • Manage the organization configuration
          Organization services          • Manage organization's users (add/edit/remove)
             /api/v1/rest/organization   • Edit organization properties
                                         • Only admin users can have access to these services

                                         • Manage user profiles
              Users services             • Access follower/following user lists
                /api/v1/rest/users       • Edit user profile, change user’s profile image
                                         • Follow/Unfollow users

        Microblogging and Activity       • Access and publish in all microblogging, including
         Stream & Inbox services           Personal feed, Corporate feed, Department feeds,
                                           Private messages and Messages from Groups
                 /api/v1/rest/wall       • Access user's inbox events and notifications

                                         • Create new groups
             Groups services             • Download, edit, and upload documents to groups
               /api/v1/rest/groups       • Manage group members, folders and files
                                         • Join/leave open groups




8
REST API services


                                        • Create new departments
          Departments services          • Download, edit, upload documents in departments
            /api/v1/rest/departments    • Manage department members, folders and files
                                        • Follow/unfollow departments

                                        • Manage invitations.
           Invitations services
                                        • Send, accept, decline invitations
             /api/v1/rest/invitations
                                        • Access the list of pending invitations


                                        • Create new tasks.
              Tasks services
                                        • Edit task and access to the tasks of groups
               /api/v1/rest/tasks
                                        • Access to the list of tasks



          ZyncroApps Services           • Manage apps (add/edit/remove)
               /api/v1/rest/apps        • Enable/disable apps




9
OAuth authorization - REST API

                                      1)   Get a Request Token

                                      2)   A User have to authorize the
                                           Request Token

                                      3)   Exchange the authorized
                                           Request Token for an Access
                                           Token

                                      4)   Use the Access Token to
                                           invoke REST API services




10
OAuth types in REST API

     We have three ways of getting an Access Token to invoke REST API services

       Web browser authorization
          Get a Request token
          Authenticate the user using a Zyncro login web page
          Get an Access token

       External service authorization
           Get a Request token
           Authenticate the user using an external service
           Get an Access token

       ZyncroApp authorization
           Use combined with ZyncroApps when the user is already logged in
           Zyncro. We’ll see it while seeing ZyncroApps development.

                                Examples soon to come!

11
Java sample - REST API

     Sample showing how to get the profile of a User using the REST API
 public final static String API_KEY = ...
 public static final String API_SECRET = ...

 public final static String ACCESS_KEY = ...
 public final static String ACCESS_SECRET = ...

 OAuthService service = new ServiceBuilder()
                                      .provider(ZyncroApi.class)
                                      .apiKey(Paths.API_KEY)
                                      .apiSecret(Paths.API_SECRET)
                                      .build();

 OAuthRequest request = new OAuthRequest(
                             Verb.GET,
                             "https://my.sandbox.zyncro.com/api/v1/rest/users/profile");

 Token accessToken = new Token(Paths.ACCESS_KEY, Paths.ACCESS_SECRET);

 service.signRequest(accessToken, request);

 Response response = request.send();
 ...
12
JSON response sample - REST API


        {"object":{
             "appId":"francoscavuzzo-6387",
             "fullName":"Franco Scavuzzo",
             "email":"franco@zyncro.com",
             "name":"Franco",
             "lastname":"Scavuzzo",
             "organizationName":"Zyncro Tech, S.L.",
             "since":"1283158384316",
             "isFollowing":false,
             "isFollowedBy":false,
             "isFollowingActivity":false,
             "isFollowedActivityBy":false,
             "language":"en",
             "organizationUrn":"syncrum:domain:24078705-7041-4a45-ad1d-32fe4d60ee69",
             "companyFeedUrn":"syncrum:sharegroup:63e82dde-885b-4f0d-b6b0-8bdcc50ca3c7",
             "personalFeedUrn":"syncrum:sharegroup:67c4b5c6-f113-4e6c-ac89-ba76993f9388",
             "personalFilesGroupUrn":"syncrum:sharegroup:379ef9fc-ed31-49ad-9d3d-d2141e68cd4c",
             "userStatusInfo":{"userStatus":0,"message":"Trabajando","date":"1354527495871"},
             ….
             "canCreateDepartments":false,
             "isOrganizationAdmin":true,
             "storageOccupied":"143225271",
             "storageAssigned":"1048576000",
        },"result":"OK“}




13
Play with REST API



                Let’s play with the REST API

          http://apidocs.sandbox.zyncro.com/

                          Demo




14
REST API entities




             Event       Inbox Event   Group


         Department       Member       User



15
REST API entities




          Organization   Invitation   Task


                         Document
           Document                   App
                          Version



16
REST API entities


        • All the main entities in API have a unique identifier, normally call
          URN (unique resource identifier)


        • For the attributes that represent date and time, we use UNIX epoch
          representation in milliseconds




17
REST API entities

      An Event represents an activity that has occurred in Zyncro, for example: a user
      has published a new message, a document has been changed, a new group has
      been created…

      Some of the important attributes related with an Event are:

      • Each event has a unique identifier.

      • A date is associated with an event, indicating when it was created.

      • An event is associated with a group or department, or a private message.

      • An event has an author (a user) who has triggered (generated) that event.

      • Each event has an type. The most common type is Comment, that is a
        message that an user has published. Other types are related with events
        such as a new member added, some documents uploaded or deleted, etc.
18
REST API entities


      • The number of child comments that the event has.

      • Information related with the likes the event has received: number of likes
        and the last user who did it.

      • The source of the event gives you information related with the origin of the
        event. This information is useful for developing integrations; for example
        we use it to indicate that the event was generated from a device like an
        Android, iPhone…; or another application Chatter, Yammer…

      • The text related with the event, use the attribute comment (plain text) and
        htmlComment (contains html format text).

      • An extra attribute called payload can be used to store information related
        with the Event in JSON format.

19
REST API entities

       A Group is the more general structure in Zyncro, it is a workspace where
       users share information and communicate.

       Some of the most important attributes related with a Group are:

       • Each group has a unique identifier.

       • The name and description of the group.

       • The owner of the group.

       • The number of members the group has.

       • Whether the group is public or private

       • An extra attribute called payload can be used to store information
         related with the Group in JSON format.
20
REST API entities

       A Department is similar to a group, but it is only visible to all the
       organization users. All comments that are published in a department are
       published in name of the department.

       Some of the most important attributes related with a Department are:

       • Each department has a unique identifier.

       • The name, description, aboutus (and other properties) of the
         department.

       • The owner of the department.

       • An extra attribute called payload can be used to store information
         related with the Group in JSON format.


21
REST API entities

       A User represents a person registered and using Zyncro. Every user
       belongs to an organization.

       Some of the most important attributes related with a User are:

       • Each user has a unique identifier.

       • The name, lastname, email (and other properties) of the user.

       • The current language the user has active.

       • The identifiers of his Company feed, Personal feed and Personal
         group.

       • The identifier of his Organization


22
REST API entities

       • Some of the permissions in the organization: enable publish in
         Company feed, enable to create Groups or Departments


       If retrieving the full profile of user, extra information is included such as

       • Skills, experience and education information

       • Contact details: address, telephone numbers, mobile

       • An extra attribute called payload can be used to store information
         related with the Group in JSON format.




23
REST API entities

       A Member is a user that belongs to a Group or Department with its
       associated permissions.

       Some of the most important attributes related with a Member are:

       • The information included in the User

       • The permission of the User in the Group/Department:
           •   If can publish new messages
           •   If can comment existing messaged
           •   If is owner of the Group/Department
           •   If can add/edit/delete documents
           •   If can invite other users to join
           •   If can add/edit/delete tasks
           •   If can create Zlinks (public links)



24
REST API entities

       Organization, every user in Zyncro belongs to one (and only one)
       organization, that defines the behavior they have in it.

       Some of the most important attributes related with an Organization are:

       • Each organization has a unique identifier.

       • The name, total users and total storage of the organization

       • Basic GUI attributes: header color, header text color, image

       • Configuration attributes such as, if tasks are enable, if message can be
         deleted, if users can comment on company feed…




25
REST API entities

       A Document belongs to a Group or Department.

       Some of the most important attributes related with a Document are:

       • Each document has a unique identifier.

       • The name and description of the document

       • Each event has an type, we have four types of documents:
          • File
          • Folder
          • External link (to an URL)
          • Internal link (to another file in other Group/Department)




26
REST API entities

       • The date and time of creation and last modification

       • The last document version associated with this document

       • The number of versions this document has

       • The member who created the document

       • The member who last modified the document




27
REST API entities

       A DocumentVersion represents a version of a document.

       Some of the most important attributes related with a DocumentVersion
       are:

       • Each document version has a unique identifier.

       • The version number, size and date time of creation

       • The identifier of the group and the document

       • The information regarding the member author of this version




28
REST API entities

       A InboxEvent is a notification that a user received, generated by an
       event.

       Some of the most important attributes related with an Inbox Event are:

       • Each inbox event has a unique identifier.

       • The date and time the inbox event was generated

       • The event associated with the inbox event

       • Each inbox event has an type, these types are:
          • Comment
          • Like
          • Follow


29
REST API entities

       Invitation

       Some of the most important attributes related with an Invitation are:

       • Each invitation has a unique identifier.

       • The date time when the invitation was sent

       • Information about the user who sent and the user whose received the
         invitation

       • The state of the invitation (waiting, cancelled, accepted, rejected)

       • Each invitation has an type, these types are:
          • External contact
          • Group
          • Follow
30
REST API entities

       Task

       Some of the most important attributes related with a Task are:

       • Each task has a unique identifier.

       • The name and description of the task

       • The group identifier where the tasks belongs

       • The status of the task (pending or completed)

       • The due date of the task

       • The user assigned to this task


31
Code samples – REST API

         Some samples using the REST API in several programming languages
                       can be found at github.com/zyncro

             C# (github.com/zyncro/csharp-api-sample)


             Java (github.com/zyncro/java-api-sample)


             PHP (github.com/zyncro/php-api-sample)


             Python (github.com/zyncro/python-api-sample)


           More to come…



32
PHP API client


          We provide a series of PHP classes that you can use to invoke REST
          API services from PHP.


          OAuth authorization is transparent and you do not have to worry
          about it, just choose which type to use.


          https://github.com/zyncro/php-api-client




33
PHP API client - Samples

       •   Web browser authorization

               $dsf->start(new WallApiService($dsf));

               $dsf->controller->zyncroApi->logintype = 'threelegged';

               $response = $dsf->controller->getEvents();



       •   External service authorization

               $dsf->start(new WallApiService($dsf));

               $dsf->controller->zyncroApi->email = $email;
               $dsf->controller->zyncroApi->pass = $pass;
               $dsf->controller->zyncroApi->logintype = 'userpass';

               $response = $dsf->controller->getEvents();

34
PHP API client - Samples

       •   Creating a new Group with the API

           $dsf->start(new GroupApiService($dsf));

           $response = $dsf->controller->createGroup
                           ('A new Group from PHP API', 'The description');




35
PHP API client - Samples

        •   Publishing a new Message in a Group with the API

      $dsf->start(new WallApiService($dsf));

      $response = $dsf->controller->publishInGroup(
                      'syncrum:sharegroup:01e39c19-313e-404c-9d08-64a047eda89c',
                      'Hello plain World!',
                      '<p>Hello <span style="font-weight:bold;
                               color:#ff0000;">enriched</span> World</p>');



        •   Get Events from a Group with the API


     $dsf->start(new WallApiService($dsf));

     $response = $dsf->controller->getGroupEvents(
                     'syncrum:sharegroup:01e39c19-313e-404c-9d08-64a047eda89c');

36
More info


          Zyncro Developers Portal
       http://developers.zyncro.com




37
WWW.ZYNCRO.COM
         Twitter: @zyncro
     blog: en.blog.zyncro.com

38

Contenu connexe

En vedette

B Heck CV 2016-12-01-PERM
B Heck CV 2016-12-01-PERMB Heck CV 2016-12-01-PERM
B Heck CV 2016-12-01-PERMbheck42
 
Business Communication is now social
Business Communication is now socialBusiness Communication is now social
Business Communication is now socialZyncro
 
Zyncro zyncro apps & ui customization feb 2013
Zyncro zyncro apps & ui customization feb 2013Zyncro zyncro apps & ui customization feb 2013
Zyncro zyncro apps & ui customization feb 2013Zyncro
 
Lessons learned on Corporate Social Networks [intra.NET Reloaded 2012]
Lessons learned on Corporate Social Networks [intra.NET Reloaded 2012]Lessons learned on Corporate Social Networks [intra.NET Reloaded 2012]
Lessons learned on Corporate Social Networks [intra.NET Reloaded 2012]Zyncro
 
Slot del Emprendedor Ana Fernández IDC Cloud 2013
Slot del Emprendedor Ana Fernández IDC Cloud 2013 Slot del Emprendedor Ana Fernández IDC Cloud 2013
Slot del Emprendedor Ana Fernández IDC Cloud 2013 Zyncro
 
New trends in Enterprise Social Networks
New trends in Enterprise Social NetworksNew trends in Enterprise Social Networks
New trends in Enterprise Social NetworksZyncro
 
Slot del emprendedor IDC Cloud barcelona
Slot del emprendedor IDC Cloud barcelonaSlot del emprendedor IDC Cloud barcelona
Slot del emprendedor IDC Cloud barcelonaZyncro
 

En vedette (7)

B Heck CV 2016-12-01-PERM
B Heck CV 2016-12-01-PERMB Heck CV 2016-12-01-PERM
B Heck CV 2016-12-01-PERM
 
Business Communication is now social
Business Communication is now socialBusiness Communication is now social
Business Communication is now social
 
Zyncro zyncro apps & ui customization feb 2013
Zyncro zyncro apps & ui customization feb 2013Zyncro zyncro apps & ui customization feb 2013
Zyncro zyncro apps & ui customization feb 2013
 
Lessons learned on Corporate Social Networks [intra.NET Reloaded 2012]
Lessons learned on Corporate Social Networks [intra.NET Reloaded 2012]Lessons learned on Corporate Social Networks [intra.NET Reloaded 2012]
Lessons learned on Corporate Social Networks [intra.NET Reloaded 2012]
 
Slot del Emprendedor Ana Fernández IDC Cloud 2013
Slot del Emprendedor Ana Fernández IDC Cloud 2013 Slot del Emprendedor Ana Fernández IDC Cloud 2013
Slot del Emprendedor Ana Fernández IDC Cloud 2013
 
New trends in Enterprise Social Networks
New trends in Enterprise Social NetworksNew trends in Enterprise Social Networks
New trends in Enterprise Social Networks
 
Slot del emprendedor IDC Cloud barcelona
Slot del emprendedor IDC Cloud barcelonaSlot del emprendedor IDC Cloud barcelona
Slot del emprendedor IDC Cloud barcelona
 

Similaire à Zyncro rest api feb 2013

Rest api titouan benoit
Rest api   titouan benoitRest api   titouan benoit
Rest api titouan benoitTitouan BENOIT
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Atlassian
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Atlassian
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public APIJeff Potts
 
Build your APIs with apigility
Build your APIs with apigilityBuild your APIs with apigility
Build your APIs with apigilityChristian Varela
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
OpenStack Architecture
OpenStack ArchitectureOpenStack Architecture
OpenStack ArchitectureMirantis
 
OpenStack Architecture
OpenStack ArchitectureOpenStack Architecture
OpenStack ArchitectureMirantis
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformAntonio Peric-Mazar
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsTom Johnson
 
Tech talk live on new alfresco api
Tech talk live on new alfresco apiTech talk live on new alfresco api
Tech talk live on new alfresco apiAlfresco Software
 
Building Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIBuilding Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIJeff Potts
 
Why your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSyncWhy your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSyncYan Cui
 
Getting Started with Globus for Developers
Getting Started with Globus for DevelopersGetting Started with Globus for Developers
Getting Started with Globus for DevelopersGlobus
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryKaren Broughton-Mabbitt
 
API Design & Security in django
API Design & Security in djangoAPI Design & Security in django
API Design & Security in djangoTareque Hossain
 
Microservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterMicroservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterC4Media
 
APIs.JSON: Bootstrapping The Web of APIs
APIs.JSON: Bootstrapping The Web of APIsAPIs.JSON: Bootstrapping The Web of APIs
APIs.JSON: Bootstrapping The Web of APIs3scale
 

Similaire à Zyncro rest api feb 2013 (20)

Rest api titouan benoit
Rest api   titouan benoitRest api   titouan benoit
Rest api titouan benoit
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public API
 
Build your APIs with apigility
Build your APIs with apigilityBuild your APIs with apigility
Build your APIs with apigility
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
OpenStack Architecture
OpenStack ArchitectureOpenStack Architecture
OpenStack Architecture
 
OpenStack Architecture
OpenStack ArchitectureOpenStack Architecture
OpenStack Architecture
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIs
 
Tech talk live on new alfresco api
Tech talk live on new alfresco apiTech talk live on new alfresco api
Tech talk live on new alfresco api
 
Building Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIBuilding Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco API
 
Why your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSyncWhy your next serverless project should use AWS AppSync
Why your next serverless project should use AWS AppSync
 
eZ Publish REST API v2
eZ Publish REST API v2eZ Publish REST API v2
eZ Publish REST API v2
 
E zsc2012 rest-api-v2
E zsc2012 rest-api-v2E zsc2012 rest-api-v2
E zsc2012 rest-api-v2
 
Getting Started with Globus for Developers
Getting Started with Globus for DevelopersGetting Started with Globus for Developers
Getting Started with Globus for Developers
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
 
API Design & Security in django
API Design & Security in djangoAPI Design & Security in django
API Design & Security in django
 
Microservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell MonsterMicroservices and the Art of Taming the Dependency Hell Monster
Microservices and the Art of Taming the Dependency Hell Monster
 
APIs.JSON: Bootstrapping The Web of APIs
APIs.JSON: Bootstrapping The Web of APIsAPIs.JSON: Bootstrapping The Web of APIs
APIs.JSON: Bootstrapping The Web of APIs
 

Plus de Zyncro

Zyncro, your Social Business Platform
Zyncro, your Social Business PlatformZyncro, your Social Business Platform
Zyncro, your Social Business PlatformZyncro
 
Infografia: Zyncro como plataforma de Social Business
Infografia: Zyncro como plataforma de Social BusinessInfografia: Zyncro como plataforma de Social Business
Infografia: Zyncro como plataforma de Social BusinessZyncro
 
Webinar: Todo lo que siempre quisiste saber sobre Redes Sociales Corporativas...
Webinar: Todo lo que siempre quisiste saber sobre Redes Sociales Corporativas...Webinar: Todo lo que siempre quisiste saber sobre Redes Sociales Corporativas...
Webinar: Todo lo que siempre quisiste saber sobre Redes Sociales Corporativas...Zyncro
 
Infografía: 6 cosas que no sabias que podias mejorar con Comunicación Interna
Infografía: 6 cosas que no sabias que podias mejorar con Comunicación InternaInfografía: 6 cosas que no sabias que podias mejorar con Comunicación Interna
Infografía: 6 cosas que no sabias que podias mejorar con Comunicación InternaZyncro
 
6 things you didnt know you can improve with Internal Communication
6 things you didnt know you can improve with Internal Communication6 things you didnt know you can improve with Internal Communication
6 things you didnt know you can improve with Internal CommunicationZyncro
 
Beneficios y usos de las Redes Sociales Corporativas. Evento Intel. Madrid Se...
Beneficios y usos de las Redes Sociales Corporativas. Evento Intel. Madrid Se...Beneficios y usos de las Redes Sociales Corporativas. Evento Intel. Madrid Se...
Beneficios y usos de las Redes Sociales Corporativas. Evento Intel. Madrid Se...Zyncro
 
Infografik: 7 typen von internetnutzern, die sie auf einem sozialen unternehm...
Infografik: 7 typen von internetnutzern, die sie auf einem sozialen unternehm...Infografik: 7 typen von internetnutzern, die sie auf einem sozialen unternehm...
Infografik: 7 typen von internetnutzern, die sie auf einem sozialen unternehm...Zyncro
 
Infographie: 7 types d utilisateurs de votre rse
Infographie: 7 types d utilisateurs de votre rseInfographie: 7 types d utilisateurs de votre rse
Infographie: 7 types d utilisateurs de votre rseZyncro
 
Infografía: 7 tipos de usuarios de internet que puedes encontrar en una Red S...
Infografía: 7 tipos de usuarios de internet que puedes encontrar en una Red S...Infografía: 7 tipos de usuarios de internet que puedes encontrar en una Red S...
Infografía: 7 tipos de usuarios de internet que puedes encontrar en una Red S...Zyncro
 
Infographic: 7 types of internet users you encounter when using an Enterprise...
Infographic: 7 types of internet users you encounter when using an Enterprise...Infographic: 7 types of internet users you encounter when using an Enterprise...
Infographic: 7 types of internet users you encounter when using an Enterprise...Zyncro
 
Infografía: La empresa 2.0 por Zyncro
Infografía: La empresa 2.0 por ZyncroInfografía: La empresa 2.0 por Zyncro
Infografía: La empresa 2.0 por ZyncroZyncro
 
Infographic: Enterprise 2.0 by Zyncro
Infographic: Enterprise 2.0 by ZyncroInfographic: Enterprise 2.0 by Zyncro
Infographic: Enterprise 2.0 by ZyncroZyncro
 
Infografía: Zyncro, tu Red Social Corporativa
Infografía: Zyncro, tu Red Social Corporativa Infografía: Zyncro, tu Red Social Corporativa
Infografía: Zyncro, tu Red Social Corporativa Zyncro
 
Infographic: Zyncro, your Enterprise Social Network
Infographic: Zyncro, your Enterprise Social NetworkInfographic: Zyncro, your Enterprise Social Network
Infographic: Zyncro, your Enterprise Social NetworkZyncro
 
Infographic: Zyncro Corporate Activity Stream
Infographic: Zyncro Corporate Activity StreamInfographic: Zyncro Corporate Activity Stream
Infographic: Zyncro Corporate Activity StreamZyncro
 
Infographic: Zyncro Corporate Activity Stream
Infographic: Zyncro Corporate Activity StreamInfographic: Zyncro Corporate Activity Stream
Infographic: Zyncro Corporate Activity StreamZyncro
 
Infographic ROI of Enterprise Social Networks
Infographic ROI of Enterprise Social Networks Infographic ROI of Enterprise Social Networks
Infographic ROI of Enterprise Social Networks Zyncro
 
Infografía: El ROI de las Redes Sociales Corporativas
Infografía: El ROI de las Redes Sociales CorporativasInfografía: El ROI de las Redes Sociales Corporativas
Infografía: El ROI de las Redes Sociales CorporativasZyncro
 
La realidad de las redes sociales corporativas hoy. Congreso E20Biz 2013.
La realidad de las redes sociales corporativas hoy. Congreso E20Biz 2013. La realidad de las redes sociales corporativas hoy. Congreso E20Biz 2013.
La realidad de las redes sociales corporativas hoy. Congreso E20Biz 2013. Zyncro
 
Enterprise Social Network adoption. The reality, april-2013
Enterprise Social Network adoption. The reality, april-2013Enterprise Social Network adoption. The reality, april-2013
Enterprise Social Network adoption. The reality, april-2013Zyncro
 

Plus de Zyncro (20)

Zyncro, your Social Business Platform
Zyncro, your Social Business PlatformZyncro, your Social Business Platform
Zyncro, your Social Business Platform
 
Infografia: Zyncro como plataforma de Social Business
Infografia: Zyncro como plataforma de Social BusinessInfografia: Zyncro como plataforma de Social Business
Infografia: Zyncro como plataforma de Social Business
 
Webinar: Todo lo que siempre quisiste saber sobre Redes Sociales Corporativas...
Webinar: Todo lo que siempre quisiste saber sobre Redes Sociales Corporativas...Webinar: Todo lo que siempre quisiste saber sobre Redes Sociales Corporativas...
Webinar: Todo lo que siempre quisiste saber sobre Redes Sociales Corporativas...
 
Infografía: 6 cosas que no sabias que podias mejorar con Comunicación Interna
Infografía: 6 cosas que no sabias que podias mejorar con Comunicación InternaInfografía: 6 cosas que no sabias que podias mejorar con Comunicación Interna
Infografía: 6 cosas que no sabias que podias mejorar con Comunicación Interna
 
6 things you didnt know you can improve with Internal Communication
6 things you didnt know you can improve with Internal Communication6 things you didnt know you can improve with Internal Communication
6 things you didnt know you can improve with Internal Communication
 
Beneficios y usos de las Redes Sociales Corporativas. Evento Intel. Madrid Se...
Beneficios y usos de las Redes Sociales Corporativas. Evento Intel. Madrid Se...Beneficios y usos de las Redes Sociales Corporativas. Evento Intel. Madrid Se...
Beneficios y usos de las Redes Sociales Corporativas. Evento Intel. Madrid Se...
 
Infografik: 7 typen von internetnutzern, die sie auf einem sozialen unternehm...
Infografik: 7 typen von internetnutzern, die sie auf einem sozialen unternehm...Infografik: 7 typen von internetnutzern, die sie auf einem sozialen unternehm...
Infografik: 7 typen von internetnutzern, die sie auf einem sozialen unternehm...
 
Infographie: 7 types d utilisateurs de votre rse
Infographie: 7 types d utilisateurs de votre rseInfographie: 7 types d utilisateurs de votre rse
Infographie: 7 types d utilisateurs de votre rse
 
Infografía: 7 tipos de usuarios de internet que puedes encontrar en una Red S...
Infografía: 7 tipos de usuarios de internet que puedes encontrar en una Red S...Infografía: 7 tipos de usuarios de internet que puedes encontrar en una Red S...
Infografía: 7 tipos de usuarios de internet que puedes encontrar en una Red S...
 
Infographic: 7 types of internet users you encounter when using an Enterprise...
Infographic: 7 types of internet users you encounter when using an Enterprise...Infographic: 7 types of internet users you encounter when using an Enterprise...
Infographic: 7 types of internet users you encounter when using an Enterprise...
 
Infografía: La empresa 2.0 por Zyncro
Infografía: La empresa 2.0 por ZyncroInfografía: La empresa 2.0 por Zyncro
Infografía: La empresa 2.0 por Zyncro
 
Infographic: Enterprise 2.0 by Zyncro
Infographic: Enterprise 2.0 by ZyncroInfographic: Enterprise 2.0 by Zyncro
Infographic: Enterprise 2.0 by Zyncro
 
Infografía: Zyncro, tu Red Social Corporativa
Infografía: Zyncro, tu Red Social Corporativa Infografía: Zyncro, tu Red Social Corporativa
Infografía: Zyncro, tu Red Social Corporativa
 
Infographic: Zyncro, your Enterprise Social Network
Infographic: Zyncro, your Enterprise Social NetworkInfographic: Zyncro, your Enterprise Social Network
Infographic: Zyncro, your Enterprise Social Network
 
Infographic: Zyncro Corporate Activity Stream
Infographic: Zyncro Corporate Activity StreamInfographic: Zyncro Corporate Activity Stream
Infographic: Zyncro Corporate Activity Stream
 
Infographic: Zyncro Corporate Activity Stream
Infographic: Zyncro Corporate Activity StreamInfographic: Zyncro Corporate Activity Stream
Infographic: Zyncro Corporate Activity Stream
 
Infographic ROI of Enterprise Social Networks
Infographic ROI of Enterprise Social Networks Infographic ROI of Enterprise Social Networks
Infographic ROI of Enterprise Social Networks
 
Infografía: El ROI de las Redes Sociales Corporativas
Infografía: El ROI de las Redes Sociales CorporativasInfografía: El ROI de las Redes Sociales Corporativas
Infografía: El ROI de las Redes Sociales Corporativas
 
La realidad de las redes sociales corporativas hoy. Congreso E20Biz 2013.
La realidad de las redes sociales corporativas hoy. Congreso E20Biz 2013. La realidad de las redes sociales corporativas hoy. Congreso E20Biz 2013.
La realidad de las redes sociales corporativas hoy. Congreso E20Biz 2013.
 
Enterprise Social Network adoption. The reality, april-2013
Enterprise Social Network adoption. The reality, april-2013Enterprise Social Network adoption. The reality, april-2013
Enterprise Social Network adoption. The reality, april-2013
 

Dernier

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Dernier (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Zyncro rest api feb 2013

  • 1. Social Networks Your Enterprise Social Network For Enterprises Developing using the REST API 1
  • 2. Agenda REST API overview REST API services OAuth authorization Let’s play with the API REST API entities PHP API client 2
  • 3. REST API overview The REST API gives you access to the most of the features you see in our web app and lets you extend them for use in your own app. It strives to be RESTful and is organized around the main resources you’re familiar with from the Zyncro web interface. Use our REST API to create applications and web sites that natively integrate with Zyncro The REST API is a collection of web services, which means that you can create Zyncro applications using any modern programming language and operating system on any computer connected to the Internet. OAuth 1.0a protocol is used to provide authorized access to our REST API services. HTTP REST services use JSON format in their responses. 3
  • 4. REST API overview You access a resource by sending an HTTPS request to the Zyncro API server. The server replies with a response that either contains the data you requested, or a status indicator, or both. The format of the URL to access the API is, for example, https://my.sandbox.zyncro.com/api/v1/rest HTTP methods separate API actions GET is used to retrieve a representation (or, "stuff") from a resource or a collection of resources. POST is used to create or modify a representation of a resource (we do not use PUT). DELETE is used to remove the information about a resource. 4
  • 5. REST API overview HTTP status code in responses: 200 The request was successfully received, understood, and accepted. 4xx An error in the request. Usually a bad parameter. 5xx The request is fine, but something is wrong on Zyncro’s end. Our REST API is split up into different areas, which contain a subset of services grouped by functionality. 5
  • 6. REST API - Use We are using the REST API, for example, in these integrations and native apps 6
  • 7. Play with REST API Show me the money! http://apidocs.sandbox.zyncro.com/ 7
  • 8. REST API services • Manage the organization configuration Organization services • Manage organization's users (add/edit/remove) /api/v1/rest/organization • Edit organization properties • Only admin users can have access to these services • Manage user profiles Users services • Access follower/following user lists /api/v1/rest/users • Edit user profile, change user’s profile image • Follow/Unfollow users Microblogging and Activity • Access and publish in all microblogging, including Stream & Inbox services Personal feed, Corporate feed, Department feeds, Private messages and Messages from Groups /api/v1/rest/wall • Access user's inbox events and notifications • Create new groups Groups services • Download, edit, and upload documents to groups /api/v1/rest/groups • Manage group members, folders and files • Join/leave open groups 8
  • 9. REST API services • Create new departments Departments services • Download, edit, upload documents in departments /api/v1/rest/departments • Manage department members, folders and files • Follow/unfollow departments • Manage invitations. Invitations services • Send, accept, decline invitations /api/v1/rest/invitations • Access the list of pending invitations • Create new tasks. Tasks services • Edit task and access to the tasks of groups /api/v1/rest/tasks • Access to the list of tasks ZyncroApps Services • Manage apps (add/edit/remove) /api/v1/rest/apps • Enable/disable apps 9
  • 10. OAuth authorization - REST API 1) Get a Request Token 2) A User have to authorize the Request Token 3) Exchange the authorized Request Token for an Access Token 4) Use the Access Token to invoke REST API services 10
  • 11. OAuth types in REST API We have three ways of getting an Access Token to invoke REST API services Web browser authorization Get a Request token Authenticate the user using a Zyncro login web page Get an Access token External service authorization Get a Request token Authenticate the user using an external service Get an Access token ZyncroApp authorization Use combined with ZyncroApps when the user is already logged in Zyncro. We’ll see it while seeing ZyncroApps development. Examples soon to come! 11
  • 12. Java sample - REST API Sample showing how to get the profile of a User using the REST API public final static String API_KEY = ... public static final String API_SECRET = ... public final static String ACCESS_KEY = ... public final static String ACCESS_SECRET = ... OAuthService service = new ServiceBuilder() .provider(ZyncroApi.class) .apiKey(Paths.API_KEY) .apiSecret(Paths.API_SECRET) .build(); OAuthRequest request = new OAuthRequest( Verb.GET, "https://my.sandbox.zyncro.com/api/v1/rest/users/profile"); Token accessToken = new Token(Paths.ACCESS_KEY, Paths.ACCESS_SECRET); service.signRequest(accessToken, request); Response response = request.send(); ... 12
  • 13. JSON response sample - REST API {"object":{ "appId":"francoscavuzzo-6387", "fullName":"Franco Scavuzzo", "email":"franco@zyncro.com", "name":"Franco", "lastname":"Scavuzzo", "organizationName":"Zyncro Tech, S.L.", "since":"1283158384316", "isFollowing":false, "isFollowedBy":false, "isFollowingActivity":false, "isFollowedActivityBy":false, "language":"en", "organizationUrn":"syncrum:domain:24078705-7041-4a45-ad1d-32fe4d60ee69", "companyFeedUrn":"syncrum:sharegroup:63e82dde-885b-4f0d-b6b0-8bdcc50ca3c7", "personalFeedUrn":"syncrum:sharegroup:67c4b5c6-f113-4e6c-ac89-ba76993f9388", "personalFilesGroupUrn":"syncrum:sharegroup:379ef9fc-ed31-49ad-9d3d-d2141e68cd4c", "userStatusInfo":{"userStatus":0,"message":"Trabajando","date":"1354527495871"}, …. "canCreateDepartments":false, "isOrganizationAdmin":true, "storageOccupied":"143225271", "storageAssigned":"1048576000", },"result":"OK“} 13
  • 14. Play with REST API Let’s play with the REST API http://apidocs.sandbox.zyncro.com/ Demo 14
  • 15. REST API entities Event Inbox Event Group Department Member User 15
  • 16. REST API entities Organization Invitation Task Document Document App Version 16
  • 17. REST API entities • All the main entities in API have a unique identifier, normally call URN (unique resource identifier) • For the attributes that represent date and time, we use UNIX epoch representation in milliseconds 17
  • 18. REST API entities An Event represents an activity that has occurred in Zyncro, for example: a user has published a new message, a document has been changed, a new group has been created… Some of the important attributes related with an Event are: • Each event has a unique identifier. • A date is associated with an event, indicating when it was created. • An event is associated with a group or department, or a private message. • An event has an author (a user) who has triggered (generated) that event. • Each event has an type. The most common type is Comment, that is a message that an user has published. Other types are related with events such as a new member added, some documents uploaded or deleted, etc. 18
  • 19. REST API entities • The number of child comments that the event has. • Information related with the likes the event has received: number of likes and the last user who did it. • The source of the event gives you information related with the origin of the event. This information is useful for developing integrations; for example we use it to indicate that the event was generated from a device like an Android, iPhone…; or another application Chatter, Yammer… • The text related with the event, use the attribute comment (plain text) and htmlComment (contains html format text). • An extra attribute called payload can be used to store information related with the Event in JSON format. 19
  • 20. REST API entities A Group is the more general structure in Zyncro, it is a workspace where users share information and communicate. Some of the most important attributes related with a Group are: • Each group has a unique identifier. • The name and description of the group. • The owner of the group. • The number of members the group has. • Whether the group is public or private • An extra attribute called payload can be used to store information related with the Group in JSON format. 20
  • 21. REST API entities A Department is similar to a group, but it is only visible to all the organization users. All comments that are published in a department are published in name of the department. Some of the most important attributes related with a Department are: • Each department has a unique identifier. • The name, description, aboutus (and other properties) of the department. • The owner of the department. • An extra attribute called payload can be used to store information related with the Group in JSON format. 21
  • 22. REST API entities A User represents a person registered and using Zyncro. Every user belongs to an organization. Some of the most important attributes related with a User are: • Each user has a unique identifier. • The name, lastname, email (and other properties) of the user. • The current language the user has active. • The identifiers of his Company feed, Personal feed and Personal group. • The identifier of his Organization 22
  • 23. REST API entities • Some of the permissions in the organization: enable publish in Company feed, enable to create Groups or Departments If retrieving the full profile of user, extra information is included such as • Skills, experience and education information • Contact details: address, telephone numbers, mobile • An extra attribute called payload can be used to store information related with the Group in JSON format. 23
  • 24. REST API entities A Member is a user that belongs to a Group or Department with its associated permissions. Some of the most important attributes related with a Member are: • The information included in the User • The permission of the User in the Group/Department: • If can publish new messages • If can comment existing messaged • If is owner of the Group/Department • If can add/edit/delete documents • If can invite other users to join • If can add/edit/delete tasks • If can create Zlinks (public links) 24
  • 25. REST API entities Organization, every user in Zyncro belongs to one (and only one) organization, that defines the behavior they have in it. Some of the most important attributes related with an Organization are: • Each organization has a unique identifier. • The name, total users and total storage of the organization • Basic GUI attributes: header color, header text color, image • Configuration attributes such as, if tasks are enable, if message can be deleted, if users can comment on company feed… 25
  • 26. REST API entities A Document belongs to a Group or Department. Some of the most important attributes related with a Document are: • Each document has a unique identifier. • The name and description of the document • Each event has an type, we have four types of documents: • File • Folder • External link (to an URL) • Internal link (to another file in other Group/Department) 26
  • 27. REST API entities • The date and time of creation and last modification • The last document version associated with this document • The number of versions this document has • The member who created the document • The member who last modified the document 27
  • 28. REST API entities A DocumentVersion represents a version of a document. Some of the most important attributes related with a DocumentVersion are: • Each document version has a unique identifier. • The version number, size and date time of creation • The identifier of the group and the document • The information regarding the member author of this version 28
  • 29. REST API entities A InboxEvent is a notification that a user received, generated by an event. Some of the most important attributes related with an Inbox Event are: • Each inbox event has a unique identifier. • The date and time the inbox event was generated • The event associated with the inbox event • Each inbox event has an type, these types are: • Comment • Like • Follow 29
  • 30. REST API entities Invitation Some of the most important attributes related with an Invitation are: • Each invitation has a unique identifier. • The date time when the invitation was sent • Information about the user who sent and the user whose received the invitation • The state of the invitation (waiting, cancelled, accepted, rejected) • Each invitation has an type, these types are: • External contact • Group • Follow 30
  • 31. REST API entities Task Some of the most important attributes related with a Task are: • Each task has a unique identifier. • The name and description of the task • The group identifier where the tasks belongs • The status of the task (pending or completed) • The due date of the task • The user assigned to this task 31
  • 32. Code samples – REST API Some samples using the REST API in several programming languages can be found at github.com/zyncro C# (github.com/zyncro/csharp-api-sample) Java (github.com/zyncro/java-api-sample) PHP (github.com/zyncro/php-api-sample) Python (github.com/zyncro/python-api-sample) More to come… 32
  • 33. PHP API client We provide a series of PHP classes that you can use to invoke REST API services from PHP. OAuth authorization is transparent and you do not have to worry about it, just choose which type to use. https://github.com/zyncro/php-api-client 33
  • 34. PHP API client - Samples • Web browser authorization $dsf->start(new WallApiService($dsf)); $dsf->controller->zyncroApi->logintype = 'threelegged'; $response = $dsf->controller->getEvents(); • External service authorization $dsf->start(new WallApiService($dsf)); $dsf->controller->zyncroApi->email = $email; $dsf->controller->zyncroApi->pass = $pass; $dsf->controller->zyncroApi->logintype = 'userpass'; $response = $dsf->controller->getEvents(); 34
  • 35. PHP API client - Samples • Creating a new Group with the API $dsf->start(new GroupApiService($dsf)); $response = $dsf->controller->createGroup ('A new Group from PHP API', 'The description'); 35
  • 36. PHP API client - Samples • Publishing a new Message in a Group with the API $dsf->start(new WallApiService($dsf)); $response = $dsf->controller->publishInGroup( 'syncrum:sharegroup:01e39c19-313e-404c-9d08-64a047eda89c', 'Hello plain World!', '<p>Hello <span style="font-weight:bold; color:#ff0000;">enriched</span> World</p>'); • Get Events from a Group with the API $dsf->start(new WallApiService($dsf)); $response = $dsf->controller->getGroupEvents( 'syncrum:sharegroup:01e39c19-313e-404c-9d08-64a047eda89c'); 36
  • 37. More info Zyncro Developers Portal http://developers.zyncro.com 37
  • 38. WWW.ZYNCRO.COM Twitter: @zyncro blog: en.blog.zyncro.com 38