Update a Project
You can update the details of a project by sending a PATCH request to the /project
endpoint.
Update the details of a project
PATCH
https://api.playfix.io/project/<project_name>
Path Parameters
project_name*
String
The project name
. This will start with "projects/" followed by a ULID.
Example: projects/01g55rpe1a2kxnm1t3f90dy9ke
Query Parameters
updateMask
String
Set this parameter to the list of fields you want to update, separated by commas. Example: updateMask=title,descr
iption,image_cover_cid
Headers
Authorization*
String
The access token you get from the authorization process.
Example:
Bearer <your_access_token>
Request Body
imageCoverCid
String
IPFS CID for the image to use as the project cover when it is displayed in the user interface.
description
String
A short description of your project.
Use a concise but descriptive sentence between 30 and 70 characters is recommended
title
String
The title of your project. You should use a concise, human-readable title of a few words, each separated by a space.
{
"name":"<project_name>",
"title":"Big Block",
"description":"Another great block party game for you and me",
"imageCoverUrl":"https://ipfs-gateway.playfix.io/ipfs/QmXTcXRdDaPWnNHHVDroaFo1Nu1WSE1yPmBZv8Ne1MicHe",
"imageCoverCid":"QmXTcXRdDaPWnNHHVDroaFo1Nu1WSE1yPmBZv8Ne1MicHe"
}
Example cURL API Call
curl --request PATCH \
--url 'https://api.playfix.io/project/<project_name>?updateMask=title,description,image_cover_cid' \
--header 'Authorization: Bearer <your_access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"title": "Block Party1",
"description": "Another good block party game for you and me",
"imageCoverCid": "QmXTcXRdDaPWnNHHVDroaFo1Nu1WSE1yPmBZv8Ne1MicHe"
}'
Example Python API Call
import requests
import json
payload = {
"title": "Block Party1",
"description": "Another good block party game for you and me",
"imageCoverCid": "QmXTcXRdDaPWnNHHVDroaFo1Nu1WSE1yPmBZv8Ne1MicHe"
}
r = requests.patch(
"https://api.playfix.io/project/<project_name>?updateMask=title,description,image_cover_cid",
headers = {
"Authorization": "Bearer <your_access_token>",
"Accept": "application/json",
"Content-Type": "application/json"
},
data = json.dumps(payload)
)
print(r.text)
The example above updates the title, description, and image CID of the project.
Response Body
{
"name":"<project_name>",
"title":"Big Block",
"description":"Another great block party game for you and me",
"imageCoverUrl":"https://ipfs-gateway.playfix.io/ipfs/QmXTcXRdDaPWnNHHVDroaFo1Nu1WSE1yPmBZv8Ne1MicHe",
"imageCoverCid":"QmXTcXRdDaPWnNHHVDroaFo1Nu1WSE1yPmBZv8Ne1MicHe"
}
Response Fields
The response is an object with the project details.
name
- The name that uniquely identifies the project.title
- The title of the project.description
- A short description of the project.imageCoverUrl
- URL to an IPFS gateway that fetches the cover image of the project.imageCoverCid
- IPFS CID for the cover image of the project.
Last updated