Hi <@U06D0USC2CQ> & team I am working on zoho api ...
# troubleshooting
a
Hi @Reuben (Matatika) & team I am working on zoho api https://sprintsapi.zoho.in/zsapi/team/60004743801/projects/10085000004764629/sprints -- api_url and get the response can you please help me how to pass the abovel url in yml file, If I give complete url, its getting wrong and if the pass only /teams in streams--name and path, I am getting incorrect data
Directly from the README:
Copy code
api_url: (Required) #Example (no trailing slash) <https://sprintsapi.zoho.com/zsapi>
oauth_url: (Required) #Example (no tailing slash) <https://accounts.zoho.com/oauth/v2/token>
client_id: (Required) 
client_password: (Required)
refresh_token: (Required)
Please reply here to not spam #C069CQNHDNF.
1
a
okay sure
👍 1
I have already given above configuration
I need to get data for teams, projects, sprints and timesheets need to pass in streams ?
r
I don't see them in the
meltano.yml
you posted earlier, unless you have the sensitive credentials in a
.env
? Can you paste the output of
Copy code
meltano config tap-zohosprints list
a
plugins: extractors: - name: tap-zohosprints variant: autoidm pip_url: git+https://github.com/AutoIDM/tap-zohosprints.git config: api_url: https://sprintsapi.zoho.in/zsapi oauth_url: https://accounts.zoho.in/oauth/v2/token headers: User-Agent: meltano streams: - name: team path: /teams/ primary_keys: [ownerTeamIds]
r
Copy code
headers:
        User-Agent: meltano
      streams:
      - name: team
        path: /teams/
        primary_keys: [ownerTeamIds]
Why do you have this?
a
error meltano invoke tap-zohosprints > tap.out reading the data from api and throwing error es/tap_zohosprints/client.py", line 152, in validate_response raise FatalAPIError(msg) singer_sdk.exceptions.FatalAPIError: 401 Client Error: for path: /team/{myTeamId}/projects/{projectId}/users/?action=data. Response content: b'{"code":7601,"message":"Invalid oauthscope","status":"failed"}'
if the dont give headers also, I am getting same error actually I need data for different endpoints either to a json or table expecting output as it is when I tried with postman
r
Where are you providing
client_id
,
client_secret
and
refresh_token
?
a
I have already set it is saving in .env file as these are keys
r
Right.
a
Extractor 'tap-zohosprints' setting 'client_id' was set in `.env`: (redacted) same with other client secret and refresh token not sure where it is going wrong
r
meltano.yml
Copy code
plugins:
  extractors:
  - name: tap-zohosprints
    variant: autoidm
    pip_url: git+<https://github.com/AutoIDM/tap-zohosprints.git>
    config:
      api_url: <https://sprintsapi.zoho.in/zsapi>
      oauth_url: <https://accounts.zoho.in/oauth/v2/token>
    select:
    - team.*
.env
Copy code
TAP_ZOHOSPRINTS_CLIENT_ID=
TAP_ZOHOSPRINTS_CLIENT_SECRET=
TAP_ZOHOSPRINTS_REFRESH_TOKEN=
a
thanks so, I should pass only one endpoint at a time (select) ?
e
I should pass only one endpoint at a time (select) ?
At least initially to get things working, probably yes
❤️ 1
a
Hi @Reuben (Matatika) & @Edgar Ramírez (Arch.dev), I have given select team, project and sprint separately in yml and executed-- its working I actually need to give teamID and for particular team I need to extract projects and same for projectID and sprintID Can you please help on the synatx in yml file
Hi @Reuben (Matatika) & @Edgar Ramírez (Arch.dev) can you please assist me on how to give specific team ID and get the data
e
I don't think that's possible with pure config on this tap, so you might wanna take a look at https://sdk.meltano.com/en/v0.36.1/stream_maps.html
a
okay I will check
👍 1
Hi @Reuben (Matatika) @Edgar Ramírez (Arch.dev) I am testing frappe ERP next using tap-rest-api-msdk authentication has api key and api secret to login I have tried { X-API-KEY: my secret value} given in doc butting error failed to parse json how to pass/set these in yml ? can you please help with some example
r
Copy code
config:
  auth_method: api_key
  api_keys:
    X-API-KEY: my secret value
👍 1
d
@Reuben (Matatika) but will this not expose secrets in .yml. cc @Edgar Ramírez (Arch.dev) ?
e
That's right @Dinesh Nariyani. It's better to use environment variables for those.
1