Has anyone used the Beta API for creating an Identity Attribute? I tried adding support for this Endpoint to my PowerShell module but I keep getting the semantically invalid
error. I tried submitting the JSON export of an existing Attribute with a different name and got the same error. Recorded the API calls used in the GUI and its using Private APIs as far as I can tell so wonder if anyone else has had better luck?
Hey @dmbrown1386,
I just tried it with the following body and it was created successfully. Could you give an example as to what you’re trying to create?
POST /beta/identity-attributes HTTP/1.1
Content-Type: application/json
User-Agent: PostmanRuntime/7.36.3
Accept: */*
Host: devrel.api.identitynow.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 236
{
"sources": [],
"name": "testAttribute2",
"displayName": "Test Attribute 2",
"standard": false,
"type": "string",
"multi": true,
"searchable": false,
"system": false
}
HTTP/1.1 201 Created
Date: Wed, 28 Feb 2024 21:03:25 GMT
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: nginx
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Location: http://devrel.shelby.services.infra.identitynow.com/beta/identity-attributes/testAttribute2
Cache-Control: no-cache, no-store, must-revalidate
SLPT-Request-ID: 5ffdf293c32c464c9a4227c971944473
Access-Control-Expose-Headers: Retry-After,Connection,SLPT-Request-ID,Content-Length,Date,X-Zuul-ServiceId,Location,Content-Type
X-Robots-Tag: none
X-Robots-Tag: noindex
{"sources":[],"name":"testAttribute2","displayName":"Test Attribute 2","standard":false,"type":"string","multi":false,"searchable":false,"system":false}
Well… I’m dumb. I was getting this error on occasion:
Invoke-WebRequest: Cannot follow an insecure redirection by default. Reissue the command specifying the -AllowInsecureRedirect switch.
Turns out… it was actually working but just not getting the 201 Response in PowerShell. My Semantic errors were from trying to create duplicate Identity Attributes. Works fine in WindowsPowerShell (that switch isn’t available in that version) so wonder what changed in PowerShell that requires that Switch. Never seen it working with any of other Endpoints. Thanks for your help!
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.