Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to use REST POST API to create a JIRA issue

Keval Shah July 26, 2021

Gived 400 error

4 answers

0 votes
Keval Shah July 26, 2021

URL: 

https://engsupport.juniper.net/rest/api/2/issue/

Payload: {'fields': {'summary': 'Startup fails with external IAM','assignee': {'name': None}, 'components': [{'id': '14914'}], 'fixVersions': [{'id': '10818'}], 'labels': ['project::Insights'], 'project': {'key': 'DV'}}}

Joseph Chung Yin
Community Champion
July 26, 2021

I am not a technical developer, but I believe there is a problem with your payload element against the assignee field.

I could be wrong, 

Best, Joseph

0 votes
Keval Shah July 26, 2021

@Joseph Chung Yin  I have checked the code, shared the payload and url. Thanks

0 votes
Keval Shah July 26, 2021

URL: https://engsupport.juniper.net/rest/api/2/issue/
Payload: 

{'fields': {'summary': 'Startup fails with external IAM', 'description': 'Gateway is not starting whe external IAM is used as there is a hardcoded upstream path `iam.healthbot.svc.cluster.local` for iam. \n\n\nGateway logs:\n\n```\nubuntu@ip-10-49-195-169:~$ kubectl logs gateway-5487c788d9-dcj5h -n healthbot\n2021/07/23 21:39:11 [emerg] 1#1: host not found in upstream "iam.healthbot.svc.cluster.local" in /etc/nginx/include/iam.conf:19\nnginx: [emerg] host not found in upstream "iam.healthbot.svc.cluster.local" in /etc/nginx/include/iam.conf:19\n```\n\nSystem config:\n```\n[iam]\nIAM_IMAGE_NAME = healthbot_iam\nIAM_SERVER = iam\nIAM_SERVER_PORT = 9091\nIAM_SERVER_PROTOCOL = https\nIAM_NAMESPACE = atom-iam\nPOSTGRES_PORT = ${api-server:POSTGRES_PORT}\nPOSTGRES_HOST = ${postgres:POSTGRES_HOST}\nPOSTGRES_SUPER_USER = ${postgres:POSTGRES_SUPER_USER}\nSKIP_MAIL_VERIFICATION = true\nDISABLE_SMTP_SETTINGS = true\n```\n\nStatus:\n\n```\nroot@config-server-75774bc78b-czdk8:/var/local/healthbot# ./healthbot.py status\nName of service                                                                                           Status\n---------------------------------------------------------------------------------------------------------------------------------------------------------------\nalerta                                                                                                    Up\napi-server                                                                                                Up\nargo-server                                                                                               Up\nauditlog                                                                                                  Not found\nconfig-server                                                                                             Up\nconfigmanager                                                                                             Up\ndebugger                                                                                                  Up\ngateway                                                                                                   0/1 ready\ngrafana                                                                                                   Up\nhb-proxy-syslog                                                                                           Up\nhbmon                                                                                                     Up\niam                                                                                                       Not installed (external service iam.atom-iam:9091)\ninference-engine                                                                                          Up\ninfluxdb(ip-10-49-108-136.eu-west-3.compute.internal)                                                     Up\ningest-snmp-proxy                                                                                         Up\nlicense-client                                                                                            Up\nmetallb                                                                                                   Not installed\nmgd                                                                                                       Up\npostgres                                                                                                  Up\nredis(rfr-redis)                                                                                          Up\nredis(rfs-redis)                                                                                          Up\nredisoperator                                                                                             Up\nreports                                                                                                   Up\ntsdb-shim                                                                                                 Up\nudf-farm                                                                                                  Up\nworkflow-controller                                                                                       Up\nroot@config-server-75774bc78b-czdk8:/var/local/healthbot#\n```\n\nAutomatically created by healthbot-ci from: https://ssd-git.juniper.net/iceberg/healthbot-gateway/-/issues/18', 'assignee': {'name': None}, 'components': [{'id': '14914'}], 'fixVersions': [{'id': '10818'}], 'labels': ['project::Insights'], 'project': {'key': 'DV'}}}

0 votes
Joseph Chung Yin
Community Champion
July 26, 2021

@Keval Shah -

Welcome to the community.  A The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

I would recommend you to reference - https://docs.atlassian.com/jira-servicedesk/REST/4.18.1/ to check your codes first.

Just providing "Gived 400 error" is not enough for the community members to offer assistance.  Need more details information from you.

Best, Joseph Chung Yin

Jira/JSM Functional Lead, Global Infrastructure Applications Team

Viasat Inc.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events