Skip to content

Latest commit



65 lines (48 loc) · 1.89 KB

File metadata and controls

65 lines (48 loc) · 1.89 KB

REST API: GET subprofile

This is a simple method to request all information from a subprofile given its ID. The profile information can be requested with an HTTP GET call to the following URL:$id

The $id should be replaced with the numerical identifier of the subprofile you're requesting the information of.

Returned fields

This method returns subprofile information. The JSON object contains the following properties:

  • ID: Numerical ID of the subprofile.
  • secret: The "secret" code linked to a subprofile.
  • fields: Associative array of field names and values.
  • profile: Numerical ID of the profile the subprofile belongs to.
  • collection: ID of the collection where the subprofile is stored.
  • created: Timestamp for creation of subprofile in YYYY-MM-DD hh:mm:ss format.
  • modified: Timestamp for last edit of subprofile in YYYY-MM-DD hh:mm:ss format.
  • removed: Indicates whether the subprofile has been removed or not.

JSON example

The JSON for the subprofile might look something like this:

   "created":"2008-08-25 16:14:56",
   "modified":"2010-08-25 16:15:56",

PHP example

The following PHP script demonstrates how to call the API method.

// dependencies
// change this into your access token
$api = new CopernicaRestAPI("your-access-token", 4);

// do the call, and print result

The example above requires the CopernicaRestApi class.

More information