jamesives/Fetch API Data

This action will handle authenticated API requests, allowing you to save the data from the request into your workspace.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
endpointThe URL of the endpoint you would like to retrieve data from.yes
configurationAny applicable configuration settings that should be set such as authentication tokens. You can reference secrets using the secrets syntax, or you can reference data returned from the `TOKEN_ENDPOINT` request using the triple bracket syntax.no
token-endpointIf the `ENDPOINT` API requires you to make a request to get an access token prior to fetching data you can perform this task by specifying a token endpoint. Any data returned from the token end can be referenced in the `CONFIGURATION` variable using the triple bracket syntax.no
token-configurationAny applicable configuration settings that should be set such as authentication tokens. You can reference secrets using the secrets syntax.no
retryIf you are working with an intermittent API you can toggle this option to true. Doing so will make the action try the request 3 times at random invervals before failing.no
save-locationBy default the save location of the JSON file is `fetch-api-data-action/data.json`, if you would like to override the directory you can do so by specifying a new one with this variable.no
save-nameYou can override the name of the exported `.json` file by specifying a new one here. You should _not_ include the file extension in your name.no
variable-nameYou can override the name of the variable name the action exports. This will work so long as set-output is true.no
set-outputDetermines if the returned data should be saved as an environment variable or not. This field defaults to `true`, but depending on your API response length you may need to toggle this.notrue
debugIf set to true the action will log the API responses it receives in the terminal.no
formatAllows you to modify the format of the saved file, for example you can use txt here to save the file as a txt file. This field defaults to json.no
encodingAllows you to specify the encoding the saved file, can be of type BufferEncoding: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex".no
namedescription
fetchApiDataThe requested data from the API stored as a string.