DigitalOcean-public.v2-new_Project Resources
Assign Resources to a Project
To assign resources to a project, send a POST request to /v2/projects/$PROJECT_ID/resources.
You must have both project:update and <resource>:read scopes to assign new resources. For example, to assign a Droplet to a project, include both the project:update and droplet:read scopes.
post/v2/projects/{project_id}/resources
Path parameters
project_idstring uuid required
A unique identifier for a project.
Request body
Example request
{
"resources": [
"do:droplet:13457723"
]
}Response
The response will be a JSON object with a key called resources. The value of this will be an object with the standard resource attributes.
Only resources that you are authorized to see will be returned.
Example response
{
"resources": [
{
"urn": "do:droplet:13457723",
"assigned_at": "2018-09-28T19:26:37Z",
"links": {
"self": "https://api.digitalocean.com/v2/droplets/13457723"
},
"status": "ok"
},
{
"urn": "do:domain:example.com",
"assigned_at": "2019-03-31T16:24:14Z",
"links": {
"self": "https://api.digitalocean.com/v2/domains/example.com"
},
"status": "ok"
}
]
}