REST API:REST API CheatSheet
From LongJump Support Wiki
Revision as of 02:20, 8 February 2011 by imported>Aeric
Resource URI: https://{domain}/networking/rest/{resource}
Method Resource Description Result Request/Params
Session ResourcesPOST login Start a session. GET logout End a session. GET user/isSessionValid See if a session is in progress. GET user/info Get ID of logged-in user. POST user/operation/changePassword Change password for the currently logged in user. old password
new password
Administration ResourcesGET companyInfo Retrieve company information. PUT companyInfo Update company information. update fields
passwordPolicyGET passwordPolicy Retrieve record that specifies restrictions on passwords that users can choose. PUT passwordPolicy Update password policy settings. update fields
userGET user/{user_id} Get a user record. POST user Create a new user. new fields PUT user/{user_id} Update a user record. update fields POST user/updatePassword Reset a user's password. userID, password, reset, email DELETE user/{user_id} Delete a user. GET user?{search_parameters} Search for users.
roleGET role/{role_id} Get a role definition. POST role Create a new role. new fields PUT role/{role_id} Update a role record. update fields DELETE role/{role_id} Delete a role record. GET role/{role_id}?{search_parameters} Search for roles.
teamGET team/{team_id} Get a team record. POST team Create a new team. new fields PUT team/{team_id} Update team information. update fields DELETE team/{team_id} Delete a team. GET team?{search_parameters} Search for teams.
userTeamGET userTeam/{record_id} Get a user/team junction record. POST userTeam/ Create a new user/team junction record. new fields PUT userTeam/{record_id} Update a user/team junction record. update fields DELETE userTeam/{record_id} Delete a user/team junction record. GET userTeam/{record_id}?{search_parameters} Search records in the user/team junction object.
Data Sharing ResourcesGET teamDataSharingPolicy List the records that tell how and with whom a team can share data. list GET teamDataSharingPolicy/{policy_id} Get a record that defines sharing policies with a specific recipient. POST teamDataSharingPolicy Create a new data sharing record. new fields PUT teamDataSharingPolicy/{policy_id} Update a data sharing record. update fields DELETE teamDataSharingPolicy/{policy_id} Delete a data sharing record.
tenantDataSharingPolicyGET tenantDataSharingPolicy List policies for sharing data between tenants. read all GET tenantDataSharingPolicy/{policy_id} Get a tenant data sharing record. POST tenantDataSharingPolicy Create a new tenant data sharing record. new fields PUT tenantDataSharingPolicy Update a tenant data sharing record. update fields DELETE tenantDataSharingPolicy/{policy_id} Delete a tenant data sharing record.
Data Management ResourcesGET record/{objectName}/{record_id} Get a new object record. POST record/{objectName}[?retrieve_record=true] Create a new object record. Optionally retrieve the updated record. new fields
(multipart supported)PUT record/{objectName}/{record_id}[?retrieveRecord=true] Update an object record. Optionally retrieve the created record. update fields
(multipart supported)DELETE record/{objectName}/{record_id} Delete an object record. GET record/{objectName}?{search_parameters} Search for object records.
composite recordGET record/{objectName}/{record_id} Retrieve an object record, along with records from related objects. POST record/{objectName} Create a new object record, optionally adding or updating records in Related Objects, depending on cascade rules. new fields
(multipart supported)PUT record/{objectName}/{record_id} Update an object record, optionally adding or updating records in related objects, depending on cascade rules. update fields
(multipart supported)DELETE record/{objectName}/{record_id} Delete an object record, optionally deleting records in related objects, depending on cascade rules. GET record/{objectName}?{composite_search_params} Search for object records. Both the search criteria and information returned can be defined in terms of Related Objects, as well as the initial object.
recordLocatorGET recordLocator/{record_id} Get the record that defines indexes for an object. PUT recordLocator/{record_id} Update the record that defines indexes for an object. update fields
bulkPOST bulk/{objectName} Upload multiple records to a Built-in or CRM object in a single transaction. system obj mapping+special
(multipart w/data file)POST bulk/Custom Upload multiple records to a Custom Object in a single transaction. custom obj ID+mapping
(multipart w/data file)
Workflow ResourcesGET workflowAction/record/{objectName}/{record_id} Get a list of available state-transition actions for a record.
recordGET record/{objectName}/{record_id}/workflowOwners List workflow owners list POST record/{objectName}/{record_id}/operation/changeWorkflowState Execute a defined action to transition to a new record state. transition fields (workflowID, action, comment, owner)
Customization ResourcesGET object List objects. read all GET object/{objectName} Get an object definition. POST object Create a new object. new fields PUT object/{objectName} Update an object definition. update fields DELETE object/{objectName} Delete an object.
fieldGET field/{objectName} List fields defined for an object. read all GET field/{objectName}/{fieldName} Get a field definition.
formGET form/object/{objectName}/{record_id}[?mode=add/edit/view] Retrieve the form displayed when a user is adding, editing, or viewing a record. Specify mode.
packagePOST package/operation/download/{package_id}[?lastPublishedVersion=true] Download a published package. If it hasn't been published yet, publish it first. multipart response POST package/subscribe?packageId={id}[&version={version#}] Subscribe to a package in the platform repository. POST package/subscribe?fileName={zipfile_path} Subscribe to a package file. Do a multipart post.
Development ResourcesGET class/{record_id} Get the code that defines a class. PUT class/{record_id} Replace the code that defines a class. update Code for the class. POST class Create a new class. new Code for the class DELETE class/{record_id} Delete a class. GET class?{search_parameters} Search classes.
execPOST class/operation/exec Execute a class method. execute class, method, params
customPageGET customPage/{record_id} Get a JSP page. POST customPage Create a JSP page. new fields PUT customPage/{record_Id} Update a JSP page. update fields DELETE customPage/{record_id} Delete a JSP page. GET customPage?{search_parameters} Search JSP pages.
functionGET function List available functions. list GET function/{record_id} Get the code that defines a function. POST function Create a function. new function code PUT function/{record_id} Update a function. update function code DELETE function/{record_id} Delete a function. GET function?{search_parameters} Search functions.
repositoryGET repository Read the settings for the metadata repository--an external location in the file system (typically managed by a version control system) where object-defining metadata is stored, along with the metadata for other platform elements. read settings PUT repository Update settings for the metadata repository. update enable or disable, path to repository POST rest/repository/operation/readFrom Update platform with the latest metadata stored in the repository. read POST rest/repository/operation/writeTo Write changes from your platform to the shared metadata repository. write
staticResourceGET staticResource List available static resources (files and images, for example). list GET staticResource/{resource_id}[?getfile=true] Get a static resource. POST staticResource Create a new static resource. new fields PUT staticResource/{resource_id} Update a static resource. update fields DELETE staticResource/{resource_id} Delete a static resource.
utilityGET utility/timeZone List available time zone codes. list GET utility/timeZone/{zone_id} Get a time zone code.
Service Provider ResourcesGET license Retrieve platform license.
tenantGET tenant/{tenant_id} Get a tenant record. POST tenant Create a new tenant. new fields PUT tenant/{tenant_id} Update a tenant record. update fields DELETE tenant/{tenant_id} Delete a tenant. GET tenant?{search_parameters} Search tenants.
tenantCapabilitiesGET tenantCapabilities/{tenant_id} Get the record that defines the platform features a tenant can access. PUT tenantCapabilities/{tenant_id} Update tenant capabilities. update fields
Community ResourcePOST networking/community/user/operation/linkToCommunity Join a community. join username
passwordGET networking/community/login/site?userName=...&password=... Login to a community. login POST networking/community/user/operation/changePassword Change password of currently logged in user. old password
new password
Scheduled Jobs ResourcesGET scheduledJob/{job_id} Get details on a job. DELETE scheduledJob/{job_id} Delete a job. GET scheduledJob?{search_parameters} Search job history. Ex: ?fieldList=jobId,jobName&filter="jobName contains 'Update'" Note: Jobs can be scheduled from the GUI, or by using the class exec REST API to run a method that uses the Java APIs to Schedule a Job.
Status ResourcesGET status/import/{job_id} Get status of an import job. (Imports run in the background, as scheduled jobs.) Record counts, reason for rejections GET status/import?{search_parameters} Search import jobs. Ex: ?fileName,status&
filter=objectName contains 'contact'list
packageDeploy StatusGET status/packageDeploy/{job_id} Get status for a package deployment job. (Deployments run in the background, as scheduled jobs.) Deployment counts, reasons for failures GET status/packageDeploy?{search_parameters} Search package deployments. Ex: ?fieldList=packageName,status list