documentation for public REST-API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hi-ko
    Member
    • May 2015
    • 90

    documentation for public REST-API

    I know that there is no documenation for the REST-API yet. We may help ourself by checking the requests the espocrm app uses but we want some commitment on which APIs we can rely for integration scenarios before we start. As a starting point we all may document what we find in a public Wiki and you comment if this is stable for public usage or subject of change (or a WikiPage inside the github project)?
  • yuri
    Member
    • Mar 2014
    • 8624

    #2
    We are going to create github repository for documentation soon.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • davidperez
      Junior Member
      • May 2015
      • 3

      #3
      Hello Yurikuzn... Some examples how to use it?

      Comment

      • AlexAv
        EspoCRM Team
        • May 2014
        • 124

        #4
        Documentation available at https://www.espocrm.com/documentation/
        Last edited by AlexAv; 09-13-2016, 07:08 PM.

        Comment

        • davidperez
          Junior Member
          • May 2015
          • 3

          #5
          And API? Thanks.

          Comment

          • yuri
            Member
            • Mar 2014
            • 8624

            #6
            There is api already. Only base usage for now.
            If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

            Comment

            • theBuzzyCoder
              Senior Member
              • Feb 2018
              • 102

              #7
              Generating auth-tokens
              1. Get the output of below code as basicAuthToken
              <?php
              $userName = "myusername";
              $password = "mypassword";
              echo base64_encode($userName . ":" . $password);
              ?>
              1. curl -H “Authorization: Basic basicAuthToken” -H “Espo-Authorization: basicAuthToken” “http://espocloud-ip: port/api/v1/App/user” | python -m json.tool > user_info.json
              2. Port is optional [Only if you have provided in server configuration]
              3. Search token keyword in user_info.json and copy its value
              4. The copied values is your actual AuthToken

              Testing AuthToken


              Open mysql console
              mysql -u=mysql_user_name -pmysql_user_password -h=mysql_hostname --port=mysql_port espo_database
              Run the below mysql Query
              > SELECT `id` FROM `espo_database`.`contact` LIMIT 1;
              Make an API request to Espo
              # Below curl request should give you a json response.
              # Substitute id with above mysql query result.
              $ curl -H "Espo-Authorization: AuthToken" "http://espocloud-ip: port/api/v1/Lead/id"

              Note: there is no space between : port in the links. The : and p gets translated as emoji. So I have added space
              Last edited by theBuzzyCoder; 02-19-2018, 06:31 AM.

              Comment

              Working...