Skip to content

Edit a resource.

PATCH
/api/resources/{resourceId}

Authorizations

Parameters

Path Parameters

resourceId*
Typestring
Required

Request Body

JSON
{
"name": "Programming",
"description": "Proficient in PHP and Vue",
"isPrivate": true,
"openness": 3,
"images": [
"string"
]
}

Responses

Success
JSON
{
"id": 0,
"name": "string",
"description": "string",
"user": {
"id": 0,
"name": "string",
"avatar": "string",
"isSleeping": true
},
"isHomeRegion": true,
"isUserActive": true,
"isPrivate": true,
"isFavorite": true,
"openness": 0
}

Samples

cURL
curl -X PATCH http://localhost/api/resources/{resourceId}
JavaScript
fetch("http://localhost/api/resources/{resourceId}", { method: "PATCH" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/resources/{resourceId}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.patch("http://localhost/api/resources/{resourceId}")
print(response.json())