6.3 KiB
Filevine API Curl Skill
This skill enables intelligent exploration of the Filevine API by making curl requests and analyzing data patterns.
Capabilities
- Discover relevant data within a project - Search across all endpoints used in sync.py
- Make educated guesses - Use patterns from sample data to infer where data might exist
- Query specific fields - Search for fields like "matter number", "case number", dates, etc.
API Endpoints Discovered
Based on analysis of sync.py, the following endpoints are used:
| Endpoint | Purpose | Related Code |
|---|---|---|
Projects/{id} |
Project details (name, URLs, dates, phase) | fetch_project_detail() |
Projects/{id}/team |
Team members and roles | fetch_project_team() |
Projects/{id}/tasks |
Project tasks | fetch_project_tasks() |
Projects/{id}/Forms/{form} |
Specific forms (datesAndDeadlines, newFileReview, etc.) | fetch_form() |
Projects/{id}/Contacts |
Project contacts | fetch_contacts() |
Contacts/{id} |
Client information | fetch_client() |
Projects/{id}/Collections/{collection} |
Collections (serviceInfo) | fetch_collection() |
Sample Data Patterns
From examining examples/*.json, here are common patterns:
Project-level fields (Projects/{id}):
projectName- Full project namenumber- Project numberincidentDate- Incident dateprojectEmailAddress- Email addressprojectUrl- Link to FilevinephaseName- Current phasecreatedDate- Creation date
DatesAndDeadlines form:
caseNumber- Case numberdateCaseFiled- Case filed datedefaultDate- Default datetrialDate- Trial datemSCDate- MSC datenoticeExpirationDate- Notice expirationjudgmentDate- Judgment date
NewFileReview form:
noticeServiceDate- When notice was servednoticeExpirationDate- Notice expirationnoticeType- Type of notice (NP, PPQ, etc.)amountDemandedInNotice- Amount demanded
ComplaintInfo form:
totalDamagesSought- Total damagescomplaintVerificationBy- Verification method
Usage
When the user asks about finding data, follow this workflow:
1. Parse the Query
Identify what the user wants to find:
- Field name (e.g., "matter number", "case number", "trial date")
- Context (e.g., "in a project", "in the datesAndDeadlines form")
2. Generate Endpoint Candidates
Based on the query, suggest multiple endpoints to check:
For case/project identifiers:
Projects/{id}(checknumber,caseNumberfields)Projects/{id}/Forms/datesAndDeadlines(checkcaseNumberfield)Projects/{id}/Forms/matterOverview(checkmatterNumberfield)
For dates:
Projects/{id}(checkincidentDate,createdDate)Projects/{id}/Forms/datesAndDeadlines(checktrialDate,mSCDate,defaultDate, etc.)Projects/{id}/Forms/newFileReview(checknoticeServiceDate)
For contact/defendant info:
Projects/{id}/Contacts(check contact list for defendant)Contacts/{client_id}(check full contact info)
For attorney/team:
Projects/{id}/team(checkteamOrgRolesfor "Assigned Attorney", "Primary", etc.)
For notices:
Projects/{id}/Forms/newFileReview(checknoticeType,noticeExpirationDate, etc.)Projects/{id}/Collections/serviceInfo(check service dates)
3. Execute curl Commands
For each candidate endpoint, construct and execute curl commands using the auth headers from the codebase:
curl -X GET "https://api.filevineapp.com/fv-app/v2/Projects/{PROJECT_ID}/{ENDPOINT}" \
-H "Accept: application/json" \
-H "Authorization: Bearer {BEARER_TOKEN}" \
-H "x-fv-orgid: {ORG_ID}" \
-H "x-fv-userid: {USER_ID}"
Use the project ID from sample data (e.g., 15974631 or 15914808) as a placeholder.
4. Analyze Results
Look for the queried field in the JSON response:
- Search field names (not values)
- Check nested objects and arrays
- Note which endpoints actually contain the data
5. Report Findings
Provide:
- The field value(s) found
- The endpoint(s) that contain it
- Any related fields discovered in the same endpoint
- Context about how this data is used in the application
Common Patterns to Guess From
When the user asks "What endpoint should I hit to find [field]?", consider:
Field Mapping:
| Common Field Names | Likely Endpoints |
|---|---|
matterNumber, matter number |
Projects/{id}/Forms/matterOverview |
caseNumber, case number |
Projects/{id}/Forms/datesAndDeadlines |
incident date, incidentDate |
Projects/{id}, Projects/{id}/Forms/datesAndDeadlines |
trial date, trialDate |
Projects/{id}/Forms/datesAndDeadlines |
notice service date, noticeServiceDate |
Projects/{id}/Forms/newFileReview |
notice expiration date, noticeExpirationDate |
Projects/{id}/Forms/newFileReview |
notice type |
Projects/{id}/Forms/newFileReview |
assigned attorney |
Projects/{id}/team (role: "Assigned Attorney") |
primary contact, staff person |
Projects/{id}/team (role: "Primary") |
defendant |
Projects/{id}/Contacts (filter for "Defendant" role) |
client |
Contacts/{client_id} or Projects/{id} (clientId field) |
Environment Setup
When executing curl commands, use these placeholder values (user should provide actual values):
PROJECT_ID- Use sample IDs like 15974631 or 15914808ORG_ID- From FILEVINE_ORG_ID env varUSER_ID- From FILEVINE_USER_ID env varBEARER_TOKEN- From FilevineClient.get_bearer_token()
Tips
- Start with the most likely endpoints first
- The sample data shows that many fields are duplicated across endpoints - check multiple places
- Date fields are often in ISO format in API responses
- Some forms (like
newFileReview) contain multiple related date fields - Team roles use specific names - "Assigned Attorney", "Primary", "Secondary Paralegal"
- Contact objects in arrays may have
personTypesto identify their role
Example Workflow
User: "What endpoint should I hit to find the matter number?"
- Identify: User wants "matter number" field
- Guess: Matter number might be in
Projects/{id}/Forms/matterOverviewbased on sample data patterns - Check:
Projects/{id}also hasnumberfield - Execute: curl to both endpoints with project 15974631
- Report: Found
numberin project root andmatterNumberin matterOverview form