Logo
Akamai APIs API Documentation

DataStream 2 API v2

Number of APIs: 14


1. Groups - List groups

GET https://{{host}}/datastream-config-api/v2/log/groups

Returns access groups with contracts on your account. You can later use the groupId and contractId values to create and view streams or list properties by group. Set the contractId query parameter to get groups for a specific contract.



2. Properties - List properties by group

GET https://{{host}}/datastream-config-api/v2/log/groups/:groupId/properties

Returns properties that are active on the production and staging network and available within a specific group. Run this operation to get and store the propertyId values for the Create a stream and Edit a stream operations.



3. Data sets - List data set fields

GET https://{{host}}/datastream-config-api/v2/log/datasets-fields

Returns the list of available data set fields you can choose to monitor in your logs in a stream configuration. Set the productId query parameter to get data sets available for a specific product. See the Create a stream or Edit a stream operations.



4. Streams - Create a stream

POST https://{{host}}/datastream-config-api/v2/log/streams

Creates a stream configuration. Within a stream configuration, you can select properties to monitor in the stream, data set fields to collect in logs, and a destination to send these log files to. Get the streamId value from the response to use in the https://{hostname}/datastream-config-api/v2/log/streams/{streamId} endpoint URL. Apart from the log and delivery frequency configurations, you can decide whether to activate the stream on making the request or later using the activate parameter. Note that only active streams collect and send logs to their destinations. See Activate a stream.



5. Streams - List streams

GET https://{{host}}/datastream-config-api/v2/log/streams

Returns the latest versions of the stream configurations for all groups within your account. You can use the groupId parameter to view the latest versions of all configurations in a specific group, and up to five property names as the propertyName parameter to get streams for specific properties.



6. Streams - View upload metrics

GET https://{{host}}/datastream-config-api/v2/log/streams/metrics?start={{start}}&end={{end}}

Returns aggregated metrics for log file uploads, including success or failure upload counts, upload latency, and the volume of data uploaded in the stream. Set the start and end dates to get metrics from a specific time range, and aggregationInterval to group data by time intervals.



7. Streams - Get a stream

GET https://{{host}}/datastream-config-api/v2/log/streams/:streamId

Returns information about any version of a stream, including details about the monitored properties, logged data set fields, and log delivery destination. If you omit the version query parameter, this operation returns the last version of the stream.



8. Streams - Edit a stream

PUT https://{{host}}/datastream-config-api/v2/log/streams/:streamId

Updates the latest version of a stream. Running this operation creates a version of the stream that replaces the existing one. Note that only active streams collect and send logs to their destinations. You need to set the activate parameter to true while patching active streams, and optionally for inactive streams if you want to activate them upon request. See Version management and Activate a stream.



9. Streams - Patch a stream

PATCH https://{{host}}/datastream-config-api/v2/log/streams/:streamId

Updates selected details of an existing stream. Running this operation using JSON Patch syntax creates a stream version that replaces the current one. Currently you can patch a stream using only the REPLACE operation. When updating configuration objects such as destination or deliveryConfiguration, pass a complete object to avoid overwriting current details with default values for omitted members such as tags, uploadFilePrefix, and uploadFileSuffix. Note that only active streams collect and send logs to their destinations. You need to set the activate parameter to true while patching active streams, and optionally for inactive streams if you want to activate them upon request. See Patching streams for details.



10. Streams - Delete a stream

DELETE https://{{host}}/datastream-config-api/v2/log/streams/:streamId

Deletes a deactivated stream. Deleting a stream means that you can't activate this stream again, and that you stop receiving logs for the properties that this stream monitors. Before deleting any stream, you need to deactivate it first. See Deactivate a stream.



11. Activations - Activate a stream

POST https://{{host}}/datastream-config-api/v2/log/streams/:streamId/activate

Activates the latest version of a stream. Activating a stream takes approximately an hour. Once a stream is active, and the DataStream behavior is enabled in Property Manager, it replaces the previous active version which is deactivated by default, starts collecting data and sending log files to a destination. If you want to stop receiving the logs, you can deactivate the stream at any time. See the Deactivate a stream operation.



12. Activations - View activation history

GET https://{{host}}/datastream-config-api/v2/log/streams/:streamId/activation-history

Returns the details of activation status changes for all versions of a given stream.



13. Activations - Deactivate a stream

POST https://{{host}}/datastream-config-api/v2/log/streams/:streamId/deactivate

Deactivates the latest version of a stream. Deactivating a stream means that you stop receiving logs for the properties that this stream monitors and changes status to DEACTIVATED in approximately an hour. If you want to start receiving log files again, you can activate the stream at any time using the Activate a stream operation.



14. History - View history

GET https://{{host}}/datastream-config-api/v2/log/streams/:streamId/history

Returns details about all versions of a given stream. It helps you track changes between the versions of the stream, including monitored properties, logged data set fields, and log delivery destinations. Optionally, set both the startVersion and endVersion parameters to get details on all stream versions for a given range. For example, setting startVersion to 1 and endVersion to 3 returns details on the 1, 2, and 3 versions of the stream.



ENDPOINTS