# RunResourceAction runs a resource action

`POST /api/v1/applications/{name}/resource/actions`

Deprecated: use RunResourceActionV2 instead. This version does not support resource action parameters but is
maintained for backward compatibility. It will be removed in a future release.

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  }
]
```

- bearer: apiKey, header Authorization. A token sent as `Authorization: Bearer <token>`. [API Docs](https://sourcey-argocd.pages.dev/developer-guide/api-docs/index.md#authorization) shows how to get one.

Parameters:

- `name` (path, string, required)
  Type: string

- `namespace` (query, string, optional)
  Type: string

- `resourceName` (query, string, optional)
  Type: string

- `version` (query, string, optional)
  Type: string

- `group` (query, string, optional)
  Type: string

- `kind` (query, string, optional)
  Type: string

- `appNamespace` (query, string, optional)
  Type: string

- `project` (query, string, optional)
  Type: string

Request body: application/json (required)

Type: string

Responses:

- 200: A successful response.

Content type: application/json

Type: object

Schema: [applicationApplicationResponse](https://sourcey-argocd.pages.dev/api/models/applicationapplicationresponse/index.md)

- default: An unexpected error response.

Content type: application/json

Type: object

Schema: [runtimeError](https://sourcey-argocd.pages.dev/api/models/runtimeerror/index.md)

- `code` (optional)
  Type: integer, int32

- `details` (optional)
  Type: array
  
  Items:
    Reference: [protobufAny](https://sourcey-argocd.pages.dev/api/models/protobufany/index.md); Type: object

- `error` (optional)
  Type: string

- `message` (optional)
  Type: string

## Examples

### cURL

```bash
curl -X POST 'https://argocd.example.com/api/v1/applications/string/resource/actions' \
  -H 'Authorization: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '"string"'
```

### JavaScript

```javascript
const response = await fetch('https://argocd.example.com/api/v1/applications/string/resource/actions', {
  method: 'POST',
  headers: {
    'Authorization': 'YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body: '"string"',
});

const data = await response.text();
```

### Python

```python
import requests

response = requests.post(
    'https://argocd.example.com/api/v1/applications/string/resource/actions',
    data='"string"'.encode('utf-8'),
    headers={
        'Authorization': 'YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
