{
  "opencollection": "1.0.0",
  "info": {
    "name": "Red Hat 3scale Service Management API",
    "version": "1"
  },
  "request": {
    "auth": {
      "type": "apikey",
      "key": "provider_key",
      "value": "{{provider_key}}",
      "placement": "query"
    }
  },
  "items": [
    {
      "info": {
        "name": "Authorization",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Authorize API Transaction",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://su1.3scale.net/transactions/authorize.xml",
            "params": [
              {
                "name": "provider_key",
                "value": "",
                "type": "query",
                "description": "The provider key identifying your 3scale account"
              },
              {
                "name": "user_key",
                "value": "",
                "type": "query",
                "description": "The API key of the application making the call"
              },
              {
                "name": "service_id",
                "value": "",
                "type": "query",
                "description": "The ID of the service being accessed"
              },
              {
                "name": "usage[hits]",
                "value": "",
                "type": "query",
                "description": "Number of hits to report with this authorization"
              }
            ]
          },
          "docs": "Authorizes an API call by checking whether the application identified by the user key is within its usage limits. Returns success or failure along with current usage data. Used by APIcast before forwarding requests to the backend API."
        },
        {
          "info": {
            "name": "Authorize and Report API Transaction",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://su1.3scale.net/transactions/authrep.xml",
            "params": [
              {
                "name": "provider_key",
                "value": "",
                "type": "query",
                "description": "The provider key identifying your 3scale account"
              },
              {
                "name": "user_key",
                "value": "",
                "type": "query",
                "description": "The API key of the application making the call"
              },
              {
                "name": "service_id",
                "value": "",
                "type": "query",
                "description": "The ID of the service being accessed"
              },
              {
                "name": "usage[hits]",
                "value": "",
                "type": "query",
                "description": "Number of hits to report"
              }
            ]
          },
          "docs": "Combines authorization and reporting in a single call. Authorizes the API call and simultaneously reports usage metrics to 3scale. This is the recommended approach for reporting hits and other metrics."
        }
      ]
    },
    {
      "info": {
        "name": "Reporting",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Report API Transactions",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://su1.3scale.net/transactions.xml",
            "body": {
              "type": "form-urlencoded",
              "data": []
            }
          },
          "docs": "Reports multiple API usage transactions in batch to 3scale. Used to asynchronously report usage metrics after API calls have already been processed. Supports reporting for multiple application keys in a single call."
        }
      ]
    },
    {
      "info": {
        "name": "OAuth",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Authorize OAuth Token",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://su1.3scale.net/transactions/oauth_authorize.xml",
            "params": [
              {
                "name": "provider_key",
                "value": "",
                "type": "query",
                "description": "The provider key identifying your 3scale account"
              },
              {
                "name": "access_token",
                "value": "",
                "type": "query",
                "description": "The OAuth 2.0 access token to authorize"
              },
              {
                "name": "service_id",
                "value": "",
                "type": "query",
                "description": "The ID of the service being accessed"
              }
            ]
          },
          "docs": "Authorizes an OAuth 2.0 access token against the 3scale service, checking whether the token is valid and within usage limits. Returns the application and plan details associated with the token."
        }
      ]
    }
  ],
  "bundled": true
}