Forum Stats

  • 3,757,175 Users
  • 2,251,204 Discussions
  • 7,869,751 Comments

Discussions

405 response when using the jobs Planning API Resource

Desmond
Desmond Member Posts: 28 Blue Ribbon

Hello I am trying to use the jobs API resource as below in Python but I keep getting a 404 response status. Can you please tell me what I am missing ?

import requests

username = '<user name>'

password = '<password>'

iddomain = 'annnnnnn'

serv_url = 'https://epm11-test-' + iddomain + '.epm.ap1.oraclecloud.com

session = requests.Session()

session.auth = (iddomain + '.' + username, password)

application = '<PBCS App Name>'

payload = {'jobType':'Rules','jobName':'<Business Rule Name>'}

headers = {'Content-Type': 'application/json'}

api = f'/HyperionPlanning/rest/v3/applications/{application}/jobs'

r = session.post(serv_url + api, headers=headers, data=payload)

print (r.status_code)


I can successfully upload a data file and update substitution variables but I can't get the job API resource to work.


Any pointers , guesses as to what I could try would help.


Thanks !