Skip to content

Commit

Permalink
docs: updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
ishanarya0 committed Sep 24, 2022
1 parent 5533fa6 commit 024dfdd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions plugins/extractors/http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ source:
method: "GET"
headers:
"API-TOKEN": "XXXXX"
"Content-Type": "application/json"
content_type: application/json
accept: application/json
response:
root: "data"
mapping:
Expand All @@ -26,7 +27,7 @@ source:
fullname: "name.fullname"
status: "terminated"
attributes:
business_title: "business_title"
business_title: "CONST.employee"
company_hierarchy: "company_hierarchy"
```

Expand All @@ -37,6 +38,8 @@ source:
| `request.url` | `string` | `https://odpf.io` | HTTP service URL | *required* |
| `request.path` | `string` | `employee/list` | Path to the service | *not required* |
| `request.method` | `string` | `GET` | HTTP request type | *required* |
| `request.content_type` | `string` | `application/json` | Request body content type | *not required, default: application/json* |
| `request.accept` | `string` | `application/json` | Expected response's content type | *not required, default: application/json* |
| `request.headers` | `key-value` | `"API-TOKEN": "XXXXX"` | Headers in to form of key value pairs. Supports multiple values seperated by `,` | *not required* |
| `response.root` | `string` | `data` | `.` seperated [json path](https://jsonpath.com/) representation to the key containing data | *required* |
| `response.mapping` | `nested key-value` | `-` | Defines how the data is to be mapped with the asset model. Uses json path representation wrt `root` | *-* |
Expand All @@ -46,6 +49,11 @@ source:
| `response.mapping.type` | `string` | `type: "user"` | One of `table, topic, dashboard, user, bucket, job` | *required* |
| `response.mapping.data` | `nested key-value` | `-` | Nested key-value based on the definition of asset type | *required* |

### Note:

To send constant values of fields in mapping, use `CONST` seperated by `.` and then the value.
For instance, `email: CONST.user@odpf.com`

## Outputs

Output can be any of the asset type.
Expand Down

0 comments on commit 024dfdd

Please sign in to comment.