- Home
- API Enriched
- Shape
- shape
- Create Report.
Create Report.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/shape/csd/namespaces/example/reports';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"generate_on_create":true,"namespace":"example","report_criteria":{"affected_users":{"end_time":"example","filters":[{"column_name":"example","operator":"REPORT_FILTER_OPERATOR_UNSPECIFIED","values":["example"]}],"script_id":"example","start_time":"example"},"scripts":{"end_time":"example","filters":[{"column_name":"example","operator":"REPORT_FILTER_OPERATOR_UNSPECIFIED","values":["example"]}],"start_time":"example"}},"report_name":"example","report_type":"REPORT_TYPE_UNSPECIFIED"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/shape/csd/namespaces/example/reports \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "generate_on_create": true, "namespace": "example", "report_criteria": { "affected_users": { "end_time": "example", "filters": [ { "column_name": "example", "operator": "REPORT_FILTER_OPERATOR_UNSPECIFIED", "values": [ "example" ] } ], "script_id": "example", "start_time": "example" }, "scripts": { "end_time": "example", "filters": [ { "column_name": "example", "operator": "REPORT_FILTER_OPERATOR_UNSPECIFIED", "values": [ "example" ] } ], "start_time": "example" } }, "report_name": "example", "report_type": "REPORT_TYPE_UNSPECIFIED" }'Create a report configuration.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace Namespace.
Request Bodyrequired
Section titled “Request Bodyrequired”Request to create a report configuration.
object
Automatically generate report upon creation.
Namespace
object
object
Format: unix epoch timestamp in seconds Fetch users whose timestamp <= end_time.
Additional filters for the query.
Filter definition for report criteria.
object
Column name to filter.
Filter values.
Script ID to filter affected users by.
Format: unix epoch timestamp in seconds Fetch users whose timestamp >= start_time.
object
Format: unix epoch timestamp in seconds Fetch scripts whose timestamp <= end_time.
Additional filters for the query.
Filter definition for report criteria.
object
Column name to filter.
Filter values.
Format: unix epoch timestamp in seconds Fetch scripts whose timestamp >= start_time.
Human-readable name for the report.
Responses
Section titled “Responses”A successful response.
Response after creating a report.
object
object
Creation timestamp.
User who created the report.
Namespace
object
object
Format: unix epoch timestamp in seconds Fetch users whose timestamp <= end_time.
Additional filters for the query.
Filter definition for report criteria.
object
Column name to filter.
Filter values.
Script ID to filter affected users by.
Format: unix epoch timestamp in seconds Fetch users whose timestamp >= start_time.
object
Format: unix epoch timestamp in seconds Fetch scripts whose timestamp <= end_time.
Additional filters for the query.
Filter definition for report criteria.
object
Column name to filter.
Filter values.
Format: unix epoch timestamp in seconds Fetch scripts whose timestamp >= start_time.
Unique report identifier.
Human-readable name for the report.
Update timestamp.
User who last updated the report.
Example
{ "report": { "report_criteria": { "affected_users": { "filters": [ { "operator": "REPORT_FILTER_OPERATOR_UNSPECIFIED" } ] }, "scripts": { "filters": [ { "operator": "REPORT_FILTER_OPERATOR_UNSPECIFIED" } ] } }, "report_type": "REPORT_TYPE_UNSPECIFIED" }}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example