Table of Contents

Class AddHttpEndpoint

Namespace
DuetAPI.Commands
Assembly
DuetAPI.dll

Register a new HTTP endpoint via DuetWebServer. This will create a new HTTP endpoint under /machine/{Namespace}/{EndpointPath}. Returns a path to the UNIX socket which DuetWebServer will connect to whenever a matching HTTP request is received. A plugin using this command has to open a new UNIX socket with the given path that DuetWebServer can connect to

[RequiredPermissions(SbcPermissions.RegisterHttpEndpoints)]
public class AddHttpEndpoint : Command<string>
Inheritance
AddHttpEndpoint
Derived
Inherited Members

Constructors

AddHttpEndpoint()

public AddHttpEndpoint()

Properties

EndpointType

Type of the HTTP request

public HttpEndpointType EndpointType { get; set; }

Property Value

HttpEndpointType

IsUploadRequest

Whether this is an upload request

public bool IsUploadRequest { get; set; }

Property Value

bool
See Also

Namespace

Namespace of the plugin wanting to create a new third-party endpoint

public string Namespace { get; set; }

Property Value

string

Path

Path to the endpoint to register

public string Path { get; set; }

Property Value

string

Methods

UpdateFromJson(JsonElement)

Update this instance from a given JSON element

public override void UpdateFromJson(JsonElement jsonElement)

Parameters

jsonElement JsonElement

Element to update this intance from

Remarks

This method is auto-generated

Exceptions

JsonException

Failed to deserialize data

UpdateFromJsonReader(ref Utf8JsonReader)

Update this instance from a given JSON element

public override void UpdateFromJsonReader(ref Utf8JsonReader reader)

Parameters

reader Utf8JsonReader

Reader to update this intance from

Remarks

This method is auto-generated

Exceptions

JsonException

Failed to deserialize data

See Also