This will be a technical, hands-on, participation-based demonstration of how to utilize the Workfront API. Bring your laptop and favorite REST client application, and we will cover several common patterns throughout the API and discuss best practices and guardrail guidelines.
6. Status Codes
• 2xx
– 200 OK
• 5xx
– 500 Internal Server
– 502 Bad Gateway
– 503 Service Unavailable
– 504 Gateway Timeout
• 4xx
– 400 Bad Request
– 401 Authentication Required
– 403 Forbidden
– 404 Not Found
– 422 Unprocessable Entity
All Good Caller Problem WF Problem
7. “fields” URI parameter
• CoreFields – always returned
• DefaultFields – if no specific fields requested
• “*” fields – all fields - not best practice
• Nested fields
For calls returning results
8. “fields” (PROJ)
CoreFields
• ID
• name
• objCode
DefaultFields
• name
• percentComplete
• plannedCompletionDate
• plannedStartDate
• priority
• projectedCompletionDate
• status
10. That’s SO meta!
…/api/v7.0/metadata…
• Top level metadata for
each api version
• Lists Objects available
…/api/v7.0/PROJ/metadata…
• fields
• references
• collections
• search
• custom (with auth)
• actions
• queries
• operations
11. metadata (PROJ)
• “primitive” fields
– ID
– name
– description
– …
• Collection of
“nested” resources
– allHours (HOUR)
– tasks (TASK)
– documents (DOCU)
– …
• “nested” resource
– company (CMPY)
– program (PRGM)
– team (TEAM)
– …
fields references collections
12. metadata (PROJ) continued…
search
• Filterable ONLY
• Collection searches
– notes
• “aliases”
– duration:durationMinutes
– projectID:ID
• backward compatibility
– openOpTasks
custom
• Requires authentication
• Shows available custom
fields and the forms they
are available in
14. Authentication
User Credentials
• Via Request Parameters
– …/api/v7.0/…?username=<USERNAM
E>&password=<PASSWORD>…
Session
• Via Request Parameter
– …/api/v7.0/…?sessionID=<SESSION_
ID>…
• Via Header
– sessionID: <SESSION_ID>
15. Authentication
• Via Request Parameter
– …/api/v7.0/…?apiKey=<API_KEY>…
• Via Header
– apiKey: <API_KEY>
• Does NOT pass credentials
• Does NOT require active session
APIKey
16. Demo Time
• Get APIKEY (getApiKey)
• POST “project_<INITIALS>”
• PUT – update description, fields=description
• PUT – attachTemplate (with form), fields=DE:leAPI
• PUT – custom data value (DE:leAPI) , fields=DE:leAPI
• GET – fields=DE:leAPI,tasks:description