Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When a Skill is registered with a Box account, the invocation URL is provided. This URL will resolve to an endpoint in Fence.

Skills Invocation

When a file is uploaded to a Box folder that has an attached skill, the following payload is POSTed to the fence endpoint:

Code Block
languagejs
titleSample Box Skill Invocation
{
  "type" : "skill_invocation",
  "skill" : {
    "id" : "469",
    "type" : "skill",
    "name" : "NCSA Brown Dog Demo",
    "api_key" : "m0rhky5ah812g7w52tsbrz2qzt2l1sqn"
  },
  "token" : {
    "write" : {
      "access_token" : "1!G_elWx4TWjF1brZsCzoKF1BEA6OCP4DjGZZBGNfLI1J57hScZ2DbDp8IUGS2dN0Cjp0tWU5e_JybL41AYvxF8gpFcxil83kZa2kdiNKJbZm5m8Qz_xzLO3Merb52nv4kXYHKLMKD2YNB-k6tEZiBRKvVCNDGdElW89aesULGbS4j4k0AQlMe9N93e3H7sbMfIHTDV-zD06HqDEnaxZ71BQWQgEBhXUYDR0PiMIwkI4knC6DrbsackYVLZE47gYqEPkOSSJef81LgQLEp5vf2YXzxkZWIYT080WgamZOR8Wo4r28n0sLrB5NAvrghKOWcFxOLoBa4dnltI8cEjzm2dYRwLVBo7SbnkwBUgZ6ATYA2vHZSYLHPdORSwPQLYu9iwgIGQbFa1_BZzkHkceC02-oMXd4Cb37E5Z7sjyYt",
      "expires_in" : 1532043110,
      "restricted_to" : "[{\"scope\":\"gcm\"},{\"scope\":\"item_upload\",\"object_id\":305925334659,\"object_type\":\"file\"},{\"scope\":\"manage_skill_invocations\"}]",
      "token_type" : "bearer"
    },
    "read" : {
      "access_token" : "1!bBZfVF3mUxemyCpxnbYfb-uxE4IB8LWHfdK64WKOLC8pUGgoDUaxKWEDgv80_m4TffRBMISPEmIyfww_Ue5AslyiPHbNRt_E5vQqoHiFdkKDit1I0jVZ9p60NVcsCBOOe7-YQSXlmiWiGlE-wUyfsQkdJ21MajxzSt7uPFQwHcKu_scJhOsi-JkPlMi7jaWBD9R1CwOnGMmbyAh29ZwfqVUFnXX0Rzj5xSdSK_Ky051Wtsv2ndx2tr_Irn8o0p_P5qbStMQTN86CbNokEnHLtdsEPYLQ1QUDLMPTjI0PRh2m3eEXlurSeJQbIJL5vO-DTzyApnVu4O8N4d429K8mOqlUI5g23w2c7nyGEt-M_M-g6Wo.",
      "expires_in" : 1532043110,
      "restricted_to" : "[{\"scope\":\"gcm\"},{\"scope\":\"item_read\",\"object_id\":305925334659,\"object_type\":\"file\"}]",
      "token_type" : "bearer"
    }
  },
  "status" : {
    "state" : "invoked",
    "message" : "",
    "error_code" : "",
    "additional_info" : ""
  },
  "id" : "8e5373d5-3793-4627-8467-47c9f5554c12_819878470",
  "created_at" : "2018-07-18T16:31:49-07:00",
  "trigger" : "FILE_CONTENT",
  "enterprise" : {
    "type" : "enterprise",
    "id" : "61647055",
    "name" : "Pear Tree Studio"
  },
  "source" : {
    "type" : "file",
    "id" : "311371068932",
    "name" : "DESJ033735.8-402739.1.tif.png",
    "sequence_id" : "0",
    "file_version" : {
      "id" : "322195121235"
    },
    "owner_enterprise_id" : "61647055",
    "parent" : {
      "id" : "51605357386"
    },
    "old_parent_id" : "",
    "collab_accessible_by" : {
      "type" : "",
      "id" : "",
      "name" : "",
      "login" : ""
    },
    "size" : 24540
  },
  "event" : {
    "event_id" : "8e5373d5-3793-4627-8467-47c9f5554c12",
    "event_type" : "ITEM_UPLOAD",
    "created_at" : "2018-07-18T16:31:49-07:00",
    "created_by" : {
      "type" : "user",
      "id" : "3751070911",
      "name" : "Ben Galewsky",
      "login" : "box@peartreestudio.net"
    },
    "source" : {
      "type" : "file",
      "id" : "310871585151",
      "name" : "DESJ033735.8-402739.1.tif.png",
      "sequence_id" : "0",
      "file_version" : {
        "id" : "322195121235"
      },
      "owner_enterprise_id" : "61647055",
      "parent" : {
        "id" : "51605357386"
      },
      "old_parent_id" : "",
      "collab_accessible_by" : {
        "type" : "",
        "id" : "",
        "name" : "",
        "login" : ""
      }
    }
  },
  "parameters" : { }
}



Extractor Invocation

The RabbitMQ message for invoking an extractor will be changed to add a new property source which can be set to:

...