How to CREATE a RECORD using GROOVY-WSLITE?


#1

Hi team support airtable,

I tried in 2 ways … without success.

WITH SOAP
import wslite.soap.SOAPClient
client = new SOAPClient(wadl)
list = client.send(SOAPAction:‘https://api.airtable.com/create’,headers:[‘Authorization’:'Bearer key…’ , ‘mediaType’:‘application/json’] )

  • not know how to pass parameters “fields:
    -> I do not know how to get the “response


WITH REST
import wslite.rest.RESTClient
import wslite.http.auth.*
client = new RESTClient(wadl)
client.authorization = new HTTPBasicAuthorization(‘Authorization’,‘Bearer key…’)
list = client.get(path:’/v0/appsc…/resource’)

  • not know how to pass parameters “fields:
    -> I do not know how to get the “response

Regards
Draco
pd: congratulations,… airtable is increible.


#2

Hi Draco,

If you want to use groovy RESTClient, you need to use a POST request. See second example in https://github.com/jwagenleitner/groovy-wslite#sending-content .

Alex