cancel
Showing results for 
Search instead for 
Did you mean: 

Web API Services - Custom Code example

HiagoSilva
Level 2
Hello, someone could give me a example of a Web API Service Request using Custom Code as Body Content?
1 BEST ANSWER

Best Answers

Hello Hiago,

Here is an example of JSON being sent as custom code to the JIRA API that we use in the CoE. You can send this body in different formats as long as the context is correct.

The square brackets are used to denote variables which we can manipulate for each individual post call.

{    {     "update": {},

"fields": {       

"project": {           
"id": "[project id]"       
},       
"parent": {           
"id": "[parent id]",           
"key": "[parent key]",                   
"self": "https://blueprism.atlassian.net/rest/api/2/issue/[parent id]"       
},       
"summary": "[summary]",       
"description": {         
"type": "doc",         
"version": 1,         
"content": [           
{             
"type": "paragraph",             
"content": [               
{                 
"type": "text",                 
"text": "[description]"               
}             
]           
}         
]       
},       
"issuetype": {       
"self": "https://blueprism.atlassian.net/rest/api/2/issuetype/10155",                   
"id": "10155",                   
"description": "Subtasks track small pieces of work that are part of a larger task.",                 
  "iconUrl": "https://blueprism.atlassian.net/secure/viewavatar?size=medium&avatarId=10316&avatarType=issuetype",                   
"name": "Subtask",                   
"subtask": true,                   
"avatarId": 10316,                   
"entityId": "ba2e8546-1eab-438f-a50e-c6f6a0065c23"     
  }                     
  }
}



------------------------------
Ronan Considine
------------------------------
Ronan Considine Senior Business Analyst Blue Prism

View answer in original post

2 REPLIES 2

Hello Hiago,

Here is an example of JSON being sent as custom code to the JIRA API that we use in the CoE. You can send this body in different formats as long as the context is correct.

The square brackets are used to denote variables which we can manipulate for each individual post call.

{    {     "update": {},

"fields": {       

"project": {           
"id": "[project id]"       
},       
"parent": {           
"id": "[parent id]",           
"key": "[parent key]",                   
"self": "https://blueprism.atlassian.net/rest/api/2/issue/[parent id]"       
},       
"summary": "[summary]",       
"description": {         
"type": "doc",         
"version": 1,         
"content": [           
{             
"type": "paragraph",             
"content": [               
{                 
"type": "text",                 
"text": "[description]"               
}             
]           
}         
]       
},       
"issuetype": {       
"self": "https://blueprism.atlassian.net/rest/api/2/issuetype/10155",                   
"id": "10155",                   
"description": "Subtasks track small pieces of work that are part of a larger task.",                 
  "iconUrl": "https://blueprism.atlassian.net/secure/viewavatar?size=medium&avatarId=10316&avatarType=issuetype",                   
"name": "Subtask",                   
"subtask": true,                   
"avatarId": 10316,                   
"entityId": "ba2e8546-1eab-438f-a50e-c6f6a0065c23"     
  }                     
  }
}



------------------------------
Ronan Considine
------------------------------
Ronan Considine Senior Business Analyst Blue Prism

ewilson
Staff
Staff
Hi Hiago,

FWIW - You might check out the DX Developer Portal. There are several resources (guides and videos) that discuss development in Blue Prism including use of the Web API service feature.

https://digitalexchange.blueprism.com/site/global/developer/

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------