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.

Request Params

KeyDatatypeRequiredDescription
activatestring(Optional) Activates the stream at the time of the request, false by default. When you Edit a stream or Patch a stream that is active, you need to set this member to true.

Request Body

{"0"=>{"op"=>"REPLACE", "path"=>"/streamName", "value"=>"DD Raw logs"}, "1"=>{"op"=>"REPLACE", "path"=>"/datasetFields", "value"=>[{"datasetFieldId"=>1000}, {"datasetFieldId"=>1002}, {"datasetFieldId"=>1023}]}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

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}