{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/talend/json-schema/talend-service-account-schema.json",
  "title": "ServiceAccount",
  "description": "A service account represents a non-human user entity which could be a service, a job, a third-party system or alike. This account uses access tokens to authenticate and must have been assigned appropriate permissions to access the Talend services to be used.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/talend-account-api-openapi.yml#/components/schemas/ServiceAccount",
  "type": "object",
  "required": [
    "createdDate",
    "id",
    "lastModifiedDate",
    "name",
    "permissions"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "OAuth 2 client ID that is internally generated",
      "readOnly": true
    },
    "secret": {
      "type": "string",
      "description": "OAuth 2 client secret (internally generated and available only upon creation)",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "description": "Meaningful name"
    },
    "permissions": {
      "type": "array",
      "description": "Assigned permissions",
      "items": {
        "type": "string"
      }
    },
    "createdDate": {
      "type": "string",
      "format": "date-time",
      "description": "Creation date",
      "readOnly": true
    },
    "lastModifiedDate": {
      "type": "string",
      "format": "date-time",
      "description": "Last modification date",
      "readOnly": true
    },
    "lastUsedDate": {
      "type": "string",
      "format": "date-time",
      "description": "Last date & time when a token issued for the service account was used to call an API."
    },
    "lastUsedApi": {
      "type": "string",
      "description": "Last Talend API that was called with a service account access token issued for this service account."
    }
  }
}