AddToDefinition throws error adding layers to hosted feature service via REST API on Portal 10.7.1

525
1
11-22-2019 06:24 AM
HasheenDeBerry
New Contributor III

Greetings,

I have a Portal for ArcGIS that I am trying to add a feature service to using the REST API.  So far I've had success creating the service itself.  When I try to add layers to it, I get a peculiar error message:

{ "error": { "code": 403, "subcode": 2, "message": "Access to admin resources are not allowed, Signed Request needed for 'AddToDefinition' with table", "details": [] } }

This message appears when I try to use the server admin interface to add the layer definition as well.  Attached is the layer definition JSON.  I should say that I have used the same definition to create a hosted feature service in ArcGIS Online with success.  Does anyone have suggestions on how I can add feature layers to a service using the REST API on Portal?  Thanks in advance.

0 Kudos
1 Reply
HasheenDeBerry
New Contributor III

I did some research on signed requests and my sources suggest that the AddToDefinition endpoint on Portal may require a signature or HMAC hash added to the request header (Signing AWS API Requests - AWS General Reference ). If this is the case, does anyone know the ingredients to calculate this hash for Portal?

0 Kudos