Logo
Akamai APIs API Documentation

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.

 

Body PARAM

Key Datatype Required Description 
activate
string (Optional) Activates the stream at the time of the request, `false` by default. When you [Edit a stream](https://techdocs.akamai.com/datastream2/reference/put-stream) or [Patch a stream](https://techdocs.akamai.com/datastream2/reference/patch-stream) that is active, you need to set this member to `true`.



HEADERS

Key Datatype Required Description 
Content-Type
string
Accept
string




RESPONSES

status OK

{ "collectMidgress": true, "contractId": "C-0N7RAC7", "createdBy": "alfulani", "createdDate": "2022-02-05T13:31:30Z", "datasetFields": [ { "datasetFieldId": 1000, "datasetFieldJsonKey": "cp", "datasetFieldName": "CP code" }, { "datasetFieldId": 1002, "datasetFieldJsonKey": "reqId", "datasetFieldName": "Request ID" }, { "datasetFieldId": 1023, "datasetFieldJsonKey": "cookie", "datasetFieldName": "Cookie" } ], "deliveryConfiguration": { "fieldDelimiter": "SPACE", "format": "STRUCTURED", "frequency": { "intervalInSeconds": 30 }, "uploadFilePrefix": "logs", "uploadFileSuffix": "ds" }, "destination": { "bucket": "datastream.akamai.com", "compressLogs": true, "destinationType": "S3", "displayName": "S3Destination", "path": "ds2-logs", "region": "ap-south-1" }, "groupId": 32145, "latestVersion": 1, "modifiedBy": "alfulani", "modifiedDate": "2022-02-05T13:31:30Z", "notificationEmails": [ "useremail1@domain.com", "useremail2@domain.com" ], "productId": "Dynamic_Site_Accelerator", "properties": [ { "propertyId": 349772, "propertyName": "example.com" }, { "propertyId": 349770, "propertyName": "example.akamai.com" } ], "streamId": 7050, "streamName": "diagnostics-log-stream", "streamStatus": "ACTIVATING", "streamVersion": 1 }



Curl
curl -X PUT 'https://undefined/datastream-config-api/v2/log/streams/:streamId?activate=' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"collectMidgress":false,"contractId":"K-0N7RAK71","datasetFields":[{"datasetFieldId":1000},{"datasetFieldId":1002},{"datasetFieldId":1023}],"deliveryConfiguration":{"fieldDelimiter":"SPACE","format":"STRUCTURED","frequency":{"intervalInSeconds":30},"uploadFilePrefix":"logs","uploadFileSuffix":"ds"},"destination":{"accessKey":"X17x2f2+2MxT1Eh/KaBApKrAEUnetiD0LBbQybczlOwpJVJHPYlDwV99nFSvhDd6z0YTdhDUmy6inRHjQPLlsA==","accountName":"Digital Company","containerName":"rawslogscontainer","destinationType":"AZURE","displayName":"azure_destination","path":"logs/edgelogs/{%Y/%m/%d/%H/%M/%S}"},"notificationEmails":["useremail1@domain.com","useremail2@domain.com"],"properties":[{"propertyId":349772},{"propertyId":349770}],"streamName":"diagnostics-log-stream"}'

ENDPOINTS