API

Comment

The comment on a Gandi product, by the product id: get, set or delete it.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /comment/comments/{id} create OK
GET /comment/comments/{id} load OK
DELETE /comment/comments/{id} remove No Content

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

comment, err := client.Comment(nil).Load(map[string]any{"entity_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(comment)
created, err := client.Comment(nil).Create(map[string]any{"entity_id": "example", "content": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)
removed, err := client.Comment(nil).Remove(map[string]any{"entity_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(removed)

Lua

Construct client as shown in the Lua setup, then call the operations:

local comment, err = client:Comment():load({ entity_id = "example" })
local created, err = client:Comment():create({ entity_id = "example", content = "example" })
local removed, err = client:Comment():remove({ entity_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$comment = $client->Comment()->load(["entity_id" => "example"]);
$created = $client->Comment()->create(["entity_id" => "example", "content" => "example"]);
$client->Comment()->remove(["entity_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

comment = client.Comment().load({"entity_id": "example"})
created = client.Comment().create({ "entity_id": "example", "content": "example" })
client.Comment().remove({"entity_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

comment = client.Comment.load({ "entity_id" => "example" })
created = client.Comment.create({ "entity_id" => "example", "content" => "example" })
client.Comment.remove({ "entity_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const comment = await client.Comment().load({ entity_id: "example" })
const created = await client.Comment().create({ entity_id: "example", content: "example" })
await client.Comment().remove({ entity_id: "example" })

Fields

Field Type Required Description
content string Yes Content
created_at string No Created At
errors array No Errors
id string Yes Id
status string Yes Status
updated_at string No Updated At
user object Yes User

create

POST /comment/comments/{id}

Operation ID: postCommentCommentsId.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes
Dry-Run header integer No

Request body

application/json

Property Type Required Description
content string Yes

Responses

200: OK

application/json

Property Type Required Description
errors array of object No
errors[].description string Yes
errors[].location enum: header, path, querystring, body Yes
errors[].name string Yes
status enum: success, error Yes
202: Accepted

application/json

Property Type Required Description
message string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes

load

GET /comment/comments/{id}

Operation ID: getCommentCommentsId.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

200: OK

application/json

Property Type Required Description
content string Yes
created_at string (date-time) No
id string Yes
updated_at string (date-time) No
user object No
user.id string Yes
user.name string Yes
user.sharing_id string Yes
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes

remove

DELETE /comment/comments/{id}

Operation ID: deleteCommentCommentsId.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

204: No Content
401: Unauthorized

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes
403: Forbidden

application/json

Property Type Required Description
cause string Yes
code integer Yes
message string Yes
object string Yes