From 462c4f7b12fbc0db137636d07c7ca75ce93c2ed6 Mon Sep 17 00:00:00 2001 From: Prince Chaddha Date: Wed, 10 Nov 2021 15:05:20 +0530 Subject: [PATCH] more changes --- token-spray/{heroku.yaml => api-heroku.yaml} | 13 ++++++------- token-spray/{hubspot.yaml => api-hubspot.yaml} | 17 +++++++++++++---- .../{instagram.yaml => api-instagram.yaml} | 12 ++++++++---- .../{intercom.yaml => api-intercom.yaml} | 0 token-spray/{ipstack.yaml => api-ipstack.yaml} | 8 +++++--- .../{iterable.yaml => api-iterable.yaml} | 10 +++++----- .../{jumpcloud.yaml => api-jumpcloud.yaml} | 7 ++++--- .../{linkedin.yaml => api-linkedin.yaml} | 6 ++++-- .../{lokalise.yaml => api-lokalise.yaml} | 16 ++++++++++------ token-spray/{loqate.yaml => api-loqate.yaml} | 4 ++-- .../{mailchimp.yaml => api-mailchimp.yaml} | 2 +- token-spray/{mailgun.yaml => api-mailgun.yaml} | 12 ++++++++---- token-spray/{mapbox.yaml => api-mapbox.yaml} | 11 +++++++---- .../{nerdgraph.yaml => api-nerdgraph.yaml} | 2 +- token-spray/{netlify.yaml => api-netlify.yaml} | 12 ++++++++---- token-spray/{npm.yaml => api-npm.yaml} | 4 ++-- .../{onelogin.yaml => api-onelogin.yaml} | 16 ++++++++++------ .../{openweather.yaml => api-openweather.yaml} | 12 ++++++++---- .../{optimizely.yaml => api-optimizely.yaml} | 6 ++++-- .../{pagerduty.yaml => api-pagerduty.yaml} | 12 +++++++----- token-spray/{paypal.yaml => api-paypal.yaml} | 0 token-spray/{pendo.yaml => api-pendo.yaml} | 13 +++++++------ ...otaltracker.yaml => api-pivotaltracker.yaml} | 1 + .../{postmark.yaml => api-postmark.yaml} | 14 +++++++++----- .../{sendgrid.yaml => api-sendgrid.yaml} | 2 +- token-spray/{slack.yaml => api-slack.yaml} | 6 ++++-- .../{travisci.yaml => api-travisci.yaml} | 2 +- 27 files changed, 136 insertions(+), 84 deletions(-) rename token-spray/{heroku.yaml => api-heroku.yaml} (76%) rename token-spray/{hubspot.yaml => api-hubspot.yaml} (54%) rename token-spray/{instagram.yaml => api-instagram.yaml} (55%) rename token-spray/{intercom.yaml => api-intercom.yaml} (100%) rename token-spray/{ipstack.yaml => api-ipstack.yaml} (79%) rename token-spray/{iterable.yaml => api-iterable.yaml} (55%) rename token-spray/{jumpcloud.yaml => api-jumpcloud.yaml} (85%) rename token-spray/{linkedin.yaml => api-linkedin.yaml} (82%) rename token-spray/{lokalise.yaml => api-lokalise.yaml} (55%) rename token-spray/{loqate.yaml => api-loqate.yaml} (73%) rename token-spray/{mailchimp.yaml => api-mailchimp.yaml} (100%) rename token-spray/{mailgun.yaml => api-mailgun.yaml} (70%) rename token-spray/{mapbox.yaml => api-mapbox.yaml} (71%) rename token-spray/{nerdgraph.yaml => api-nerdgraph.yaml} (100%) rename token-spray/{netlify.yaml => api-netlify.yaml} (70%) rename token-spray/{npm.yaml => api-npm.yaml} (90%) rename token-spray/{onelogin.yaml => api-onelogin.yaml} (58%) rename token-spray/{openweather.yaml => api-openweather.yaml} (69%) rename token-spray/{optimizely.yaml => api-optimizely.yaml} (85%) rename token-spray/{pagerduty.yaml => api-pagerduty.yaml} (76%) rename token-spray/{paypal.yaml => api-paypal.yaml} (100%) rename token-spray/{pendo.yaml => api-pendo.yaml} (74%) rename token-spray/{pivotaltracker.yaml => api-pivotaltracker.yaml} (94%) rename token-spray/{postmark.yaml => api-postmark.yaml} (63%) rename token-spray/{sendgrid.yaml => api-sendgrid.yaml} (100%) rename token-spray/{slack.yaml => api-slack.yaml} (80%) rename token-spray/{travisci.yaml => api-travisci.yaml} (100%) diff --git a/token-spray/heroku.yaml b/token-spray/api-heroku.yaml similarity index 76% rename from token-spray/heroku.yaml rename to token-spray/api-heroku.yaml index ef81ec91e8..ef9b58c7ae 100644 --- a/token-spray/heroku.yaml +++ b/token-spray/api-heroku.yaml @@ -17,10 +17,9 @@ requests: Authorization: Bearer {{token}} matchers: - - type: status - condition: or - status: - - 200 - - 201 - - 202 - - 206 + - type: word + part: body + words: + - '"created_at":' + - '"git_url":' + condition: and \ No newline at end of file diff --git a/token-spray/hubspot.yaml b/token-spray/api-hubspot.yaml similarity index 54% rename from token-spray/hubspot.yaml rename to token-spray/api-hubspot.yaml index da95a4b12a..4526b146f6 100644 --- a/token-spray/hubspot.yaml +++ b/token-spray/api-hubspot.yaml @@ -3,8 +3,8 @@ id: api-hubspot info: name: HubSpot API Test author: zzeitlin - reference: https://legacydocs.hubspot.com/docs/methods/owners/get_owners severity: info + reference: https://legacydocs.hubspot.com/docs/methods/owners/get_owners tags: token-spray,hubspot self-contained: true @@ -12,11 +12,20 @@ requests: - method: GET path: - "https://api.hubapi.com/owners/v2/owners?hapikey={{token}}" - - "https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey={{token}}" + - "https://api.hubapi.com/contacts/v1/lists/static?count=3&hapikey={{token}}" + matchers-condition: or matchers: - type: word part: body words: - - 'error' - negative: true + - '"portalId":' + - '"ownerId":' + condition: and + + - type: word + part: body + words: + - '"metaData":' + - '"portalId":' + condition: and \ No newline at end of file diff --git a/token-spray/instagram.yaml b/token-spray/api-instagram.yaml similarity index 55% rename from token-spray/instagram.yaml rename to token-spray/api-instagram.yaml index dd851bee3e..fc463c8bac 100644 --- a/token-spray/instagram.yaml +++ b/token-spray/api-instagram.yaml @@ -11,9 +11,13 @@ self-contained: true requests: - method: GET path: - - "https://graph.facebook.com/v8.0/me/accounts?access_token={{token}}" + - "https://graph.facebook.com/v12.0/me/accounts?access_token={{token}}" matchers: - - type: status - status: - - 200 + - type: word + part: body + words: + - '"data":' + - '"access_token":' + - '"name":' + condition: and diff --git a/token-spray/intercom.yaml b/token-spray/api-intercom.yaml similarity index 100% rename from token-spray/intercom.yaml rename to token-spray/api-intercom.yaml diff --git a/token-spray/ipstack.yaml b/token-spray/api-ipstack.yaml similarity index 79% rename from token-spray/ipstack.yaml rename to token-spray/api-ipstack.yaml index ac527d2a1e..8f560a1b34 100644 --- a/token-spray/ipstack.yaml +++ b/token-spray/api-ipstack.yaml @@ -3,8 +3,8 @@ id: api-ipstack info: name: IPStack API Test author: zzeitlin - reference: https://ipstack.com/documentation severity: info + reference: https://ipstack.com/documentation tags: token-spray,ipstack self-contained: true @@ -16,6 +16,8 @@ requests: matchers: - type: word part: body - negative: true words: - - 'invalid_access_key' + - '"ip":' + - '"hostname":' + - '"type":' + condition: and diff --git a/token-spray/iterable.yaml b/token-spray/api-iterable.yaml similarity index 55% rename from token-spray/iterable.yaml rename to token-spray/api-iterable.yaml index 69da55de5d..b559444b8f 100644 --- a/token-spray/iterable.yaml +++ b/token-spray/api-iterable.yaml @@ -3,22 +3,22 @@ id: api-iterable info: name: Iterable API Test author: zzeitlin - reference: https://api.iterable.com/api/docs severity: info + reference: https://api.iterable.com/api/docs tags: token-spray,iterable self-contained: true requests: - method: GET path: - - "https://api.iterable.com/api/export/data.json?dataTypeName=emailSend&range=Today&onlyFields=List.empty" + - "https://api.iterable.com/api/catalogs" headers: Api_Key: "{{token}}" matchers: - type: word part: body - negative: true words: - - 'BadApiKey' - - 'RateLimitExceeded' # Matchers needs to be replaced with valid +ve match instead of -ve + - '"name":' + - '"catalogNames":' + condition: and diff --git a/token-spray/jumpcloud.yaml b/token-spray/api-jumpcloud.yaml similarity index 85% rename from token-spray/jumpcloud.yaml rename to token-spray/api-jumpcloud.yaml index dbf3c9ab35..6b9dc68d93 100644 --- a/token-spray/jumpcloud.yaml +++ b/token-spray/api-jumpcloud.yaml @@ -3,8 +3,8 @@ id: api-jumpcloud info: name: JumpCloud API Test author: zzeitlin - reference: https://docs.jumpcloud.com/1.0/authentication-and-authorization/api-key severity: info + reference: https://docs.jumpcloud.com/1.0/authentication-and-authorization/api-key tags: token-spray,jumpcloud self-contained: true @@ -18,6 +18,7 @@ requests: matchers: - type: word part: body - negative: true words: - - 'Unauthorized' + - '"_id":' + - '"agentServer":' + condition: and diff --git a/token-spray/linkedin.yaml b/token-spray/api-linkedin.yaml similarity index 82% rename from token-spray/linkedin.yaml rename to token-spray/api-linkedin.yaml index 611f28d422..3631ace894 100644 --- a/token-spray/linkedin.yaml +++ b/token-spray/api-linkedin.yaml @@ -21,6 +21,8 @@ requests: - type: word part: body - negative: true words: - - "serviceErrorCode" \ No newline at end of file + - '"id":' + - '"firstName":' + - '"localized":' + condition: and \ No newline at end of file diff --git a/token-spray/lokalise.yaml b/token-spray/api-lokalise.yaml similarity index 55% rename from token-spray/lokalise.yaml rename to token-spray/api-lokalise.yaml index 5003f25b31..c513a20064 100644 --- a/token-spray/lokalise.yaml +++ b/token-spray/api-lokalise.yaml @@ -3,19 +3,23 @@ id: api-lokalise info: name: Lokalise API Test author: zzeitlin - reference: https://app.lokalise.com/api2docs/curl/#resource-projects severity: info + reference: https://app.lokalise.com/api2docs/curl/#resource-projects tags: token-spray,lokalise self-contained: true requests: - method: GET path: - - "https://api.lokalise.com/api2/projects/" + - "https://api.lokalise.com/api2/teams" headers: - X-Api-Token: "{{token}}" + x-api-Token: "{{token}}" matchers: - - type: status - status: - - 200 + - type: word + part: body + words: + - '"teams":' + - '"team_id":' + - '"name":' + condition: and \ No newline at end of file diff --git a/token-spray/loqate.yaml b/token-spray/api-loqate.yaml similarity index 73% rename from token-spray/loqate.yaml rename to token-spray/api-loqate.yaml index dcbf5b156d..10fa82f23a 100644 --- a/token-spray/loqate.yaml +++ b/token-spray/api-loqate.yaml @@ -3,15 +3,15 @@ id: api-loqate info: name: Loqate API Test author: zzeitlin - reference: https://www.loqate.com/resources/support/apis/Capture/Interactive/Find/1.1/ severity: info + reference: https://www.loqate.com/resources/support/apis/Capture/Interactive/Find/1.1/ tags: token-spray,loqate self-contained: true requests: - method: GET path: - - "api.addressy.com/Capture/Interactive/Find/v1.00/json3.ws?Key={{token}}&Countries=US,CA&Language=en&Limit=5&Text=BHAR" + - "https://api.addressy.com/Capture/Interactive/Find/v1.00/json3.ws?Key={{token}}&Countries=US,CA&Language=en&Limit=5&Text=BHAR" matchers: - type: word diff --git a/token-spray/mailchimp.yaml b/token-spray/api-mailchimp.yaml similarity index 100% rename from token-spray/mailchimp.yaml rename to token-spray/api-mailchimp.yaml index d25870e279..5232ddda97 100644 --- a/token-spray/mailchimp.yaml +++ b/token-spray/api-mailchimp.yaml @@ -3,8 +3,8 @@ id: api-mailchimp info: name: Mailchimp API Test author: zzeitlin - reference: https://mailchimp.com/developer/transactional/docs/smtp-integration/#credentials-and-configuration severity: info + reference: https://mailchimp.com/developer/transactional/docs/smtp-integration/#credentials-and-configuration tags: token-spray,mailchimp self-contained: true diff --git a/token-spray/mailgun.yaml b/token-spray/api-mailgun.yaml similarity index 70% rename from token-spray/mailgun.yaml rename to token-spray/api-mailgun.yaml index c4997aaaa4..dfa06bdfaa 100644 --- a/token-spray/mailgun.yaml +++ b/token-spray/api-mailgun.yaml @@ -3,8 +3,8 @@ id: api-mailgun info: name: Mailgun API Test author: zzeitlin - reference: https://documentation.mailgun.com/en/latest/api-intro.html severity: info + reference: https://documentation.mailgun.com/en/latest/api-intro.html tags: token-spray,mailgun self-contained: true @@ -16,6 +16,10 @@ requests: Authorization: Basic {{base64('api:' + token)}} matchers: - - type: status - status: - - 200 + - type: word + part: body + words: + - '"total_count":' + - '"items":' + - '"created_at":' + condition: and diff --git a/token-spray/mapbox.yaml b/token-spray/api-mapbox.yaml similarity index 71% rename from token-spray/mapbox.yaml rename to token-spray/api-mapbox.yaml index 1e246f783b..4ed5e0648f 100644 --- a/token-spray/mapbox.yaml +++ b/token-spray/api-mapbox.yaml @@ -14,7 +14,10 @@ requests: - "https://api.mapbox.com/geocoding/v5/mapbox.places/Los%20Angeles.json?access_token={{token}}" matchers: - - type: status - status: - - 401 - negative: true + - type: word + part: body + words: + - 'type' + - 'query' + - 'features' + condition: and diff --git a/token-spray/nerdgraph.yaml b/token-spray/api-nerdgraph.yaml similarity index 100% rename from token-spray/nerdgraph.yaml rename to token-spray/api-nerdgraph.yaml index ca570964e4..d367685e7f 100644 --- a/token-spray/nerdgraph.yaml +++ b/token-spray/api-nerdgraph.yaml @@ -3,8 +3,8 @@ id: api-nerdgraph info: name: New Relic NerdGraph API Test author: zzeitlin - reference: https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/ severity: info + reference: https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/ tags: token-spray,newrelic,nerdgraph self-contained: true diff --git a/token-spray/netlify.yaml b/token-spray/api-netlify.yaml similarity index 70% rename from token-spray/netlify.yaml rename to token-spray/api-netlify.yaml index b282f7acd9..e57127c9f5 100644 --- a/token-spray/netlify.yaml +++ b/token-spray/api-netlify.yaml @@ -3,8 +3,8 @@ id: api-netlify info: name: Netlify API Test author: dwisiswant0 - reference: https://docs.netlify.com/api/get-started/ severity: info + reference: https://docs.netlify.com/api/get-started/ tags: token-spray,netlify self-contained: true @@ -16,6 +16,10 @@ requests: Authorization: Bearer {{token}} matchers: - - type: status - status: - - 200 + - type: word + part: body + words: + - '"id":' + - '"premium":' + - '"claimed":' + condition: and diff --git a/token-spray/npm.yaml b/token-spray/api-npm.yaml similarity index 90% rename from token-spray/npm.yaml rename to token-spray/api-npm.yaml index fb0ef0b6b7..522c793520 100644 --- a/token-spray/npm.yaml +++ b/token-spray/api-npm.yaml @@ -3,9 +3,9 @@ id: api-npm info: name: NPM API Test author: zzeitlin - reference: https://docs.npmjs.com/creating-and-viewing-access-tokens severity: info - tags: token-spray,node,npm,package,manager + reference: https://docs.npmjs.com/creating-and-viewing-access-tokens + tags: token-spray,node,npm self-contained: true requests: diff --git a/token-spray/onelogin.yaml b/token-spray/api-onelogin.yaml similarity index 58% rename from token-spray/onelogin.yaml rename to token-spray/api-onelogin.yaml index f57001c5f9..d8369ad80b 100644 --- a/token-spray/onelogin.yaml +++ b/token-spray/api-onelogin.yaml @@ -3,21 +3,25 @@ id: api-onelogin info: name: OneLogin API Test author: dwisiswant0 - reference: https://developers.onelogin.com/api-docs/2/getting-started/dev-overview severity: info + reference: https://developers.onelogin.com/api-docs/2/getting-started/dev-overview tags: token-spray,onelogin self-contained: true requests: - method: GET path: - - "https://api.us.onelogin.com/api/2/users?fields=id" - - "https://api.eu.onelogin.com/api/2/users?fields=id" + - "https://api.us.onelogin.com/api/2/apps" + - "https://api.eu.onelogin.com/api/2/apps" headers: Authorization: Bearer {{token}} stop-at-first-match: true matchers: - - type: status - status: - - 200 + - type: word + part: body + words: + - '"id":' + - '"connector_id":' + - '"auth_method":' + condition: and diff --git a/token-spray/openweather.yaml b/token-spray/api-openweather.yaml similarity index 69% rename from token-spray/openweather.yaml rename to token-spray/api-openweather.yaml index 916936aa97..13a26aecc3 100644 --- a/token-spray/openweather.yaml +++ b/token-spray/api-openweather.yaml @@ -3,8 +3,8 @@ id: api-openweather info: name: OpenWeather API Test author: zzeitlin - reference: https://openweathermap.org/current severity: info + reference: https://openweathermap.org/current tags: token-spray,weather,openweather self-contained: true @@ -14,6 +14,10 @@ requests: - "https://api.openweathermap.org/data/2.5/weather?q=Chicago&appid={{token}}" matchers: - - type: status - status: - - 200 + - type: word + part: body + words: + - '"coord":' + - '"weather":' + - '"base":' + condition: and diff --git a/token-spray/optimizely.yaml b/token-spray/api-optimizely.yaml similarity index 85% rename from token-spray/optimizely.yaml rename to token-spray/api-optimizely.yaml index 8743b893fc..48105d1bec 100644 --- a/token-spray/optimizely.yaml +++ b/token-spray/api-optimizely.yaml @@ -3,8 +3,8 @@ id: api-optimizely info: name: Optimizely API Test author: dwisiswant0 - reference: https://library.optimizely.com/docs/api/app/v2/index.html severity: info + reference: https://library.optimizely.com/docs/api/app/v2/index.html tags: token-spray,optimizely self-contained: true @@ -24,4 +24,6 @@ requests: - type: word part: body words: - - "account_id" + - '"account_id":' + - '"confidence_threshold":' + condition: and \ No newline at end of file diff --git a/token-spray/pagerduty.yaml b/token-spray/api-pagerduty.yaml similarity index 76% rename from token-spray/pagerduty.yaml rename to token-spray/api-pagerduty.yaml index bad59948ed..902fae8ec0 100644 --- a/token-spray/pagerduty.yaml +++ b/token-spray/api-pagerduty.yaml @@ -3,8 +3,8 @@ id: api-pagerduty info: name: Pagerduty API Test author: zzeitlin - reference: https://developer.pagerduty.com/api-reference severity: info + reference: https://developer.pagerduty.com/api-reference tags: token-spray,pagerduty self-contained: true @@ -17,7 +17,9 @@ requests: Authorization: Token token={{token}} matchers: - - type: status - status: - - 401 - negative: true + - type: word + part: body + words: + - '"schedules":' + - '"id":' + condition: and diff --git a/token-spray/paypal.yaml b/token-spray/api-paypal.yaml similarity index 100% rename from token-spray/paypal.yaml rename to token-spray/api-paypal.yaml diff --git a/token-spray/pendo.yaml b/token-spray/api-pendo.yaml similarity index 74% rename from token-spray/pendo.yaml rename to token-spray/api-pendo.yaml index 66cd885dc6..023a6f347c 100644 --- a/token-spray/pendo.yaml +++ b/token-spray/api-pendo.yaml @@ -3,8 +3,8 @@ id: api-pendo info: name: Pendo API Test author: zzeitlin - reference: https://help.pendo.io/resources/support-library/api/index.html severity: info + reference: https://help.pendo.io/resources/support-library/api/index.html tags: token-spray,pendo self-contained: true @@ -12,13 +12,14 @@ requests: - method: GET path: - "https://app.pendo.io/api/v1/feature" - - "https://app.pendo.io/api/v1/metadata/schema/account" headers: Content-Type: application/json X-Pendo-Integration-Key: "{{token}}" matchers: - - type: status - status: - - 403 - negative: true \ No newline at end of file + - type: word + part: body + words: + - '"createdByUser":' + - '"id":' + condition: and \ No newline at end of file diff --git a/token-spray/pivotaltracker.yaml b/token-spray/api-pivotaltracker.yaml similarity index 94% rename from token-spray/pivotaltracker.yaml rename to token-spray/api-pivotaltracker.yaml index d7a74ded66..1f7e7007e0 100644 --- a/token-spray/pivotaltracker.yaml +++ b/token-spray/api-pivotaltracker.yaml @@ -21,3 +21,4 @@ requests: negative: true words: - 'invalid_authentication' + - 'unauthenticated' diff --git a/token-spray/postmark.yaml b/token-spray/api-postmark.yaml similarity index 63% rename from token-spray/postmark.yaml rename to token-spray/api-postmark.yaml index 85367b5c61..b9bec134db 100644 --- a/token-spray/postmark.yaml +++ b/token-spray/api-postmark.yaml @@ -3,20 +3,24 @@ id: api-postmark info: name: PostMark API Test author: zzeitlin - reference: https://postmarkapp.com/developer/api/overview severity: info + reference: https://postmarkapp.com/developer/api/overview tags: token-spray,postmark self-contained: true requests: - method: GET path: - - "https://api.postmarkapp.com/stats/outbound" + - "https://api.postmarkapp.com/server" headers: Accept: application/json X-Postmark-Server-Token: "{{token}}" matchers: - - type: status - status: - - 200 + - type: word + part: body + words: + - '"ID":' + - '"Name":' + - '"ApiTokens":' + condition: and diff --git a/token-spray/sendgrid.yaml b/token-spray/api-sendgrid.yaml similarity index 100% rename from token-spray/sendgrid.yaml rename to token-spray/api-sendgrid.yaml index d9330371f1..3c24d1dfaf 100644 --- a/token-spray/sendgrid.yaml +++ b/token-spray/api-sendgrid.yaml @@ -3,8 +3,8 @@ id: api-sendgrid info: name: Sendgrid API Test author: zzeitlin - reference: https://docs.sendgrid.com/for-developers/sending-email/getting-started-smtp severity: info + reference: https://docs.sendgrid.com/for-developers/sending-email/getting-started-smtp tags: token-spray,sendgrid self-contained: true diff --git a/token-spray/slack.yaml b/token-spray/api-slack.yaml similarity index 80% rename from token-spray/slack.yaml rename to token-spray/api-slack.yaml index 8203aa56b5..d9a36d5801 100644 --- a/token-spray/slack.yaml +++ b/token-spray/api-slack.yaml @@ -19,5 +19,7 @@ requests: - type: word part: body words: - - 'error' - negative: true + - '"url":' + - '"team_id":' + - '"user_id":' + condition: and \ No newline at end of file diff --git a/token-spray/travisci.yaml b/token-spray/api-travisci.yaml similarity index 100% rename from token-spray/travisci.yaml rename to token-spray/api-travisci.yaml index 3b43f9e529..63489fc886 100644 --- a/token-spray/travisci.yaml +++ b/token-spray/api-travisci.yaml @@ -3,8 +3,8 @@ id: api-travisci info: name: Travis CI API Test author: zzeitlin - reference: https://developer.travis-ci.com/ severity: info + reference: https://developer.travis-ci.com/ tags: token-spray,travis self-contained: true