Limits¶
Overview¶
Limit Group requests can be used to set and retrieve information about one or many Limit Groups. Limit Group requests support GET, PUT, POST and DELETE request types. For more about these request types and their uses see the Request Formats and Responses documentation.
Requests and Responses¶
List of possible requests for Limit Groups. All PUT and POST requests can return a 400 Bad Request error message if no message body is passed, or if no command key is present in the message body. All PUT and POST requests may also return a 500 Internal Server Error error message if the command key in the message body contained an invalid command.
- Get Limit Group Names
Gets the names of all Limit Groups in the repository.
URL: http://hostname:portnumber/api/limitgroups?NamesOnly=true
Request Type: GET
Message Body: N/A
Response: JSON object containing all the Limit Group names.
Possible Errors: 500 Internal Server Error: An exception occurred within the Deadline code.
- Get Limit Groups
Gets the Limit Groups for the provided Limit Group names.
- URL: http://hostname:portnumber/api/limitgroups?Names=list,Of,One,Or,More,LimitGroup,Names
- http://hostname:portnumber/api/limitgroups?Name=aSingleLimitGroupName
Request Type: GET
Message Body: N/A
Response: JSON object containing the requested Limit Group/s
- Possible Errors:
- 404 Not Found: There is no Limit Group with provided Name (this can only occur if a single name is passed)
- 500 Internal Server Error: An exception occurred within the Deadline code.
- Get All Limit Groups
Gets the names of all Limit Groups in the repository.
URL: http://hostname:portnumber/api/limitgroups
Request Type: GET
Message Body: N/A
Response: JSON object containing all the Limit Groups.
Possible Errors: 500 Internal Server Error: An exception occurred within the Deadline code.
- Set Limit Group
Sets the Limit, Worker List, Allow List Flag, Release Percentage and/or Excluded Workers for an existing Limit Group, or creates a new Limit Group with the provided properties. Allow list flag is boolean
URL: http://hostname:portnumber/api/limitgroups
Request Type: PUT/POST
- Message Body:
- JSON object where the following keys are mandatory:
- Command = set
- Name = name of Limit Group
- The following keys are optional:
- Limit= integer limit
- Slaves = list of Worker names to include for limit
- SlavesEx = list of Worker names to exclude from limit
- RelPer = floating point number for release percentage
- White = boolean flag. True for allow list and false for deny list.
Response: “Success”
- Possible Errors:
- 400 Bad Request: No name provided for the Limit Group
- 500 Internal Server Error: An exception occurred within the Deadline code.
- Save Limit Group
Updates a Limit Group using a JSON object containing all the Limit Group information.
URL: http://hostname:portnumber/api/limitgroups
Request Type: PUT
- Message Body:
- JSON object where the following keys are mandatory:
- Command = save
- LimitGroup = JSON object containing all relevant Limit Group information
Response: “Success”
- Possible Errors:
- 400 Bad Request: No valid Limit Group object provided.
- 500 Internal Server Error: An exception occurred within the Deadline code.
- Reset Limit Group
Resets the counts for a Limit Group.
URL: http://hostname:portnumber/api/limitgroups
Request Type: PUT
- Message Body:
- JSON object where the following keys are mandatory:
- Command = reset
- Name = name of Limit Group
Response: “Success”
- Possible Errors:
- 400 Bad Request: No name provided for the Limit Group
- 404 Not Found: Provided Limit Group name does not correspond to a Limit Group in the repository.
- 500 Internal Server Error: An exception occurred within the Deadline code.
- Delete Limit Groups
Deletes the Limit Groups for the provided Limit Group names.
URL: http://hostname:portnumber/api/limitgroups?Names=list,Of,One,Or,More,LimitGroup,Names
Request Type: DELETE
Message Body: N/A
Response: JSON object containing the requested Limit Group/s
- Possible Errors:
- 400 Bad Request: Must provide at least one Limit Group name to delete.
- 500 Internal Server Error: An exception occurred within the Deadline code.
Limit Group Property Values¶
Values for some Limit Group properties are represented by numbers. Those properties and their possible values are listed below.
- Type (LimitGroupType)
- 0 = General
- 1 = JobSpecific
- 2 = MachineSpecific
- StubLevel (currently not used)
- 0 = Slave
- 1 = Task
- 2 = Machine