Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Difference between PUT and PATCH request for API /pages/{page_id}/incidents/{incident_id}

Is there any difference between PUT and PATCH requests for /pages/{page_id}/incidents/{incident_id} URL to update an incident? I see same result using any of the above,

1 answer

0 votes
DPK J Community Leader Apr 11, 2020

@Sandeep_A  Welcome to the community!

There is slight difference here (https://developer.statuspage.io/#section/Basics)

 

  • PATCH - Update a single element
  • PUT - Replace a single element in a collection (rarely used)

 

This means that when you call PATCH on `Incident`, only field that you are passing as payload will be updated and rest will remain same.

With PUT, all fields will be updated (i.e. old field will be replaced), it will require to send all fields as payload.

As an example, I am trying to update a particular component associated with an incident with PATCH request as below. As a result of this request, the other components associated with this incident are removed and only the one in the request is present. Ideally, the PATCH request should have just updated the component listed in this request and leave the rest as is. Any thoughts ?

{
"incident": {
"name": "Sample incident modified",
"status": "monitoring",
"impact_override": "minor",
"body": "We are continuing to work on a fix for this issue. Monitoring",
"components": {
"2vjjt397ssd2": "operational"
},
"component_ids": [
"2vjjt397ssd2"
]
}
}

DPK J Community Leader Apr 11, 2020

@Sandeep_ABy general API conventions your assumption is correct, but not all API providers are equal. So I guess for Atlassian in case of StatusPage, you need to provide full set for 'components_ids'.

But I will check with Atlassian team, if this is a design bug.

Like Sandeep_A likes this

Sure Thanks!. For now, there is no difference in the way PUT and PATCH behaves for this end-point.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Statuspage

New feature: Slack notifications for Statuspage

We're excited to announce the release of a long-requested feature on Statuspage. Now visitors to your status page can subscribe to get notified in Slack when you report an incident or maintenance. Th...

883 views 0 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you