2. Make Batch SCIM API Calls - NicholasDeary/tec GitHub Wiki
Note: If you need to set up Postman to use with Slack, you can follow this guide.
- In the Body tab, you can add your SCIM API JSON script as usually. The only difference is adding a variable in place of any values you want to bulk change. A Postman variable is set between
{{ }}symbols, such as{{userid}}
{
"schemas": [
"urn:scim:schemas:core:1.0",
"urn:scim:schemas:extension:enterprise:1.0"
],
"id": "{{userid}}",
"emails": [
{
"value": "{{email}}",
"primary": true
},
],
}
-
Save your SCIM API call by pressing the Save button on the top right of the app. Give it a name to reference later on.
-
You'll need to make a CSV file with a column for each variable with a list of the user values that you want to set in bulk. To help format this, you can go to your Slack Members page: https://my.slack.com/admin and click the cloud-shaped button at the top to download a CSV file of all your Slack users and their profile info.
-
You could then just filter out the columns you don't need, and then add in the values that you want set for these users in the bulk SCIM API calls.
-
The important part is to make sure that the variable names in Postman match the headers of each column in your CSV so that Postman knows which values you want to bulk edit.
-
Press the Runner button on the top left of the app to begin the bulk SCIM API process.
- On the top left in the All Collections section, choose the collection you saved your SCIM API call in. If there is more than one SCIM API call in the collection, make sure to untick the others, leaving just the call you want to run now.
- Lower down for the Data attribute is where you can upload your CSV file that you created earlier:
-
Once you've uploaded your CSV file, the Iterations attribute will state how many row values Postman has detected to use for the batch SCIM API calls. If the number of iterations does not match the number of rows in your CSV file (excluding the header row) then there's likely a formatting issue, so you could double-check the CSV file.
-
There will be three preferences further down related to saving cookies – you can just leave these as default. When you're ready to run the batch SCIM API calls, press the Run [collection name] button.
- A new window will appear as each individual SCIM API call (known here as an "iteration") is processed in a list. As with API calls in general, there will be a response code for each iteration. As an example, 200 means that the call was successful, whereas 404 states that there was an issue parsing the content of the CSV file.
- If things look good with the SCIM API calls that have just processed, you could go to your Members page: https://my.slack.com/admin in Slack to check that the changes to users have gone through.