API: Creating a container in a specific project

This is a request as I believe it is not a feature in the current implementation of the API; correct me if I am wrong.

I curated this bit of botch list of end points that accept a project key https://github.com/turtle0x1/php-lxd/wiki/Endpoints-That-Use-Can-Filter-By-Projects

Creating a container is one of them

The LXD CLI does everything through the API, there is no separate way for our own tooling to interact with the daemon.

So if it’s possible to do something through the CLI, it’s in the API. Running with --debug will usually give you some hints as to what’s going on.

In this case:

DBUG[03-17|13:48:39] Sending request to LXD                   method=POST url="http://unix.socket/1.0/containers?project=blah" etag=
DBUG[03-17|13:48:39] 
	{
		"architecture": "",
		"config": {},
		"devices": {},
		"ephemeral": false,
		"profiles": null,
		"stateful": false,
		"description": "",
		"name": "c1",
		"source": {
			"type": "image",
			"certificate": "",
			"alias": "alpine/edge",
			"server": "https://images.linuxcontainers.org",
			"protocol": "simplestreams",
			"mode": "pull"
		},
		"instance_type": ""
	} 

Which shows the ?project= in the URL used for project targeting.

Did some API calls with ?project= and the result was as advertised. Thanks!