Skip to main content
POST
/
projects
/
{project_id}
/
resources
/
deactivate
Deactivate Resource
curl --request POST \
  --url https://api.example.com/projects/{project_id}/resources/deactivate
import requests

url = "https://api.example.com/projects/{project_id}/resources/deactivate"

response = requests.post(url)

print(response.text)
const options = {method: 'POST'};

fetch('https://api.example.com/projects/{project_id}/resources/deactivate', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.example.com/projects/{project_id}/resources/deactivate",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/projects/{project_id}/resources/deactivate"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/projects/{project_id}/resources/deactivate")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/projects/{project_id}/resources/deactivate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
{
  "provider": "<string>",
  "resource": "<string>",
  "name": "<string>",
  "project_id": "<string>",
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "config": {},
  "resolved_config": {},
  "dependencies": [],
  "owner_references": [],
  "outputs": {},
  "error": "<string>",
  "lifecycle_state": "draft",
  "health": "healthy",
  "health_message": "<string>",
  "pending_event_id": "<string>",
  "pending_event_type": "<string>",
  "provisioned": false,
  "reconcile_count": 0,
  "version": 0,
  "tags": [
    "<string>"
  ],
  "provider_version": "<string>"
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Path Parameters

project_id
string
required

Query Parameters

provider
string
required

Provider name

resource
string
required

Resource type

name
string
required

Resource name

reveal
boolean
default:false

Reveal sensitive field values

Response

Successful Response

Domain model for resources with provider/resource identity and 5-state lifecycle.

Identity fields (frozen - immutable after creation): provider: Provider that manages this resource type. resource: Resource type name. name: Unique resource instance name.

Configuration fields (mutable): config: Original user-submitted resource configuration. Contains raw field references and dependency markers as submitted by the user. resolved_config: Resolved configuration with field references and dependency markers expanded. Contains field_ref markers with resolved_value and dependency markers with ref data. Set when transitioning to PENDING state. None when resource is in DRAFT state or not yet resolved. dependencies: References to resources this resource depends on. owner_references: References to resources that own this resource for lifecycle coordination and cascading deletes.

Output fields (provider-managed): outputs: Resource outputs from provider processing. error: Error message when resource is in FAILED state.

Lifecycle fields (system-managed): lifecycle_state: Current state (DRAFT/PENDING/PROCESSING/READY/FAILED). pending_event_id: Event ID currently being processed (set on PROCESSING, cleared on READY/FAILED). Used for response idempotency validation. provisioned: Whether the resource was successfully created at least once. Used to distinguish failed creates (retry CREATE) from failed updates (retry UPDATE).

Versioning fields (system-managed): provider_version: Semver of the provider version that last processed this resource. Set automatically when the resource transitions to PENDING. None for platform resources or pre-versioning backfill.

Ownership fields (system-managed): managed_by: Ownership discriminator. user for resources the caller owns and controls, platform for platform-managed resources (platform agents, tier resources, platform-default LLM provider) that reject user writes. None is the legacy unmanaged default for backfilled records.

Categorization fields (mutable): tags: Optional list of tags for categorization and filtering.

Inherited from PragmaModel: created_at: Creation timestamp (frozen). updated_at: Last update timestamp (mutable).

provider
string
required
resource
string
required
name
string
required
project_id
string
required
id
string
required
read-only

External resource ID for API responses: provider/resource/name.

created_at
string<date-time>
updated_at
string<date-time>
config
Config · object
resolved_config
Resolved Config · object | null
dependencies
ResourceReference · object[]
owner_references
OwnerReference · object[]
outputs
Outputs · object
error
string | null
lifecycle_state
enum<string>
default:draft

Lifecycle states for resources.

Available options:
draft,
waiting,
pending,
processing,
ready,
failed,
deleting
health
enum<string>
default:healthy
Available options:
healthy,
degraded
health_message
string | null
pending_event_id
string | null
pending_event_type
string | null
provisioned
boolean
default:false
reconcile_count
integer
default:0
version
integer
default:0
tags
string[] | null
provider_version
string | null
managed_by
enum<string> | null
Available options:
user,
platform