Forum Discussion

jegan's avatar
5 years ago

SDT - API issue

Hello Team,


Am trying to set SDT for service instance using API which is recommended in site. When I run script am getting below error. Could you please help me on this where I am doing mistake. 



Response Status: 200
Response Body: {"data":null,"errmsg":"No such Website","status":1400}


Script content 


#Request Info
httpVerb ='POST'
resourcePath = '/sdt/sdts'
data = '{"sdtType":1,"type":"ServiceSDT","serviceId":119,"startDateTime":1562321776000,"endDateTime":1562408176000}'

#Construct URL
url = 'https://'+ Company +'' + resourcePath

#Get current time in milliseconds
epoch = str(int(time.time() * 1000))

#Concatenate Request details
requestVars = httpVerb + epoch + data + resourcePath

#Construct signature
hmac =,msg=requestVars,digestmod=hashlib.sha256).hexdigest()

signature = base64.b64encode(hmac)

#Construct headers
auth = 'LMv1 ' + AccessId + ':' + signature + ':' + epoch
headers = {'Content-Type':'application/json','Authorization':auth}

#Make request
response =, data=data, headers=headers)

#Print status and body of response
print 'Response Status:',response.status_code
print 'Response Body:',response.content

1 Reply

Replies have been turned off for this discussion
  • Based on the error message "No such Website" I would verify that serviceId 119 is valid and the correct id of an individual website check and not a website group or resource.