chobie\Jira\Api::getCreateMeta PHP Method

getCreateMeta() public method

This includes the available projects, issue types and fields, including field types and whether or not those fields are required. Projects will not be returned if the user does not have permission to create issues in that project. Fields will only be returned if "projects.issuetypes.fields" is added as expand parameter.
public getCreateMeta ( array $project_ids = null, array $project_keys = null, array $issue_type_ids = null, array $issue_type_names = null, array $expand = null ) : array | false
$project_ids array Combined with the projectKeys param, lists the projects with which to filter the results. If absent, all projects are returned. Specifying a project that does not exist (or that you cannot create issues in) is not an error, but it will not be in the results.
$project_keys array Combined with the projectIds param, lists the projects with which to filter the results. If null, all projects are returned. Specifying a project that does not exist (or that you cannot create issues in) is not an error, but it will not be in the results.
$issue_type_ids array Combined with issuetypeNames, lists the issue types with which to filter the results. If null, all issue types are returned. Specifying an issue type that does not exist is not an error.
$issue_type_names array Combined with issuetypeIds, lists the issue types with which to filter the results. If null, all issue types are returned. This parameter can be specified multiple times, but is NOT interpreted as a comma-separated list. Specifying an issue type that does not exist is not an error.
$expand array Optional list of entities to expand in the response.
return array | false
    public function getCreateMeta(array $project_ids = null, array $project_keys = null, array $issue_type_ids = null, array $issue_type_names = null, array $expand = null)
    {
        // Create comma separated query parameters for the supplied filters.
        $data = array();
        if ($project_ids !== null) {
            $data['projectIds'] = implode(',', $project_ids);
        }
        if ($project_keys !== null) {
            $data['projectKeys'] = implode(',', $project_keys);
        }
        if ($issue_type_ids !== null) {
            $data['issuetypeIds'] = implode(',', $issue_type_ids);
        }
        if ($issue_type_names !== null) {
            $data['issuetypeNames'] = implode(',', $issue_type_names);
        }
        if ($expand !== null) {
            $data['expand'] = implode(',', $expand);
        }
        return $this->api(self::REQUEST_GET, '/rest/api/2/issue/createmeta', $data, true);
    }