latestOpenAPI 3.0.12026-08-20112309904.6 KB
466169815b78
Scores - Enterprise Export
Get Export Configuration
Retrieve the current export configuration for the authenticated user.
This endpoint returns the user's active export job configuration, which determines:
- Which collections, targets, and perspectives to include
- How frequently the export job runs (interval)
- Whether the job is currently enabled
- Whether to include detailed score components and subcomponents
Configuration Behavior:
Run Intervals:
- SIX_HOURS: Job runs every 6 hours (minimum interval)
- TWELVE_HOURS: Job runs every 12 hours
- DAILY: Job runs once every 24 hours
- WEEKLY: Job runs once every 168 hours (7 days)
- The scheduler checks for due executions periodically, so actual execution may occur shortly after the interval elapses
Enabled State:
- When enabled is true, the job will automatically run based on the configured runInterval
- When enabled is false, the job will not execute, even if the interval has elapsed
- Jobs only run if they are both enabled AND due based on the last execution time
Collections and Targets:
- collectionIds: List of Prewave Collection IDs. All targets within these collections will be included in the export
- targetIds: List of specific Target IDs to include. These are combined with targets from collections (union operation)
- Targets from collections and individual target IDs are merged together (no duplicates)
- If a collection is empty or contains no accessible targets, it will be skipped during execution
- To get collection IDs: Use endpoints from the Collections API:
- GET /public/v1/collections - List all accessible collections (returns id field for each collection)
- GET /public/v1/collections/{collectionId} - Get a specific collection by ID
- To get target IDs: Use endpoints from the Suppliers API:
- GET /public/v2/suppliers/sites - List all supplier sites (returns prewaveTargetId field for each supplier)
- GET /public/v2/suppliers/sites/find-by-identifier?prewaveId={targetId} - Get a specific supplier by ID
Perspectives:
- perspectiveIds: List of Perspective IDs for which scores should be calculated
- Required for active configurations - must contain at least one perspective ID when creating or updating a configuration
- ⚠️ Important: If perspectiveIds is empty, the endpoint will accept the configuration but no scores will be generated during execution
- In the default response (when no configuration exists), perspectiveIds will be empty ([]), indicating an incomplete/disabled configuration
- Scores are calculated for each combination of (target × perspective)
- All specified perspectives must be accessible to the user
- Example: If you have 10 targets and 2 perspectives, 20 score calculations will be performed
Components:
- includeComponents: When true, the export results will include detailed score components and subcomponents
- When false, only top-level scores and risk levels are included
- Enabling components increases the response size but provides more granular score breakdowns
Response Format:
- If no configuration exists, a default configuration will be returned with:
- Empty collectionIds and targetIds lists
- Empty perspectiveIds list
- enabled set to false
- runInterval set to WEEKLY
- includeComponents set to false
- ⚠️ Note: While the default configuration shows perspectiveIds as empty, this is not a valid configuration for generating scores. You must provide at least one perspective ID when creating or updating the configuration, otherwise no scores will be generated during execution.
- All configuration fields are returned as specified in the response schema
- The runInterval field defaults to WEEKLY if not explicitly set
Using the Configuration:
- Check Configuration: Use this endpoint to verify your current export configuration
- Update Configuration: Use POST /public/v1/enterprise-export/scores/config to create or update the configuration
- Retrieve Results: After a job executes, use GET /public/v1/enterprise-export/scores to retrieve score results
- Check Errors: Use GET /public/v1/enterprise-export/scores/errors to view any errors that occurred during execution
Important Notes:
- The configuration is user-specific - each user has their own export configuration
- Jobs run asynchronously - execution may take time depending on the number of targets and perspectives
- Results are only available after at least one successful execution has completed
- If no results are available yet, GET /public/v1/enterprise-export/scores will return an empty page
- Collection access is validated before execution - if you lack access to specified collections, the execution will fail
- The last successful execution's results are always available via the scores endpoint
Required Permission: ACCESS_ENTERPRISE_EXPORT_API
get/public/v1/enterprise-export/scores/config
Response
Configuration successfully retrieved
Example response
{
"runInterval": "WEEKLY",
"enabled": true,
"collectionIds": [
123,
456,
789
],
"targetIds": [
101,
202,
303,
102006215
],
"perspectiveIds": [
1,
2,
3
]
}