v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_Project Resources

Assign Resources to Default Project

To assign resources to your default project, send a POST request to /v2/projects/default/resources.

You must have both project:update and <resource>:read scopes to assign new resources. For example, to assign a Droplet to the default project, include both the project:update and droplet:read scopes.

post/v2/projects/default/resources

Request body

resourcesUrn[]

A list of uniform resource names (URNs) to be added to a project. Only resources that you are authorized to see will be returned.

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"
    }
  ]
}