If it is subject to use the Metadata API only, I don't see a method to accept an
ID instead of the
However, if you are able to also use the REST API, the URL to retrieve data of a particular profile by ID is (API version can be changed):
If you need to find the ID of all profiles, the URL is:
To describe the metadata of Profile, the URL is:
Updated to provide more examples on retrieving Tab Visibilities, Field Permissions, Layout Assignments, etc. of a particular profile by its ID.
The core idea is to find the relevant SObjects representing the meta and leverage the SOQL query in REST APIs (some of them are Tooling REST).
To retrieve the tab visibilities of a profile:
To retrieve the field permissions of a profile:
To retrieve the layout assignments is more complex. The first step is to find the RecordTypeId of a ProfileLayout relevant to the profile by (note that the URL contains /tooling):
Then find the actual layout meta from its relevant SObject by using the following URL (take Account for an example; and append the RecordTypeId, not ID of the ProfileLayout in the above step)