Skip to main content

Sketch API v1.0.0

Api of the sketch's Fastify server in Nodejs.

info

You are viewing REST API documentation. This documentation is auto-generated from a swagger specification which itself is generated from annotations in the source code of the project. It is possible that this documentation includes bugs and that code samples are incomplete or wrong.

Authentication

  • HTTP Authentication, scheme: bearer

sketch

Sketch requests

Create a new sketch

PUT http://localhost:5555/api/sketch HTTP/1.1
Host: localhost:5555
Content-Type: application/json
Accept: application/json

Request body

{
"userId": "string",
"userEndpointId": "string"
}

Parameters

ParameterInTypeRequiredDescription
bodybodyobjectfalsenone
» userIdbodystringfalsenone
» userEndpointIdbodystringfalsenone

Responses

Overview
StatusMeaningDescriptionSchema
200OKA new sketch was createdInline
Response Schema

Status Code 200

A new sketch was created

NameTypeRequiredRestrictionsDescription
» sketchIdstringfalsenonenone
Examples

200 Response

{
"sketchId": "string"
}
caution

To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

Code samples

curl -X PUT http://localhost:5555/api/sketch \
-H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'

Join an existing sketch

PUT http://localhost:5555/api/sketch/{id} HTTP/1.1
Host: localhost:5555
Content-Type: application/json
Accept: application/json

Request body

{
"userId": "string",
"userEndpointId": "string"
}

Parameters

ParameterInTypeRequiredDescription
idpathstringtruesketch id
bodybodyobjectfalsenone
» userIdbodystringfalsenone
» userEndpointIdbodystringfalsenone

Responses

Overview
StatusMeaningDescriptionSchema
200OKSuccessfully joined sketchInline
404Not FoundSketch not foundInline
409ConflictUser has already joined the sketchInline
Response Schema

Status Code 200

Successfully joined sketch

NameTypeRequiredRestrictionsDescription
» sketchIdstringfalsenonenone
» versionintegerfalsenonenone

Status Code 404

Sketch not found

NameTypeRequiredRestrictionsDescription

Status Code 409

User has already joined the sketch

NameTypeRequiredRestrictionsDescription
Examples

200 Response

{
"sketchId": "string",
"version": 0
}
caution

To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

Code samples

curl -X PUT http://localhost:5555/api/sketch/{id} \
-H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'

Broadcast operations of a sketch

POST http://localhost:5555/api/sketch/{id} HTTP/1.1
Host: localhost:5555
Content-Type: application/json
Accept: application/json

Request body

{
"userId": "string",
"userEndpointId": "string",
"version": 0,
"payload": {
"events": [
{}
],
"target": {
"userId": "string",
"userEndpointId": "string"
}
}
}

Parameters

ParameterInTypeRequiredDescription
idpathstringtruesketch id
bodybodyobjecttruenone
» userIdbodystringtruenone
» userEndpointIdbodystringtruenone
» versionbodyintegerfalsenone
» payloadbodyobjecttruenone
»» eventsbody[object]truenone
»» targetbodyobjectfalsenone
»»» userIdbodystringfalsenone
»»» userEndpointIdbodystringfalsenone

Responses

Overview
StatusMeaningDescriptionSchema
200OKSuccessfully updated sketchInline
403ForbiddenForbiddenInline
404Not FoundSketch not foundInline
Response Schema

Status Code 200

Successfully updated sketch

NameTypeRequiredRestrictionsDescription
» sketchIdstringfalsenonenone
» versionintegerfalsenonenone

Status Code 403

Forbidden

NameTypeRequiredRestrictionsDescription

Status Code 404

Sketch not found

NameTypeRequiredRestrictionsDescription
Examples

200 Response

{
"sketchId": "string",
"version": 0
}
caution

To perform this operation, you must be authenticated by means of one of the following methods: bearerAuth

Code samples

curl -X POST http://localhost:5555/api/sketch/{id} \
-H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'

Schemas