Announcement

Collapse
No announcement yet.

documentation for public REST-API

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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)?

  • #2
    We are going to create github repository for documentation soon.

    Comment


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

      Comment


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

        Comment


        • #5
          And API? Thanks.

          Comment


          • #6
            There is api already. Only base usage for now.

            Comment


            • #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...
              X