Upload source entitlement schema API results in 400

Hi @colin_mckibben - I am uploading a delimited CSV file and still doesn’t work. Am i doing something wrong?

curl --location ‘https:XXX.api.identitynow-demo.com/v3/sources/7531a728a3fa45d592d021f9cbd8bc9f/schemas/entitlements’
–header ‘Content-Type: multipart/form-data’
–header ‘Accept: application/json’
–header 'Authorization: Bearer ’
–form ‘=@“/C:/Users/pnshetty/Downloads/simeioiouicreate-entitlement-feednew.csv”’

Works for me.

What error are you getting?

@colin_mckibben - i am getting this

{“detailCode”:“400.1 Bad request content”,“trackingId”:“7ba00d28374b429fa99a3d622fa09827”,“messages”:[{“locale”:“en-US”,“localeOrigin”:“DEFAULT”,“text”:“The request was syntactically correct but its content is semantically invalid.”}],“causes”:[{“locale”:“en-US”,“localeOrigin”:“DEFAULT”,“text”:“Only a source type, DelimitedFile, supports schema file download”}]}

The error suggests that the source you are uploading entitlements to is not a delimited file source. This api will only work on delimited file sources. Can you please confirm the type of source you are trying to upload to

Yes i am uploading CSV Delimited UTF-8 type of file with only headers.

Which source are you uploading to? Active Directory, service now?

@colin_mckibben Its a delimimited type of source that i am trying to do for.

@colin_mckibben we are also trying the same but we are seeing 500 Internal server error. Any thoughts on this?
Can you help us the headers that you have passed

At this point I need to know more about how you configured your source. Can you please share the JSON output of your source, which you can obtain using the list-sources | SailPoint Developer Community endpoint? I just need the JSON for the source in question, not all of your sources. I can then compare your JSON configuration with mine to see where the difference is.

Source_Response.xml (3.5 KB)

@colin_mckibben attached the json output

Your source looks fine. Can you show me the API call you made to upload the file? A 500 is different than the 400 that @PratithShetty is getting, so it might have something to do with your request or the contents of your file.

@colin_mckibben API I am using is POST : {{baseURL}}/v3/sources/:id/schemas/entitlements and in the body I have selected form-data as file and uploaded the file to update the entitlement schema.
Attaching the entitlement file I was using.
servicenow-itsm2-entitlement-feed.csv (125 Bytes)

I see a few columns in your CSV that aren’t standard entitlement schema types. Did you make sure you updated the entitlement types in the UI first?

@colin_mckibben I was under an impression that the additional columns will be added using upload source entitlement schema API. Can you please let me know the functionality of this API

I’m actually not sure… This may have been to replace some legacy functionality that is no longer necessary. Looking further into it, you would be better off using the update source schema API. It doesn’t require a file upload, and it also allows you to configure the description, type, and multivalued fields for each new entitlement, whereas the file upload does not.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.