ScanopyScanopy
User API Keys

Update a user API key

PUT
/api/v1/auth/keys/{id}
session_id<token>

Browser session cookie. Obtained via /api/auth/login.

In: cookie

Path Parameters

id*string

API key ID

Formatuuid

Request Body

application/json

name*string
organization_id*string
Formatuuid
tags*array<string>
user_id*string
Formatuuid
expires_at?string|null
Formatdate-time
is_enabled?boolean
network_ids?array<string>

Network IDs this key has access to (hydrated from junction table)

permissions?string
Value in"Owner" | "Admin" | "Member" | "Viewer"

Response Body

application/json

application/json

application/json

curl -X PUT "https://loading/api/v1/auth/keys/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",    "tags": [      "497f6eca-6276-4993-bfeb-53cbbbba6f08"    ],    "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"  }'
{
  "meta": {
    "api_version": 1,
    "server_version": "0.13.5"
  },
  "success": true,
  "data": {
    "key": "string",
    "last_used": "2019-08-24T14:15:22Z",
    "name": "string",
    "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
    "tags": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
    "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
    "expires_at": "2019-08-24T14:15:22Z",
    "is_enabled": true,
    "network_ids": [
      "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
    "permissions": "Owner",
    "created_at": "2019-08-24T14:15:22Z",
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "updated_at": "2019-08-24T14:15:22Z"
  },
  "error": "string"
}
{
  "success": true,
  "error": "string"
}
{
  "success": true,
  "error": "string"
}