Skill Invocation

The payload of a Box skill as sent to a Custom Skill's invocation_url.

string / date-time
2012-12-12T10:53:43-08:00

The time this invocation was created.

The enterprise that this invocation was triggered for

The event that triggered this invocation

string
fd1d2e53-35f5-41fb-9c25-4ba326daf2f9_341016304

Unique identifier for the invocation request.

The skill that triggered this invocation

The item that caused the invocation to trigger

object
Example

Additional status information.

string
400

Error code information, if error occurred.

string
Example

Status information

string
invoked

The state of this event.

  • invoked - Triggered the skill with event details to start applying skill on the file.
  • processing - Currently processing.
  • success - Completed processing with a success.
  • transient_failure - Encountered a failure which can be retried.
  • permanent_failure - Encountered a permanent failure and retry would not help.

Value is one of "invoked", "processing", "success", "transient_failure", "permanent_failure"

object

The read-only and read-write access tokens for this item

object

The basics of an access token

string / token
c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ

The requested access token.

integer / int64
3600

The time in seconds in seconds by which this token will expire.

The permissions that this access token permits, providing a list of resources (files, folders, etc) and the scopes permitted for each of those resources.

string
bearer

Value is always "bearer"

object

The basics of an access token

string / token
c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ

The requested access token.

integer / int64
3600

The time in seconds in seconds by which this token will expire.

The permissions that this access token permits, providing a list of resources (files, folders, etc) and the scopes permitted for each of those resources.

string
bearer

Value is always "bearer"

string
FILE_CONTENT

Action that triggered the invocation

string
skill_invocation

Value is always "skill_invocation"

Response Example

{
  "id": "fd1d2e53-35f5-41fb-9c25-4ba326daf2f9_341016304",
  "type": "skill_invocation",
  "skill": {
    "id": 11446498,
    "type": "skill",
    "name": "Hello World Skill",
    "api_key": "hxel2s12wd2h9r8ne103c4gjbqefofih"
  },
  "token": {
    "read": {
      "access_token": "c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ",
      "expires_in": 3600,
      "token_type": "bearer",
      "restricted_to": [
        {
          "scope": "item_download",
          "object": {
            "id": 12345,
            "etag": 1,
            "type": "file",
            "sequence_id": 3,
            "name": "Contract.pdf"
          }
        }
      ]
    },
    "write": {
      "access_token": "c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ",
      "expires_in": 3600,
      "token_type": "bearer",
      "restricted_to": [
        {
          "scope": "item_download",
          "object": {
            "id": 12345,
            "etag": 1,
            "type": "file",
            "sequence_id": 3,
            "name": "Contract.pdf"
          }
        }
      ]
    }
  },
  "status": {
    "state": "invoked",
    "message": "Example",
    "error_code": 400,
    "additional_info": "Example"
  },
  "created_at": "2012-12-12T10:53:43-08:00",
  "trigger": "FILE_CONTENT",
  "enterprise": {
    "id": 11446498,
    "type": "enterprise",
    "name": "Acme Inc."
  },
  "source": {
    "id": 12345,
    "etag": 1,
    "type": "file",
    "sequence_id": 3,
    "name": "Contract.pdf",
    "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
    "description": "Contract for Q1 renewal",
    "size": 629644,
    "path_collection": {
      "total_count": 1,
      "entries": [
        {
          "id": 12345,
          "etag": 1,
          "type": "folder",
          "sequence_id": 3,
          "name": "Contracts"
        }
      ]
    },
    "created_at": "2012-12-12T10:53:43-08:00",
    "modified_at": "2012-12-12T10:53:43-08:00",
    "trashed_at": "2012-12-12T10:53:43-08:00",
    "purged_at": "2012-12-12T10:53:43-08:00",
    "content_created_at": "2012-12-12T10:53:43-08:00",
    "content_modified_at": "2012-12-12T10:53:43-08:00",
    "created_by": {
      "id": 11446498,
      "type": "user",
      "name": "Aaron Levie",
      "login": "ceo@example.com"
    },
    "modified_by": {
      "id": 11446498,
      "type": "user",
      "name": "Aaron Levie",
      "login": "ceo@example.com"
    },
    "owned_by": {
      "id": 11446498,
      "type": "user",
      "name": "Aaron Levie",
      "login": "ceo@example.com"
    },
    "shared_link": {
      "url": "https://www.box.com/s/vspke7y05sb214wjokpk",
      "download_url": "https://www.box.com/shared/static/rh935iit6ewrmw0unyul.jpeg",
      "vanity_url": "https://acme.app.box.com/v/my_url/",
      "access": "open",
      "effective_access": "company",
      "effective_permission": "can_download",
      "unshared_at": "2018-04-13T13:53:23-07:00",
      "is_password_enabled": true,
      "permissions": {
        "can_download": true,
        "can_preview": true
      },
      "download_count": 3,
      "preview_count": 3
    },
    "parent": {
      "id": 12345,
      "etag": 1,
      "type": "folder",
      "sequence_id": 3,
      "name": "Contracts"
    },
    "item_status": "active"
  },
  "event": {
    "type": "event",
    "event_id": "f82c3ba03e41f7e8a7608363cc6c0390183c3f83",
    "created_by": {
      "id": 11446498,
      "type": "user",
      "name": "Aaron Levie",
      "login": "ceo@example.com"
    },
    "event_type": "FILE_MARKED_MALICIOUS",
    "session_id": "70090280850c8d2a1933c1",
    "source": {
      "id": 11446498,
      "type": "user",
      "name": "Aaron Levie",
      "login": "ceo@example.com"
    },
    "additional_details": ""
  }
}