{"openapi":"3.0.0","info":{"title":"Entities","version":"1.0.0","description":"Entities are the center of the Alloy world. All evaluations, manual reviews, and documents are related to an entity whether or not you explicitly link them together in your API requests. This endpoint provides the ability to query on an entity and get top-level details about that entity as well as an overview of all items associated with the entity. The tokens from linked evaluations, reviews, or documents can be passed to their own API endpoints for more information about those specific items."},"components":{"schemas":{"Entity":{"properties":{"name":{"type":"string"},"type":{"type":"string"},"entity_token":{"type":"string"},"archived":{"type":"boolean"},"created":{"type":"number"},"evaluations":{"type":"array","items":{"properties":{"evaluation_token":{"type":"string"},"timestamp":{"type":"number"},"status":{"type":"string"},"application_name":{"type":"string"},"outcome":{"type":"string"}}}},"documents":{"type":"array","items":{"properties":{"document_token":{"type":"string"},"timestamp":{"type":"number"},"type":{"type":"string"},"name":{"type":"string"}}}},"reviews":{"type":"array","items":{"properties":{"review_token":{"description":"Unique ID for the Review.","type":"string"},"entity_token":{"description":"Unique ID for the Entity associated with the Review. Depending on how the Review is created, this value can also point to a Group Token.","type":"string"},"group_token":{"description":"Unique ID for the Group (of Entities) associated with the Review.","type":"string"},"application_token":{"description":"Unique ID for the Application (Workflow) associated with the Review. If Review is created via the API, this is determined by the authentication tokens used.","type":"string"},"outcome":{"description":"Outcome of the Review. Value should equal an Outcome that's defined in your Alloy account settings.","type":"string"},"application_name":{"description":"Name of the Application (Workflow) associated with this Review. If Review is created via the API, this is determined by the authentication tokens used.","type":"string"},"reviewer":{"description":"Email of the Agent that created the Review.","type":"string"},"timestamp":{"description":"Unix timestamp when the Review was created.","type":"number"},"reasons":{"type":"array","description":"Array of reasons for this Review and the Review's Outcome. Value should should equal a Review Reason that's defined in your Alloy account settings.","items":{"type":"string"}},"agent":{"type":"object","properties":{"email":{"description":"Valid email of agent with Alloy account access.","type":"string"},"external_id":{"description":"Unique external ID associated with the Agent, if any.","type":"string"}}},"notes":{"type":"array","description":"Array of notes associated with the Review, if any.","items":{"properties":{"note":{"description":"Content to include in the body of the note.","type":"string"},"note_author_agent_email":{"description":"Valid email of agent with Alloy account access, associated with creation of the note.","type":"string"},"created_at":{"description":"Unix timestamp when the note was created.","type":"number"},"updated_at":{"description":"Unix timestamp when the note was last updated.","type":"number"}}}}}}}}},"Evaluation":{"properties":{"status_code":{"type":"string"},"error":{"type":"object"},"timestamp":{"type":"number"},"evaluation_token":{"type":"string"},"entity_token":{"type":"string"},"application_token":{"type":"string"},"application_version_id":{"type":"number"},"summary":{"type":"object","properties":{"result":{"type":"string"},"score":{"type":"number"},"tags":{"type":"array"},"outcome_reasons":{"type":"array"},"outcome":{"type":"string"}}},"supplied":{"type":"object"},"formatted":{"type":"object"},"matching":{"type":"object"},"diligence":{"type":"object"},"related_data":{"type":"object"},"raw_responses":{"type":"object"},"formatted_responses":{"type":"object"},"audit_archive":{"type":"object"}}},"EntityNotes":{"required":["note","note_author_agent_email"],"properties":{"note":{"type":"string"},"note_author_agent_email":{"type":"string"}}},"EntityNoteResponse":{"properties":{"entity_token":{"type":"string"},"external_entity_id":{"type":"string"},"note":{"type":"string"},"note_author_agent_email":{"type":"string"},"created_at":{"type":"number"},"updated_at":{"type":"number"}}}}},"paths":{"/entities/{entity_token}":{"parameters":[{"in":"path","name":"entity_token","schema":{"type":"string"},"required":true,"description":"Token associated with entity."}],"get":{"tags":["Entities"],"summary":"Get Information Related to an Entity","responses":{"200":{"x-summary":"OK","description":"Entity","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/Entity"}}}}}}},"/entities/{entity_token}/evaluations/{evaluation_token}":{"parameters":[{"in":"path","name":"entity_token","schema":{"type":"string"},"required":true,"description":"Token associated with entity."},{"in":"path","name":"evaluation_token","schema":{"type":"string"},"required":true,"description":"Token associated with evaluation."}],"get":{"tags":["Entities"],"summary":"Get An Evaluation","description":"If you want to look up the result of a previously-run evaluation, you can use the API to get the exact same response that was returned from POST /evaluations originally. Here is the endpoint for getting that information.","responses":{"200":{"x-summary":"OK","description":"Entity","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/Evaluation"}}}}}}},"/entities/{entity_token}/notes":{"parameters":[{"in":"path","name":"entity_token","schema":{"type":"string"},"required":true,"description":"Token associated with entity."}],"post":{"tags":["Entities"],"summary":"Add a Note for an Entity","description":"Adds a note to an existing enity.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityNotes"}}}},"responses":{"200":{"x-summary":"OK","description":"Entity","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/EntityNoteResponse"}}}}}}}},"x-si-base":"./InternalDocs/docs/entities.yaml","x-github-repo":"UseAlloy/Alloy","x-github-sha":"5fa046ee6f027fda6cbf56f212ef6b42e94c1bfe","x-readme":{"explorer-enabled":true,"proxy-enabled":true}}