Agents, Logins and Applications

Factern Agent

Every fact created in Factern includes the Factern Agent the created the fact. Similarly, every API call into Factern must specify the associated agent.

The Factern Agent consists of 3 constituent facts:

Agent Part Meaning in API calls Meaning in Facts
Login The login making the API call The login that created the fact
Application The application making the API call The application that created the fact
Delegate The login making the API call on behalf of another login The login that created the fact on behalf of another login

Login and Application

From a permission perspective, facts are only visible to the caller if the login and the application part of the calling agent matches the granteeId and applicationId of any given permission.

For any facts created by a call, the login and application part of the calling agent are added as the login and application part of the fact.

An application may not appear in the same agent as an login unless there exists an Application permission of that application from the login.

Delegate

The delegate part of the calling agent is not used when determining visibility of facts. The delegate is optional, and if not specified, defaults to the login.

The delegate must be a valid login, for a particular delegate to be used in an agent, there must exist an Act permission on that delegate from the login mentioned in the login part of the agent.

Delegates are not otherwise used by Factern, although for any created fact, the delegate part of the calling agent is added to the delegate part of the fact.

Factern Agent in API calls

The three components of the Factern Agent are present in every API call.

Example API Call:

curl -XPOST 'https://api.factern.com/v2/createentity?user=000000002763084B71BF685830B74B23C8316EBCA1B55785&operatingAs=000000002763084B71BF685830B74B23C8316EBCA1B55785' \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer eyJraWQiOiJyc2ExIiwiYWxnIjoiUlMyNTYifQ.eyJhdWQiOiI4ZmY2ZjMxZi1hNjZiLTRlMGMtOGYyZC04N2MwMzc2ZTE1Y2IiLCJpc3MiOiJodHRwczpcL1wvc3NvLmZhY3Rlcm4uY29tXC9hdXRoXC8iLCJleHAiOjE0OTU1NDk5MDEsImlhdCI6MTQ5NTU0NjMwMSwianRpIjoiNDZjNGZkNDAtNjJlOS00M2NiLTlmZTgtYTI2ZTViN2RkYTNhIn0.F402AMctzVq7Kui2vthfDTCLfS4ImBqhbe8iRk7AJtLNkkj-52pwq2ySBSM3_QqizU-rz6UnJFat7qGXRro0eiYxk98ljcIEQ8iHFvgrosXpGJTrxG-OBLzYIissbEQjpysKQ7P_5UD7Cq-ZW5p8v29Ezs2kmZYV1sauSYZIAxN8cdphsIF2km6mjPm2MRVcvWbx49NGvkJ-HkAz_Bxc172cAzsLnD0gRZwVZgttzhZrTgEf21Nzho_EDuFUicpS02fTQvO53Hf9XPRnZtYHg4Q7k9XM8SIvj76x2FclxWhQZ-VyqXHIstMe2S6g-KugTDVTDGSuhALKBxwjaXY-Rw \
    -d '
{
    "parentId": "00000000156F212E6B4BB8E079D483CA073254692F7725B2"
}'

The application part of the agent is used to generate and is incorporated into the Authorization header. See API Authentication for details.

The Login part of the agent is specified using the user query parameter.

The Delegate part of the agent is specified using the operating query parameter.

Agent Part API Call
Login The user query parameter
Application Incorporated into the Authorization header
Delegate The operatingAs query parameter