keboola/magento-extractor-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (0.0.2) of this package.

Some new component

0.0.2 2015-05-05 19:24 UTC

This package is not auto-updated.

Last update: 2019-02-20 19:29:44 UTC


README

FORMAT: 1A HOST: https://syrup.keboola.com/ex-fb-ads

Magento Extractor configuration

Authentication

POST/GET on /oauth endpoint Must contain token and config parameters, where config is a table(must already exist) name of the particular configuration. The config table must have api_url, oauth.consumer_secret and oauth.consumer_key attributes set prior to requesting the authentication.

Config table

Attributes

Remaining necessary OAuth information generated by /oauth endpoint

Data

  • Columns:
    • endpoint(required): The API endpoint
    • params: Query parameters of the api call, JSON encoded
      • Each parameter in the JSON encoded object may either contain a string, eg: {""key"": ""value""}
      • Filters can be configured by setting two parameters as seen in the example below:
        • "filter[0][attribute]":"created_at"
        • "filter[0][gt]":"2014-12-09 22:02:53"
      • User functions are supported with metadata containing data from sys.c-ex-magento-metadata.{config} table (see the example data below)
    • dataType: Type of data returned by the endpoint. It also describes a table name, where the results will be stored
    • dataField: Allows to override which field of the response will be exported. Only used with data API
      • If there's multiple arrays in the response "root" the extractor may not know which array to export and fail
      • If the response is an array, the whole response is used by default
      • If there's no array within the root, the path to response data must be specified in dataField
      • Can contain a path to nested value, dot separater (eg result.results.products)
    • rowId(required): An unique identificator of the configuration row

Example data

"endpoint","params","dataType","dataField","recursionParams","rowId"
"orders","{
""limit"":100,
""filter[0][attribute]"":""created_at"",
""filter[0][gt]"":{
    ""function"": ""date"",
    ""args"": [
      ""Y-m-d H:i:s"",
      {
        ""function"": ""strtotime"",
        ""args"": [{""metadata"":""jobs.lastStart.orders""}]
      }
    ]
  }
}","","","","orders"
"customers","{""limit"":100}","","","","customers"

Group API

Extractor run [/run]

Run extraction [POST]

JSON Parameters:

  • config (required) ... configuration id (name of configuration table)
  • Request (application/json)

    • Headers

        Accept: application/json
        X-StorageApi-Token: Your-Sapi-Token
      
    • Body

        {
            "config": "main"
        }
      
    • Schema

        {
            "type": "object",
            "required": true,
            "properties": {
                "config": {
                    "type": "string",
                    "required": true
                }
            }
        }
      
  • Response 201 (application/json)

      {
          "id": "48419532",
          "url": "https://syrup.keboola.com/queue/job/48419532",
          "status": "waiting"
      }
    

Generate OAuth token [/oauth{?token,config}]

Generate token from a web form/UI [POST]

  • Parameters

    • token = `` (required, string, 305-78945-rg48re4g86g48gwgr48e6) ... Your KBC Token

    • config = `` (required, string, main) ... Config table name / configuration ID

  • Request (multipart/form-data; boundary=----WebKitFormBoundaryC5GD12ZfR1D8yZIt)

    • Body

        ------WebKitFormBoundaryC5GD12ZfR1D8yZIt
        Content-Disposition: form-data; name="token"
      
        305-78954-d54f6ew4f84ew6f48ewq4f684q
        ------WebKitFormBoundaryC5GD12ZfR1D8yZIt--
      
        ------WebKitFormBoundaryC5GD12ZfR1D8yZIt
        Content-Disposition: form-data; name="config"
      
        main
        ------WebKitFormBoundaryC5GD12ZfR1D8yZIt--
      
    • Schema

        {
            "type": "object",
            "required": true,
            "properties": {
                "config": {
                    "type": "string",
                    "required": true
                }
                "token": {
                    "type": "string",
                    "required": true
                }
            }
        }
      
  • Response 201 (application/json)

      {
          "status": "ok"
      }
    

Generate token manually [GET]

  • Parameters

    • token = `` (required, string, 305-78945-rg48re4g86g48gwgr48e6) ... Your KBC Token

    • config = `` (required, string, main) ... Config table name / configuration ID

  • Response 201 (application/json)

      {
          "status": "ok",
          "oauth_token": "dsjioafhoiy832yt598y7895y",
          "oauth_token_secret": "kf98v0894u8j580jy8902xyjciurewc"
      }