Resource serving API
This section covers the API for serving resources from the resource serving service to a Onegini application like the IdP Extension. The overview of the solution is available on external-resource-refresh.md
Configuration
See Onegini Application configuration
Fetch resources' paths
Request
- Endpoint
/api/v1/resource/paths
- Request method:
GET
- Parameters
- Authentication: None
Parameter name | Description | Default | Example |
---|---|---|---|
instance_id | Unique identifier for an application instance | 7e0ba28f-bd65-46be-bea8-0a4a1b4677bc | |
path | Path to specific directory in S3 to list paths. | / | extension-resources |
directories_only | Return only directories for the given path. | false | true |
Successful response
The response all paths with provided base path.
[
"7e0ba28f-bd65-46be-bea8-0a4a1b4677bc/cim/extension-resources/messages/messages.properties",
"7e0ba28f-bd65-46be-bea8-0a4a1b4677bc/cim/extension-resources/static/static-file.html",
"7e0ba28f-bd65-46be-bea8-0a4a1b4677bc/cim/extension-resources/email-templates/email.html"
]
Fetch resources
Request
- Endpoint
/api/v1/resource
- Request method:
GET
- Authentication: None
Parameters:
Parameter name | Description | Example |
---|---|---|
path | path to resource in S3 | instance%2Fresource%2Ffile.txt |
Successful Response
The requested resource
Possible Errors
Http status code | Error Description |
---|---|
400 | One or more of the parameters are wrongly formatted or not available |
404 | Resource with the given path couldn't be found |
500 | Unexpected response from the resource serving service |