Update Feature Object
This API is used to update or add new feature object to CDN
Request
PUT /v1/features/featuretoggles/65769081aabe7157eeab974d HTTP/1.1
Host: storage-dev.api.mimiland.io
mm-client-id: mml
mm-user-id: 6552e9dd1f835ac7ca4ba3ec
authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Length: 441
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="objectType"
featuretoggles
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="objectId"
646af2fbd76570508590d0ce
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="data"; filename="/C:/Users/ADMIN/Desktop/file.yaml"
Content-Type: <Content-Type header here>
(data)
------WebKitFormBoundary7MA4YWxkTrZu0gW--
const myHeaders = new Headers();
myHeaders.append("mm-client-id", "mml");
myHeaders.append("mm-user-id", "6552e9dd1f835ac7ca4ba3ec");
myHeaders.append("authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
myHeaders.append("Content-Type", "multipart/form-data");
const formdata = new FormData();
formdata.append("objectType", "featuretoggles");
formdata.append("objectId", "646af2fbd76570508590d0ce");
formdata.append("data", fileInput.files[0], "/C:/Users/ADMIN/Desktop/file.yaml");
const requestOptions = {
method: "PUT",
headers: myHeaders,
body: formdata,
redirect: "follow"
};
fetch("https://storage-dev.api.mimiland.io/v1/features/featuretoggles/65769081aabe7157eeab974d", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Last updated